зеркало из https://github.com/xamarin/ios-samples.git
58c5e8c813 | ||
---|---|---|
.. | ||
CreateAPassManually/CouponBanana.raw | ||
PassLibrary | ||
Screenshots | ||
Metadata.xml | ||
README.md |
README.md
PassKit Sample
This sample demonstrates how to build a PassKit Companion App to interact with passes you have issued in a users Passbook.
NOTE: This sample doen't work out of the box, you need to setup provisioning profile for you app and create certicicate for pass singing.
Instructions
- Create an AppId and enable
Passbook
- Generate
Provisioning Profile
for your app - Register new
iOS Pass Type ID
- Generate Certificate for your just created
iOS Pass Type ID
viaEdit > Create Certificate
- Download and install your certificate for pass
Now you need to fix some files:
Entitlements.plist
andInfo.Plist
– fixBundleIdentifier
andPassTypeIdentifiers
CouponBanana2.pass/pass.json
– fixpassTypeIdentifier
andteamIdentifier
At this point you are ready to generate pass package. For sample we provide simpe util which create package for you. Go to terminal and run:
cd path/to/PassLibrary/sample
./signpass -p CouponBanana2.pass/ -c "Certificate_Common_Name"
You can find Certificate_Common_Name with Keychain Access
app:
- Launch
Keychain Access
app - Find certificate which you installed a few steps ago
- Select certificate > Right Click > Get Info
- Here you are able to see
Common Name
At this point you should be able to find CouponBanana2.pkpass. Go to IDE, compile and run you app.
Refer to the Introduction to PassKit documentation on the Xamarin website.
Also refer to Apple's Passbook for Developers site.