13

I got a project with 49 source files that I'm trying to convert to ARC using edit>refactor>convert to arc. I click "pre-check", there are no errors, and the target compiles.

Xcode goes through "generating preview", compiles all 49 source files, then shows me 1 (or 2) file in the review changes list. This is a .h/.m file. That one appears correct. There are no other files on that list and I see.

When I click save, the window closes, and the project tries to build, but fails with error:

Error in format of file: ...-arc.migrate/remap

These errors appearing in all files

If I try to build the project, i get ~350 errors saying "retain, release not allowed in ARC"... Please help!

How do I convert the entire project to ARC at once?

Update: After cleaning the project a bunch of times and changing the deployment target to iPhone 5 simulator, I was able to see all files in the "save changes" list.

Philipp Schlösser
  • 5,179
  • 2
  • 38
  • 52
Alex Stone
  • 46,408
  • 55
  • 231
  • 407
  • Rather than editing your question to provide the answer, you can post an answer as an official 'answer' to your own question, and then mark that as accepted... it is encouraged behavior, as it moves the question off the "unanswered" list. :) – Duncan Babbage Nov 04 '11 at 12:10

1 Answers1

12

I found a way to answer this question and am posting it here for clarity:

After cleaning the project a bunch of times and changing the deployment target to iPhone 5 simulator, I was able to see all files in the "save changes" list.

Alex Stone
  • 46,408
  • 55
  • 231
  • 407
  • 1
    The key there is changing the target to Simulator. There are not enough up votes in the world for this answer. – Cory Imdieke Dec 02 '11 at 19:25
  • For me the error never resolved in-spite of changing the target to simulator. I found that I was working on the wrong Xcode Build number Build 4C177. I switched to Build 4C199 and the error got cleared – Dhilip May 30 '12 at 09:26
  • I am on build 4C199 (Xcode 4.2), Running on OS X 10.6.8 and still no luck... Cleaned, set Scheme to iPhone Simulator 5.0 (Debug), but the 'Generate Preview' phase shows 'No Editor' and once complete (no warnings) the retains/releases remain but the project flag alone is set (objc-arc) so build fails. – Nicolas Miari Jul 06 '12 at 07:37