Alberto Mier
Alberto Mier

Reputation: 204

IOS Error: Google Maps does not load the map on iPhone

Google Maps does not load the map on iPhone. However when I connect the iPhone to Xcode and execute the project, it loads the map correctly.

This is my code:

let camera = GMSCameraPosition.camera(withLatitude: -33.868, longitude: 151.2086, zoom: 14)
let mapViewtest = GMSMapView.map(withFrame: .zero, camera: camera)

let marker = GMSMarker()
marker.position = camera.target
marker.snippet = "Hello World"
//marker.appearAnimation = kGMSMarkerAnimationPop
marker.map = mapViewtest

view = mapViewtest

The console shows me this but I do not know if it has something to do with the issue:

CoreData: annotation: Failed to load optimized model at path '/var/containers/Bundle/Application/33FC89CC-DC52-4212-A361-F54DD2AC3CD9/App_name.app/GoogleMaps.bundle/GMSCacheStorage.momd/StorageWithTileProto.omo'

EDIT

The problem is that the map doesn't appear, but markers appear correctly

Run app on Iphone connected to xcode enter image description here

Run app whitout xcode enter image description here

Upvotes: 5

Views: 3050

Answers (1)

DDDrop
DDDrop

Reputation: 121

check your apikey again.

even if you use a wrong apikey, map will be show on a simulator, but doesn't work on device.

Upvotes: 1

Related Questions