Skip to content

Instantly share code, notes, and snippets.

@kenwilcox
Last active August 29, 2015 14:17
Show Gist options
  • Save kenwilcox/a81910be2c635a75d529 to your computer and use it in GitHub Desktop.
Save kenwilcox/a81910be2c635a75d529 to your computer and use it in GitHub Desktop.
Building Alamofire framework for app distribution

Yesterday I was playing with Carthage for the first time. I got Alamofire to download and build in the simulator just fine.

However, when I tried to upload it to iTunes Connect it failed with PIE errors, invalid iOS min version... and something else, I don't remember...

What I did to get it to work:

  • Opened up the Alamofire workspace that Carthage downloaded for me.
  • On the project tab set the deployment target to 8.0
  • In Info.plist added MinimumOSVersion, string value of 8.0
  • Saved the project
  • Opened terminal to the Carthage/Checkouts/Alamofire directory
  • tried several times to get a valid build - the following worked xcodebuild -project Alamofire.xcodeproj -scheme "Alamofire iOS" -configuration Release -sdk 'iphoneos8.2' ARCHS='armv7 armv7s arm64'
  • copied the Alamofire.framework from the derived data directory (it's near the end of the xcodebuild output) to the Carthage/Build/iOS directory
  • Back in Xcode I archived the project for distribution
  • Validation PASSED!

Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment