Hello,
I'm experiencing a critical issue with PassKit's shareable pass functionality. Despite having the necessary entitlements configured, I'm getting an entitlement error when calling PKAddShareablePassConfiguration.forPassMetaData.
Failed to create PKAddShareablePassConfiguration: Error Domain=PKPassKitErrorDomain Code=4 "client is not entitled" UserInfo={NSDebugDescription=client is not entitled}
private func createPassViewController(from response: PreparePushProvisioningResponse) { guard let passMetadata = PKShareablePassMetadata( provisioningCredentialIdentifier: response.provisioningCredentialIdentifier, cardConfigurationIdentifier: response.cardConfigurationIdentifier, sharingInstanceIdentifier: response.sharingInstanceIdentifier, passThumbnailImage: response.passThumbnailImage, ownerDisplayName: response.ownerDisplayName, localizedDescription: response.localizedDescription ) else { print("Failed to create PKShareablePassMetadata") return }
print("PKShareablePassMetadata created successfully")
// This is where the error occurs
PKAddShareablePassConfiguration.forPassMetaData(
[passMetadata],
provisioningPolicyIdentifier: "", // Empty as per documentation
action: .add
) { (configuration, error) in
if let error = error {
print("Failed to create PKAddShareablePassConfiguration: \(error)")
// Error Domain=PKPassKitErrorDomain Code=4 "client is not entitled"
return
}
guard let config = configuration else {
print("PKAddShareablePassConfiguration is nil")
return
}
// other code...
}
}
The push provisioning preparation succeeds completely:
Prepare push provisioning succeeded
Credential ID: "XXXX-XXXX....."
Owner: Teodora
Description: Interflex NFC development
PKShareablePassMetadata created successfully
Then immediately fails at PKAddShareablePassConfiguration.forPassMetaData() with the entitlement error.
Xcode Configuration Issues:
When manually entering capabilities in Xcode's Signing & Capabilities tab, I receive this error:
Provisioning profile "20250929 VIDC QA DEV" doesn't match the entitlements file's value for the com.apple.developer.contactless-payment-pass-provisioning entitlement. Profile qualification is using entitlement definitions that may be out of date. Connect to network to update.
When I don't manually enter the capabilities in the Runner.entitlements file, the provisioning profile error disappears in Xcode, but the runtime entitlement error persists.