Skip to content
프로젝트

TimOliver/PassKit-Business-Card

GitHub에서 보기

소개

명함처럼 사용할 수 있는 iOS Wallet 패스 템플릿

웹 및 앱 개발

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

PassKit-Business-Card

A template that can be used to generate passes for the iOS Wallet app that can be used like business cards.

A new trend that's been emerging in recent years is taking the pass features of the Wallet app, available on every iPhone, and using them in new and interesting ways.

One novel idea is the concept of having a pass that serves as a virtual business card. Anyone with an iPhone is guaranteed to have the app installed, it's easier than carrying physical cards around, and it usually leaves a lasting impression.

This repository is a basic template indicating all of the metadata and assets needed to create a business card. It also contains a compiled version of the utility that Apple published that allows pass bundles to be properly signed with a Developer certificate so they'll work on consumer hardware.

I can't take credit for this idea. A major shoutout goes to Thi Doan for originally sharing his virtual business card with me. :)

Requirements

  • An active, paid Apple Developer subscription.
  • A text editing app.
  • A graphics editing app.

Generating a Signing Certificate

Before the pass will work on any device (Even the iOS Simulator), it is necessary to sign it with a certificate issued by Apple.

  1. Go to your Apple Developer Account.
  2. Go to 'Certificates, Identifiers & Profiles' and click on 'Pass Type IDs'.
  3. Create a new Pass Type ID, specifying an appropriate identifier string.
  4. Go to Certificates, click on '+', and select a 'Pass Type ID Certificate'.
  5. Select your previously created Pass Type ID, and follow the steps to generate a certificate and import it into your Mac's security keychain.

Configuring Your Pass

All of the information and configuration settings for a pass are located in the pass.json file.

To align the pass template with the signing certificate generated by Apple, open pass.json and:

  • For passTypeIdentifier, paste in the identifier string you chose in the 'Pass Type IDs' panel.
  • For teamIdentifier, go to the Membership panel in your Apple Developer account, and copy the code in your 'Team ID' row.

Building Your Pass

Once pass.json is configured with your Pass Type ID and Team ID, and you've installed the certificate in your keychain, you can use the signpass utility to generate a pass.

Open Terminal, navigate to this project folder, and then run

./signpass -p PassKit-Business-Card

If all goes well, this will generate a PassKit-Business-Card.pkpass file in the same folder.

Testing Your Pass

Once a pass has been generated, you can test it in the iOS Simulator. Simply open any of the iPhone device simulators, and drag the .pkpass file over the Simulator window. If the pass was set up correctly, it will then automatically display in the Simulator. If it fails, nothing will happen.

Debugging Your Pass

If dragging the .pkpass file into the iOS Simulator does nothing, you can open the 'Console' app on your Mac, to view the device logs of the iOS Simulator. Each time you try and import the .pkpass file, an error message with the reason why it failed will appear in the log.

More Information

  • For Apple's documentation on creating passes, check the Introducing Wallet page on the Apple Developer Website.
  • For more information on the types of keys allowed in pass.json, check the Top-Level Keys page on the Apple Developer website.
  • For sample passes, as well as the source code for signpass, check out this sample code download.

License

All of the code in this repository, except for Apple's signpass code is released under public domain. No credit is necessary. analytics

관련 프로젝트 살펴보기

불러오는 중…