How to work with new iOS Google Maps SDK under no ARC project

限于喜欢 提交于 2021-02-04 21:48:15

问题


I'm trying to add the new Google Maps API into my iOS application, however it does not use ARC yet. So, checking at the docs I think it's a requirement to have ARC in order for the SDK to work. How could I do that? I mean an option would be activating ARC just for the resources that will work with Google maps. (.xib files, controllers) How could that be done?


回答1:


you can disable ARC for individual files by adding a compiler flag -fno-objc-arc

This flag tells the compiler that the files are not ARC based.

To do the this

  1. Select the target
  2. Go to Build Phases tab
  3. Expand the Compile Sources
  4. Select the files which are not Arc based
  5. Press Enter
  6. In the appeared dialog box enter the text -fno-objc-arc
  7. Done

For more reference please check this question how-can-i-disable-arc-for-a-single-file-in-a-project



来源:https://stackoverflow.com/questions/13895975/how-to-work-with-new-ios-google-maps-sdk-under-no-arc-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!