Xcode ARC conversion tool issue

2019-05-07 11:50发布

问题:

I'm running the ARC conversion tool for the first time. I've followed the instructions and dealt with all of the issues/erros in my files that the conversion tool finds before it will actually run. I also have several third party libraries that I've told ARC to skip by unchecking them in the Targets to Convert dialog. After running the tool it shows me a report of all the changed files but no files have been changed. Next I save and try to build the project only to find that I have nearly 1000 build errors due to all the calls to retain and release in my project. It's my understanding that the conversion tool is supposed to remove all calls to retain, release, and autorelease but that isn't the case for me.

Has anybody encountered this problem before and if so how did you solve it? Or is it my responsibility to remove all retains & releases from my app? If so I'm not sure what the point of the conversion tool is. Please advise.

Thanks in advance

回答1:

I am about to try this on my own rather large project, so I may be back with more questions, but I found this that might help: http://meandmark.com/blog/2011/11/xcode-4-2-convert-to-arc-troubleshooting/

Are you using GIT repositories for your code? It may not be converting due to the snapshot issue described.



回答2:

This works better in case you allow it to continue building if errors encountered (Preferences - General). However, not all files are changed or converted completely anyway. But a few regulars will do the dirty job.

In case anyone wants to copy and paste;

\[([\[\w\s\]]+) autorelease\]