Reputation: 110
Now I can update passes in Passbook with Push Notification, but when passes ared used on server, I want to inform Passbook to remove these passes, I can't find any solutions in the Documents.
I just know I can revoke removePass interface of PassKit in my App, the problem is the passes are not used through my App, but my another client App, so this method is not ok for me.
Anyone know is there any other solutions to fix this problem?
Upvotes: 1
Views: 1430
Reputation: 12591
There is no equivalent of removePass
for passes that do not have a companion App. The best you can do is to orphan the pass on the device by pushing an update with no webServiceURL
or authenticationToken
For our API, we invalidate passes by pushing a new pass with no barcode, no locations, no relevant date and no webServiceURL
or authenticationToken
. This leaves the user with a dead pass that cannot be scanned, cannot be updated and will not show any relevance notifications.
Once you have confirmed that the pass has been delivered you can safely delete it from your database.
Upvotes: 0
Reputation: 481
What you can do is to update the pass with data informing the user that this pass is no longer valid. Then when the user open Passbook and see the pass as outdated/blank, he or she will probably remove it.
Upvotes: 1
Reputation: 7689
It is not possible to remove passes from the Passbook using a push notification.
If passes were removed from the user's passbook without their interaction it might be confusing.
If you have an Expiry Date or similar on the pass, this would inform the user it was no longer valid.
Upvotes: 1