Closed sohitEngg closed 4 years ago
Adding more code for the checking the pass will resolve this problem. Here below is the desired code.
PKPassLibrary* passLib = [[PKPassLibrary alloc] init]; //check if pass library contains this pass already if([passLib containsPass:newPass]) { //pass already exists in library, show an error message UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:@"Pass Exists" message:@"Pass is already in Passbook." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alertView show]; result([NSNumber numberWithBool:YES]); } else { result([NSNumber numberWithBool:NO]); }
Currently I am looking for a library which can add the pass to wallet and check if pass is already present in the wallet, I am able to add pass into wallet by this library. Thank you for providing this library to world.
Can you please tell me some way so that I would be able to check the pass is present in wallet or not.