'Convert to latest Swift Syntax' breaks the build even when there are no changes
Asked Answered
K

4

7

My project is in objective-c with just one tableviewcontroller in swift. I downloaded the Xcode-beta today which prompted me to 'Convert to latest Swift Syntax'. After I follow the steps it shows me that there are no changes. I do not see any changes in the proj file either but it has errors. Please note that I do not see the errors when I choose not to covert to latest swift syntax - the app builds and runs fine in this case.

Any idea why it is breaking?

Screenshot added

Here are the errors -

  • cannot parse the debug map for "app name" No such file or directory
  • clang: error: linker command failed with exit code 1 (use -v to see invocation)
  • the other errors are that it is not able to find the swift file. The swift class was initiated in the objective-c class.
Kassey answered 12/6, 2015 at 21:27 Comment(0)
W
14

Product -> Clean helped in my case.

Wildawildcat answered 12/6, 2015 at 21:42 Comment(1)
@sss, did the other suggestion (from Pavlo) help?Wildawildcat
O
15

Switch ENABLE_BITCODE to NO in project build settings helped me.

Overspill answered 18/9, 2015 at 9:46 Comment(2)
@ViruMax glad to help ;)Overspill
This might be of an issue for app store appsEmetine
W
14

Product -> Clean helped in my case.

Wildawildcat answered 12/6, 2015 at 21:42 Comment(1)
@sss, did the other suggestion (from Pavlo) help?Wildawildcat
O
2

I had an issue similar to this, and I fixed it by changing the build phases/ compile sources in the project :

I had added in new sources that needed to be compiled earlier in the project, and after i deleted the files, when I tried to build the project it said it was missing the files that I deleted. After deleting a few of the build phases that appeared as though they were not the default build phases, it worked fine. I found that there were a default of 4 compile sources.

Also, using Ctrl+Shift+K will clean your project, which helped me another time with an error like this.

Orfield answered 7/8, 2016 at 14:15 Comment(3)
What did you exacly changed ?Ossetic
I had added in new sources that needed to be compiled earlier in the project, and after i deleted the files, when I tried to build the project it said it was missing the files that I deleted. After deleting a few of the build phases that appeared as though they were not the default build phases, it worked fine. I found that there were a default of 4 compile sources. Also, using Ctrl+Shift+K will clean your project, which helped me another time with an error like this.Orfield
Fine ! Now everyone has better hints to solve this case. I updated your answer with this relevant comment.Ossetic
L
0

I was having the same issue, and none of the above answers helped. Apparently, my issue was I had an import using a .m file instead of a .h file.

The easy way to find and fix these would be Find > Find in Project... and searching for #import.*m and changing them to the appropriate .h file

Liebermann answered 22/12, 2015 at 15:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.