Reputation: 1063
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?
Upvotes: 3
Views: 6124
Reputation: 256
You can still push provision a card to apple wallet without using appstore or testflight. You have to hit apple's sandbox(QA) environment. For that you can request apple to give the profiles to change your device wallet to sandbox. Then you can push provision your test cards to wallet(sanbox).
Upvotes: 2
Reputation: 1063
Seems that it is completely impossible.
According to In-App Provisioning Getting Started Guide:
XII. Testing Prior to Release on the App Store
Testing will occur through the use of the production environments. The iOS app will be distributed for testing purposes via the production App Store after the necessary approvals. A few points to note:
The issuer must also provide the Adam ID, the numeric Apple ID of the application, to [email protected] prior to testing.
The distribution of the app for testing purposes must be through the use of Promo Codes. Please look here for more information on the use of Promo Codes for limiting the distribution of an app via the App Store.
Be sure to select “Manual Release” when submitting your app for App Review, otherwise you may inadvertently release the test app to the general public.
Once testing is complete, the app can be made available for public download by selecting “Release This Version” within iTunes Connect. In case changes have been made to the app after inclusion on the App Store for testing, you will need to “Cancel This Release” within iTunes Connect. You can then re-submit your corrected app to the App Store for approval. Please click here for additional information on this part of the process.
Please note that Test Flight can not currently be used to distribute apps for In-App Provisioning testing.
Upvotes: 3