Puttin
Puttin

Reputation: 1615

MKMapView init failed in an App which contains Google Maps SDK

I am now testing some Maps service provider.
First I have a tableview which contains two provider:"Map Kit","Google Maps SDK".
And when I go into the map kit sample,then get out, and then go into the google maps sample, everything works fine.

But, when I go into the google maps sample first, then get out, and then go into the map kit sample, it crash.

When debug, I find out it crash when [[MKMapView alloc] init]

Why this happens?

Although in real App, we won't have two map service provider, I still want to know the reason.
Thanks.

Upvotes: 1

Views: 454

Answers (1)

Saxon Druce
Saxon Druce

Reputation: 17624

There are a couple of existing questions which cover this:

Google Maps SDK & Mapkit in the same app cause crash

Switch Google Maps SDK & Mapkit in the same app cause crash

However, this was related to this bug which Google fixed in version 1.1.2 (released 26th March) - so make sure you have the latest version of the SDK.

Otherwise, as explained in the other questions, you might need to clear or save/restore the OpenGL context before calling MapKit.

Upvotes: 1

Related Questions