Search code examples
iosxcodeswiftcarthage

Can't build on device with Swift on Xcode 7.2 (not related to Provisioning Profiles)


This is not related to provisioning profiles.

I added SnapKit (0.18.0) with Carthage (0.10). Whenever I try to run the app on a device with Xcode 7.2, I get errors like this:

Undefined symbols for architecture arm64: "protocol witness table for Swift.Double : SnapKit.RelationTarget in SnapKit", referenced from:

If I build for the simulator it works. If I build for the device on AppCode by Jetbrains it works.

I have Xcode 7.2 and iOS 9.2. Google and Stackoverflow come up empty for "protocol witness table".

What the heck is going on?


Solution

  • As always, when Xcode goes berserk, there are some great things to try.

    1. Is is the provisioning profile or cert? Then you down what to do!
    2. If not, delete derived data.
    3. If not, clean.
    4. If not, reinstall your dependencies (pod install or update Carthage packages).
    5. If not, delete all the provisioning profiles off the device and start over.
    6. If not, cry really really big puddles of tears ;)