Command failed due to signal: Abort trap: 6

前端 未结 30 2602
暖寄归人
暖寄归人 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:49

    Make sure you don't implement a private protocol into class extension. Most of the time would be quite strange to have a private protocol, but not necessary, depending on what you wish to encapsulate.

    Something like, in the same file:

    class C: ... {
    }
    
    extension C: P {
    }
    
    private protocol P: class {
    }
    

    Do this an you'll surely get Command failed due to signal: Abort trap: 6

    Instead remove the private modifier from the protocol and the error is fixed.

提交回复
热议问题