简体   繁体   中英

iOS: Is there a way to wake-up your app in the background if the user triggers a PassKit pass?

I'm looking into adding PassKit/Apple Wallet support into my iOS app. However I have a need to have my app ping a RESTful server when the user brings up a pass generated by our app. This would be in the situation where a pass notification was triggered by a geolocation, beacon, or time. Is there a way to do this? It looks to me like the user has to manually flip the pass over and click the app icon to launch the app. Thanks!

No, the PassKit APIs do not support anything of the kind—once a pass is in the library your app will not get woken up for anything other than, as you noted, the app link on the back of the pass. If you'd like an API for that, I'd recommend filing an enhancement request with the specific use-case you have in mind.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM