if (@available(iOS 13.4, *)) {
NSArray<PKSecureElementPass *> *secureArray = [passLib remoteSecureElementPasses];
NSLog(@"Number of passes in library are: %lu", (unsigned long)[secureArray count]);
if ([secureArray count] > 0) {
PKSecureElementPass *onePass = [secureArray objectAtIndex:0];
NSLog(@"One pass: %@", onePass);
PKPaymentPass *paymentPass = [onePass paymentPass];
if (paymentPass) {
NSLog(@"Pass activation code: %lu", (unsigned long)[paymentPass activationState]);
NSLog(@"AuthenticationToken: %@, DeviceAccountIdentifier: %@, PrimaryAccountNumberSuffix: %@",
[paymentPass authenticationToken],
[paymentPass deviceAccountIdentifier],
[paymentPass primaryAccountNumberSuffix]);
}
}
} else {
// Fallback on earlier versions
}
I try to use "remoteSecureElementPasses", but either distribute certificate or development certificate, the array's count is always 0.