Building Pass for iOS

Bob Sun edited this page Jun 4, 2018 · 3 revisions

Basic Steps

  1. Install libtool, automake, cmake, carthage, and cocoapods: brew install libtool automake cmake carthage cocoapods
  2. Run carthage bootstrap in the project root directory: carthage update then carthage bootstrap --platform iOS (this may take some time)
  3. Run pod install in the project root directory: pod install
  4. Open .xcworkspace file in Xcode.
  5. Build & Run.

Run on real devices

If you want to run Pass for iOS on your real devices, here are a few more steps.

  1. Xcode project configuration

    • Select the pass project. Under the "Build Settings" tab, change the "Product Bundle Identifier" to com.yourdomain.passforios. The bundle identifier for all targets (e.g., pass, passExtension, passKit) will be update automatically.
    • Select the pass target. First, under the "General" tab, check "Automatically manage signing", and select your Team. Then, under the "Capabilities" tab, check your group under "App Groups", uncheck the original one.
    • Select the passExtension target. First, under the "General" tab, check "Automatically manage signing", and select your Team. Then, under the "Capabilities" tab, check your group under "App Groups", uncheck the original one.
  2. Modify the codes

    • Modify passKit/Helpers/Globals.swift, change the bundleIdentifier variable to com.yourdomain.passforios.

Some issues you may experience when building from the scratch

  1. Swift version was too new? Update Xcode or solved with the little helper swiftenv, setting the swift version of this project to 4.1
  2. Don't forget to install dependencies using homebrew or macports.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.