Posts

Post not yet marked as solved
1 Replies
1.1k Views
Hello,Since I last asked the question:Disable Apple Pay UI when 13.56Mhz detection , it seems that the Operating System UIAlertView indicating the Apple Pay will be disabled is randomly and frecuently prompted to some users. We just request it when it is neccessary, and as far as I know that system UIAlertView should be shown just once per app/installation.Apple Documentation:"The first time this method is called, the system alerts the user that Apple Pay is unavailable. This alert isn’t displayed again until the app is uninstalled and reinstalled"Here is the piece of code I execute on the viewDidLoad method of the specific controller:- (void)suppressApplePayIfNeeded { @try { if (IS_OS_9_OR_LATER && [PKPassLibrary isPassLibraryAvailable] && ![PKPassLibrary isSuppressingAutomaticPassPresentation]) { tokenPKSuppresion = [PKPassLibrary requestAutomaticPassPresentationSuppressionWithResponseHandler:^(PKAutomaticPassPresentationSuppressionResult result) { if (result != PKAutomaticPassPresentationSuppressionResultSuccess) { NSLog(@"Apple Pay suppression failed, result: %lu", (unsigned long)result); } else { NSLog(@"Apple Pay suppression succeeded"); } }]; } } @catch (NSException *ignored) { NSLog(@"Apple Pay suppression start exception"); } }What am I doing wrong?Thanks in advance
Posted
by GoRoS.
Last updated
.