I am developing an App that allows a user to Add Cards a payment pass in the Wallet via the App. In order to do this, you must be request Apple to add the following entitlement
I'm also using "com.apple.developer.payment-pass-provisioning" these entitlements in my app Apple granted this entitlement for my team ID modified my provisioning profile with this entitlement enabled.
Trying to invoke the Add card screen in the Wallet app from My application using the below code
PKAddPaymentPassRequestConfiguration *request;
request.cardholderName = @"xxxxxxxx";
request.primaryAccountSuffix = @"xxxx";
request.localizedDescription = @"This will add the card to Apple Pay";
request.primaryAccountIdentifier = @"test";
request.paymentNetwork = @"Test";
PKPassLibrary *libra;
[libra openPaymentSetup];
PKAddPaymentPassViewController *vc = [[PKAddPaymentPassViewController alloc] initWithRequestConfiguration:request delegate:self];
vc.delegate = self;
[self presentViewController:vc animated:YES completion:nil];
App is getting crash. with the error passing Nil
value to the viewcontoller.
libra
variable isnil
because you need to initialise it with an instance ofPKPassLibrary
– GourdPKAddPaymentPassRequestConfiguration
its not prepopulating. Can you please tell me where i'm missing..... – Bozuwa