[Google Maps Library] maps not loading in iOS when built with MABS 6.1

Forge Component
(24)
Published on 26 Feb by Labs
24 votes
Published on 26 Feb by Labs

I am experiencing errors when using this plugin in a mobile application on iOS.  The app will run fine in a browser or on an Android device.  If I use MABS 6.1 and use this plugin on iOS the map will not load.  If i compile the iOS app using 5.2 it works fine.

hmm.  yeah I just got caught out with this too.

Solution

hi!

The Google API Key that you are using has the protection by http referrer?
If the answer is yes, you should add new items where you replace the "https://" by "outsystems://".

If you want to get more information about this, you can find it here:

https://success.outsystems.com/Documentation/11/Managing_the_Applications_Lifecycle/Secure_the_Applications/Apply_Content_Security_Policy#Content_security_policy_and_MABS

Solution

Sofia Mourato wrote:

hi!

The Google API Key that you are using has the protection by http referrer?
If the answer is yes, you should add new items where you replace the "https://" by "outsystems://".

If you want to get more information about this, you can find it here:

https://success.outsystems.com/Documentation/11/Managing_the_Applications_Lifecycle/Secure_the_Applications/Apply_Content_Security_Policy#Content_security_policy_and_MABS

Thank you! this was our issue.


Great to know! =)

Hey guys!


I'm having the same issue! Can you please tell me what CSP need to be changed for this component?

I don't have access to Lifetime so i have to ask specifically to my infrastructure team what to add/change.


Thank you!

Cheers.

You have to change it where you are setting the http referrer in your google api's console.

Jason Dunfee wrote:

You have to change it where you are setting the http referrer in your google api's console.

Thanks for the quick reply! 

Only on the google api's console? I don't have to configure anything in Lifetime? 

I've even tried to remove all the limitations in the google api's console and didn't work as well.

yep thats the only thing i had to change was to allow urls from outsystems://your.domain.url

That's odd!

I have already put the configurations in the Google console and still the map don't load.

Does anyone have any ideia?

Hi Gustavo,

Can you check if you have any error/warning on the browser's developer tools console?
You don't see the map or you see it with the message "development only"?

Regards,
Sofia

Sofia Mourato wrote:

Hi Gustavo,

Can you check if you have any error/warning on the browser's developer tools console?
You don't see the map or you see it with the message "development only"?

Regards,
Sofia

Hello Sofia,


I didn't saw the map at all but i have figured out! 

I had to add in service center for the application (security tab) the link https://maps.googleapis.com.

It works just fine, thank you so much for all your help.


Cheers



Good to know you figured it out! =)