简体   繁体   中英

Refactor to iOS5 ARC using XCode 4.2

I am trying to refactor my project (Edit/Refactor/Convert to Objective-C ARC). In the precheck stage I got a lot of problems with Google gtm OAuth. I want to disable ARC for those projects, so I went to targets/Build phases/Compile Sources and set the compiler flags of Google GTM Oauth files to -fno-objc-arc.

But when I run the refactor precheck it detects the same problems in google gtm. In build phases it even cleared the flags (I can't see the -fno-objc-arc flag setted for the files anymore).

Any help?

Thanks

“Edit” -> “Refactor” -> “Convert to Objective-C ARC.” The next step is "Select targets to convert."

Note that when you "select targets to convert", you can expand the project and uncheck specific files. This wasn't obvious to me at first.

Uncheck all of the files you don't want to convert. Then run the precheck, and fix the problems. Then start the process over again and repeat until there are no problems. I noticed that sometimes Xcode doesn't remember that I had unchecked the files in the previous iteration. I had to make sure they were unchecked each time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM