-
-
Notifications
You must be signed in to change notification settings - Fork 102
Building Pass for iOS
Yishi Lin edited this page Feb 26, 2020
·
7 revisions
- Install libtool, automake, cmake, carthage, and cocoapods:
brew install libtool automake cmake carthage cocoapods
- Run carthage bootstrap in the project root directory:
carthage update
thencarthage bootstrap --platform iOS
(this may take some time) - Run pod install in the project root directory:
pod install
- Open
.xcworkspace
file in Xcode. - Build & Run.
IMPORTANT NOTES
- If you are using pod v1.5.3, you should be fine now.
- Latest versions of pod seem to be buggy (e.g., CocoaPods/CocoaPods#8664). If your pod version is >=1.6.0 and your build is broken (e.g., crash immediately), you have to "manually add in the ObjectivePGP.framework into the target's General settings in Xcode and that would work" #247 (comment).
If you want to run Pass for iOS on your real devices, here are a few more steps.
-
Xcode project configuration
- Select the
pass
project. Under the "Build Settings" tab, change the "Product Bundle Identifier" tocom.yourdomain.passforios
. The bundle identifier for all targets (e.g., pass, passExtension, passKit) will be update automatically. Make sure the bundle identifiers for all targets are changed. - 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.
- Select the
-
Modify the codes
- Modify
passKit/Helpers/Globals.swift
, change thebundleIdentifier
variable tocom.yourdomain.passforios
.
- Modify
Or you can execute to replace all occurrences:
sed -i '' 's/me\.mssun\.passforios/youdomainname\.passforios/g' passExtension/passExtension.entitlements passAutoFillExtension/passAutoFillExtension.entitlements pass.xcodeproj/project.pbxproj passKit/Helpers/Globals.swift
- Swift version was too new? Update Xcode or solved with the little helper swiftenv, setting the swift version of this project to 4.1
- Don't forget to install dependencies using homebrew or macports.
Table of contents generated with markdown-toc.