问题
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
- Select the target
- Go to Build Phases tab
- Expand the Compile Sources
- Select the files which are not Arc based
- Press Enter
- In the appeared dialog box enter the text -fno-objc-arc
- 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