2

Has anyone converted an app from 1.2 to Swift 2? My app is small - about 1k LOC, and its been converting for >2 hours now. I'm stuck on the following screen:

screen]([![enter image description here

How long should I expect this to take? Thanks...

4

2 回答 2

4

The process is long, but it shouldn't take more than several minutes. The Swift converter is probably having an issue (e.g.: some kind of infinite loop).

You should abort and try to find what happened or maybe migrate manually.

于 2015-07-29T15:36:25.807 回答
1

Swift compiler has an issue with arrays. I have commented out all the elements of the array (like 10x UIColor), left only one element and conversion went smoothly.

Here's how you can debug the issue in your project:

  1. Got to the Report navigator (CMD + 8)
  2. Build your app, select the latest build and watch log (select All Messages filter)
  3. The problematic file will be stuck on the compile status.
  4. Navigate to that file and figure out what can hang the compiler (probably arrays/dictionaries).

Why build not convert? Because it's verbose.

于 2015-09-14T08:58:37.340 回答