Hi,
I was trying to convert my non-ARC project with release and to Objective-C ARC by going to Edit menu then Refactor in Xcode but when converting I get errors as shown below. Any suggestions?
Cannot Convert to Objective-C ARC
XCode found 1 issue that prevents conversion from proceeding. Fix all ARC readiness issues and try again.
To see all ARC readiness issues, enable “Continue building after errors” in the General preferences pane.
Error Cannot Convert to Objective-C ARC
Hi William,
The error is caused because conversion from Objective-C ARC failed.
The solution to it is:
1) Select 'Preferences' > 'General'
2) Select 'Edit' > 'Refactor' > 'Convert to Objective-C ARC'
3) Check the 'Select targets to convert'
4) Click 'Precheck'
5) Fix all issues using suggestions. Repeat from Step 1
6) 'Convert to automatic reference counting' window will appear
7) Click 'Next'
8) Review automatic changes
9) Click 'Save'
Error Cannot Convert to Objective-C ARC
For converting your iOS project to ARC you need to remove all [myObject retain] and [myObject release] statements from your code. Significantly there is a tool named “Migrate to Objective-C ARC” using this tool you can convert your IOS project into ARC. Here is the location of that tool.
Edit -> Refactor menu