Apple Wallet Integration for Car/Hotel Keys in Mobile App
Apple Wallet in digital keys mode is not just a pretty card. It's a combination of NFC Secure Element with Car Connectivity Consortium (CCC) Digital Key standard for cars, or ASSA ABLOY/HID protocol for hotel locks. The entire setup requires a special Apple MFi agreement unavailable solo — needs a partner from lock manufacturer or car maker side.
Architecture: PassKit vs Wallet Keys
Critically distinguish two scenarios often confused.
PassKit passes (PKPass) — regular Wallet cards: boarding passes, coupons, loyalty cards. Any developer with Apple certificate can add them. No NFC Secure Element access.
Apple Wallet Keys — digital keys for cars and hotels. Use NFC via Secure Element, Express Mode (works without unlock, even at low battery). Require special entitlement com.apple.developer.passkit.pass-type.digital-key, which Apple gives only through partner program with equipment manufacturer.
If client wants "digital key like Apple Wallet" — first question: do they have agreement with Apple and equipment partner?
Hotel Scenario Implementation
For Hotel Key Apple uses standard compatible with ASSA ABLOY Mobile Access and HID Mobile Access. Mobile app adds key via PKAddPassesViewController:
import PassKit
func addHotelKey(passData: Data) {
guard let pass = try? PKPass(data: passData) else { return }
if PKAddPassesViewController.canAddPasses() {
let vc = PKAddPassesViewController(pass: pass)
vc.delegate = self
present(vc, animated: true)
}
}
// Server side generates .pkpass bundle:
// manifest.json + signature + pass.json + background image
// Signed with Pass Type Certificate
pass.json for Hotel Key contains special fields defined by HID/ASSA ABLOY partner:
{
"passTypeIdentifier": "pass.com.hotel.room-key",
"serialNumber": "booking-12345-room-401",
"teamIdentifier": "XXXXXXXXXX",
"nfc": [
{
"message": "ENCRYPTED_ROOM_TOKEN",
"encryptionScheme": "EAP"
}
]
}
nfc.message is encrypted with keys provided by lock system partner. Mobile app doesn't decrypt — the Secure Element does on contact with lock's NFC reader.
Express Mode
Most important for hotel scenario: user shouldn't pull phone from pocket. PKPassLibrary.isContactlessPaymentSupported() — check Express Mode support. For work without unlock, key must be added via correct Pass Type with matching entitlement.
On iPhone with drained battery (Power Reserve mode) Apple Pay and Express Travel Cards work ~5 hours. Hotel Keys similarly if lock manufacturer supports this mode.
Car Key: CCC Digital Key
For car keys — CCC (Car Connectivity Consortium) Digital Key Release 3.0. Supported by BMW, Hyundai, Genesis, KIA, Mini. Protocol uses UWB for precise positioning (Hands-Free unlock on approach) and NFC as fallback.
Car manufacturer app adds Car Key via vehicle invitation (Vehicle Invitation):
// CarPlay + PassKit integration
func handleVehicleInvitation(_ invitationToken: String) {
PKVehicleConnectionSession.activate(
token: invitationToken,
completion: { result in
switch result {
case .success(let pass):
// Key added to Wallet
break
case .failure(let error):
// PKError.vehicleConnectionNotSupported — car doesn't support
break
}
}
)
}
Key sharing — transfer via iMessage with limited rights (unlock only, no control). Via PKShareablePassMetadata.
Server Infrastructure
For Hotel Key — server must:
- Receive booking data
- Request token from partner (HID Origo API or ASSA ABLOY Mobile Access)
- Generate
.pkpassbundle with encrypted NFC field - Sign with Pass Type certificate
- Deliver link to user via push or email
Key lifetime is encoded in relevantDate and expirationDate in pass.json. On checkout — server marks pass as invalidated via Pass Update URL, key deletes from device.
Timeline
Basic PKPass Hotel Key integration (with Apple and partner agreements): 3–5 days mobile + 1–2 weeks server integration with HID/ASSA ABLOY API. Car Key with UWB: separate CCC agreement, 2+ months timeline. Pricing is individual.







