iOS Question GoogleMaps example

marcel

Active Member
Licensed User
Longtime User
I changed the
gmap.Initialize("gmap", key) to the key of my own. I asked a key with my package Name which is in the build configuration. Unfortunatly, this is not working ?!?

B4X:
Google Maps SDK for iOS cannot connect or validate APIKey: Error Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be completed. (com.google.HTTPStatus error 400.)" UserInfo=0x156ae1b0 {data=<CFData 0x155eefb0 [0x36583470]>{length = 145, capacity = 256, bytes = 0x3c48544d4c3e0a3c484541443e0a3c54 ... 3c2f48544d4c3e0a}}
Your key may be invalid for your bundle ID: com.yazula.xxxxxxxxxxx

The machine has internet so that is not the problem..
The key matches extact the one I requested at Google!?!?
 

schimanski

Well-Known Member
Licensed User
Longtime User
Did you get your own Api for IOS?
Obtaining an API Key

You can obtain a key for your app in the Google APIs Console.

Create an API project in the Google APIs Console.
Select the Services pane in your API project, and enable the Google Maps SDK for iOS. This displays the Google Maps Terms of Service.
Select the API Access pane in the console, and click Create new iOS key.
Enter one or more bundle identifiers as listed in your application's .plist file, such as com.example.myapp.
Click Create.
In the API Access page, locate the section Key for iOS apps (with bundle identifiers) and note or copy the 40-character API key.

You should repeat this process for each new application.
 
Upvote 0

marcel

Active Member
Licensed User
Longtime User
Yes
Have you enabled Google Maps SDK for iOS API in the console?
Yes. I did. The wierd thing is that this morning it works but still with some errors in the console
B4X:
Application_Start
Failed to locate 'Roboto-Medium.ttf' in bundle at path '/private/var/mobile/Containers/Bundle/Application/B7E11D3D-E83E-4DB3-A9CA-6355642D17B8/B4i googlemaps.app/GoogleMaps.bundle/GMSCoreResources.bundle'.
((null)) was false: Cannot find image GMSSprites-0-2x
((null)) was false: Image data can't be NULL.
miau
Not initialized
<B4IList: (
    "Lat: 10.000000, Lon: 10.000000",
    "Lat: 10.000000, Lon: 20.000000",
    "Lat: 20.000000, Lon: 20.000000",
    "Lat: 20.000000, Lon: 10.000000",
    "Lat: 10.000000, Lon: 10.000000"
)>
Application_Active
((null)) was false: Invalid texture state for .
((null)) was false: Invalid texture state for .
((null)) was false: Invalid texture state for .
((null)) was false: Invalid texture state for .
((null)) was false: Invalid texture state for .
((null)) was false: Invalid texture state for .
((null)) was false: Invalid texture state for .
((null)) was false: Invalid texture state for .
((null)) was false: Invalid texture state for .
((null)) was false: Invalid texture state for .
((null)) was false: Invalid texture state for .

Does this mean the build server still mising something?
 
Last edited:
Upvote 0

marcel

Active Member
Licensed User
Longtime User
You need to delete the current bundle folder and get the updated one from: GoogleMaps-iOS-1.9.0\GoogleMaps.framework\Versions\A\Resources

I have already the latest. I will try to do this again. Maybe the copy action failed somehow???
 
Upvote 0

marcel

Active Member
Licensed User
Longtime User
Have you copied the bundle from the SDK to the B4i project (under Files folder)?
Now I did :) Finally got it working. I need to have the Google Framework on my mac into the Libs directory of the Build Server and in My local project folder of B4I in the files directory I need to have the bundle from the SDK. Few ... Complicated.
 
Upvote 0

TomDuncan

Active Member
Licensed User
Longtime User
Using the Googlemaps demo how do I put in a location, i.e. City+State+Zip+Country
with my Xojo Mac program I load a page with the geocode.
This is done with an HTML View

Tom
 
Upvote 0
Top