GoogleMaps basic iOS demo app crash – unrecognized selector sent to instance

I think you may have forgotten to make the class a GMSMapView delegate. The GMSMapViewDelegate bit after the () needs to be between <>

I don’t assign that delegate as well as Googles Base Code does not assign it.
I have fortunetly managed to get it working. The google documentation on Google Maps states what follows:

Choose your project, rather than a specific target, and open the Build Settings tab.
In the Other Linker Flags section, add -ObjC. If these settings are not visible, change the filter in the Build Settings bar from Basic to All.

But their example project, after my examination, has the flag set on target. Setting it on the build target within my project in my case helped and my posted code works fine.

Leave a Comment