Google Maps implementation crashes in iOS

30 views
Skip to first unread message

josuegustavoh...@gmail.com

unread,
Sep 24, 2018, 2:50:50 AM9/24/18
to CodenameOne Discussions

Hi

I am trying to compile your uber clone example, with the help of your crashProtect method I have corrected several errors, but when trying to open the map the app crashes in iOS and does not notify anything, debug in Xcode and throws me this error : 

'GMSServicesException', reason: 'Google Maps SDK for iOS must be initialized via [GMSServices provideAPIKey: ...] prior to use'

 Investigating I found the following solution in Xcode but I do not know how to implement it in CodenameOne

in didFinishLaunchingWithOptions 
GMSPlacesClient.provideAPIKey ("Your key") 
GMSServices.provideAPIKey ("Your key")

Steve Hannah

unread,
Sep 24, 2018, 7:38:21 AM9/24/18
to codenameone...@googlegroups.com
See the configuration section for the google maps cn1lib

There are some build hints that you need to add.  In your case, you're missing the 
ios.afterFinishLaunching=[GMSServices provideAPIKey:@"YOUR_IOS_API_KEY"];

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/195d6691-d02c-4293-86a9-08452da1bbe4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Steve Hannah
Software Developer
Codename One
Reply all
Reply to author
Forward
0 new messages