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

后端 未结 24 2329
长情又很酷
长情又很酷 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:45

    I just had the same thing occur. I hunted down the cause to one file that caused the error even when empty. Examining the file, I discovered it had the wrong character set. When I set it to UTF-8, the error vanished. I think that it was decoding it with the wrong character set.

    From this I surmise that the error simply indicates that something has happened that the compiler was unprepared for. Sorry that isn't very helpful to most people, but it may help to check your characters sets.

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

    If using Core Data:
    I had a Core Data entity for which I created the NSManagedObject subclasses (with Xcode's help). In addition, the entity was configured to generate code automatically (see screenshot), so basically 2 classes existed during runtime. Just switch the option to Manual/None and it won't generate it.

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

    I am not sure if it has one solution. I recommend you to check the differences between your last git commit, and comment on/off the changes.

    In my case, my code was

    let anArray = ResultDict["ResultSet"] as [[NSDictionary : AnyObject]]
    for aDict : NSDictionary in anArray {
        let anObject = ObjectType(ObjectDict: aDict)
        objectList.addObject(aDict)
    }
    

    no warning on the line, i got the same exit 1 compile error then i changed it to the below it has compiled.

    let anArray = ResultDict["ResultSet"] as [[NSDictionary : AnyObject]]
        for aDict in anArray {
            let anObject = ObjectType(ObjectDict: aDict)
            objectList.addObject(aDict)
        }
    
    0 讨论(0)
  • 2020-11-27 13:47

    check "Development Pods" Folder all listed Frameworks path.

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

    It happened to me when I didn't put the parenthesis at the end of a call of a function:

    let var = self.getNextPrimeNumber
    

    solved it by:

    let var = self.getNextPrimeNumber()
    
    0 讨论(0)
  • 2020-11-27 13:52

    In my case swift development snapshot was selected instead of xcode 9.2. here are the steps and image.

    1. keep xcode on screen and click on xcode top menu bar.
    2. Than go to toolchains option and check on xcode 9.2. thats it. Happy Coding!!!
    0 讨论(0)
提交回复
热议问题