I am working on a mobile banking app and just want to add a card to Apple Wallet. Here is my code:
Card *card = ...;
BOOL mayAddCard = [PKAddPaymentPassViewController canAddPaymentPass];
if(mayAddCard) {
PKAddPaymentPassRequestConfiguration *addRequest = [[PKAddPaymentPassRequestConfiguration alloc] initWithEncryptionScheme:PKEncryptionSchemeECC_V2];
addRequest.cardholderName = ...;
addRequest.primaryAccountSuffix = ...;
addRequest.localizedDescription = ...;
addRequest.paymentNetwork = ...;
PKAddPaymentPassViewController *vc = [[PKAddPaymentPassViewController alloc] initWithRequestConfiguration:addRequest delegate:self];
if(vc) {
[self presentViewController:vc animated:YES completion:nil];
}
}
And I stuck here:
BOOL mayAddCard = [PKAddPaymentPassViewController canAddPaymentPass];
// mayAddCard == NO
First of all, I am running on simulator and iPhone 6s (iOS 11), developer builds. I already have merchant ID and Apple Pay Payment Processing certificate and Apple Pay Payment Processing and Wallet enabled in Developer account. I do not have that Apple private entitlement in my Provisioning Profile, though.
What should I do to get further?
Mainly, is it possible to test the addition to the Wallet on a test builds (without uploading to AppStore/TestFlight) at all?