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

前端 未结 9 1757
野趣味
野趣味 2020-11-30 12:45

Im trying to run the basic iOS demo SDK code. I have created the API keyand it loads ok. Although i\'ve transfered the code from viewDidLoad to loadView the effect remains.

相关标签:
9条回答
  • 2020-11-30 13:30

    It's important to note that you should be adding the -ObjC to the Other Linker Flags section in your project.... NOT in your specific target.

    0 讨论(0)
  • 2020-11-30 13:30

    Other people have mentioned the following section from Google's Documentation

    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.

    However, it wasn't until I added the -ObjC flag into my projects 'Other Linker Flags' section, and NOT the targets 'Other Linker Flags' section, was I able to resolve the unrecognized selector error.

    0 讨论(0)
  • 2020-11-30 13:32

    You most probably have forgotten to do this: (as stated in the google docs)

    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.

    0 讨论(0)
提交回复
热议问题