Xcode 6.0.1 Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

后端 未结 24 2326
长情又很酷
长情又很酷 2020-11-27 13:18

I am getting this error on archive:

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with

相关标签:
24条回答
  • 2020-11-27 13:40

    I experienced this error after performing a git merge. I solved new Xcode warnings and the project can be compiled.

    Xcode 7.2.1 is used in my case.

    0 讨论(0)
  • 2020-11-27 13:41

    You can click the Product in the navigation and choose the "Clean" button; it will clean all compile error in your project. Then, you can debug for the latest error.

    0 讨论(0)
  • 2020-11-27 13:42

    one more case that can lead to this error which just took me hours to track down: a failable initializer that always returns nil.

    i had an initializer that looked like this:

    init?(object: MyObject) {
        if object.importantProperty {
            // initialize
        }
        return nil
    }
    

    when what i meant was:

    init?(object: MyObject) {
        if object.importantProperty {
            // initialize
        }
        else {
            return nil
        }
    }
    

    fixing the initializer made the error go away.

    0 讨论(0)
  • 2020-11-27 13:42

    In my way the error was due to UIDevice.currentDevice() in ((UIDevice.currentDevice().systemVersion as NSString).floatValue >= 8.0)

    After commenting this all starts work fine.

    XCode 7.2

    0 讨论(0)
  • 2020-11-27 13:44

    This occurred for me when I had two of the exact same files, and also when I was missing I file I didn't know I had deleted. I clicked on the error message, and just above the error, it shows you what file you have more than 1 of or are missing.

    0 讨论(0)
  • 2020-11-27 13:44

    in my case , at your project target Build Setttings, in Other Swift Flags,jsut delete the String "-serialize-debuggin-options" enter image description here

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