سؤال

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?

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top