Linker errors when building for release on iOS

When building my application for release with UrbanAirship I get the following linker errors:

ld: warning: ignoring file     ~/Library/Developer/Xcode/DerivedData/WCAP-dtexairuvoldlpgwhalbjmepdhbh/Build/Products/Release-iphoneos/AirshipKit.framework/AirshipKit, file was built for arm64 which is not the architecture being linked (armv7): ~/Library/Developer/Xcode/DerivedData/Project-dtexairuvoldlpgwhalbjmepdhbh/Build/Products/Release-iphoneos/AirshipKit.framework/AirshipKit
Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_UAConfig", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_UAirship", referenced from:
      objc-class-ref in NewsTableViewController.o
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Before I was able to build on my phone with no issues but when having issues when installing over TestFlight I switched the scheme to Release in order to debug on device and now I get these linker errors.

I've followed the starting guide on the documentation here multple times and still I get the same results. Any suggestions?

Didn't find what you were looking for?

New post



  • Hi Tracie!

    Linker errors like that could come as a result of an incorrect implementation of the SDK, or some configuration issues.

    The two things I would check in your app is make sure you've followed the SDK integration docs as close as you can.

    The second is making sure your build settings are set to build for active architectures only.

    It can also help to do a clean/rebuild as well and clear out the Derived Data folder to see if that helps any.

    If that doesn't help, let us know what steps you took to integrate the SDK, and we can go from there!

  • I've followed the classic implementation of the SDK very closely many times but nothing changed.  What helped me eventually was adding "libairship.a" into my bundled libraries and then libssl as well.  This wasn't in any of the tutorials I read, maybe it was and I missed a step?

  • Tracie,

    That doesn't sound quite right. Though, that might be the case if you were integrating the static library into your app, in which case I believe that would be the correct solution.

  • Is there any difference  between following the tutorial and just using that static library?  I have both the frameworks and the library in my project currently

  • Tracie,

    The tutorial walks you through integrating the SDK by linking the associated frameworks in the SDK. The static library method, which was the standard way of integrating libraries on iOS 7 and below, would mean the library and its code would be packaged into the code of the main executable. 

    With iOS 8 and above, and any Swift projects, the linker stores a reference to the library, so the library ends up not being packaged along with the main executable. I believe any Swift projects require this moving forward, and the option of including a static library was removed. Or, at the very least, frowned upon.


Please sign in to leave a comment.