Command failed due to signal: Abort trap: 6

前端 未结 30 2220
暖寄归人
暖寄归人 2020-12-01 08:56

Since Xcode 7 and Swift 2.0, I get the error above, like in the screenshot shown here:

\"screenshot

相关标签:
30条回答
  • 2020-12-01 09:30

    In my case I had a private struct Constants declared in both class A and extension A.

    Probably it should be giving an error but it didn't.

    0 讨论(0)
  • 2020-12-01 09:32

    I fixed it by going to Xcode -> Preferences -> Locations -> Set Relative option to Derived Data.

    0 讨论(0)
  • 2020-12-01 09:35

    I have the same problem with all Xcode 6.3 projects, I open in Xcode 7.0. I created a new project, copied all my source files and resources and everything worked without this compiler error. I thought this has something to do with the project settings. I turned off the Swift compile Optimization to "none" and the Trap 6 was gone away. Perhaps there are other settings, which also generate trouble, but for me this it was.

    0 讨论(0)
  • 2020-12-01 09:35

    This worked for me, so just give it a try. i got this error while converting the code from swift 3 to swift 4.

    Simply, go to Project>Target>Build Setting and search 'Swift Compiler - Code Generation' and set Optimization level to 'No Optimazation[-Onone]'.

    0 讨论(0)
  • 2020-12-01 09:37

    I managed to get my project to build by setting the optimisation level to 'None' under the 'Swift Compiler - Code Generation' menu in the target (not the project) settings. See the screenshot below...

    enter image description here

    This shouldn't be a permanent solution because it more than doubles the size of the ipa. It should be possible to switch optimisation back on when Xcode 7 comes out of beta.

    0 讨论(0)
  • 2020-12-01 09:40

    Go to project Build settings -> Swift Compiler - code generation -> Optimization Level -> For both Debug & Release select option "Fast,Single-File Optimaiztion[-O]

    0 讨论(0)
提交回复
热议问题