PKAddPaymentPassRequestConfiguration *request =[[PKAddPaymentPassRequestConfiguration alloc] initWithEncryptionScheme:PKEncryptionSchemeRSA_V2];
request.cardholderName = @"***";
request.primaryAccountSuffix = @"****";
request.localizedDescription = @"This will add the card to Apple Pay";
request.primaryAccountIdentifier = @"Primary";
request.paymentNetwork = @"Primary";
PKAddPaymentPassViewController *addPaymentPassViewController = [[PKAddPaymentPassViewController alloc] initWithRequestConfiguration:request delegate:self];
每次addPaymentPassViewController为零 并获得以下消息 缺少权利:com.apple.developer.payment-pass-provisioning
我在info.plist文件中将com.apple.developer.payment-pass-provisioning添加为YES。