简体   繁体   中英

iOS 15 focus mode development

We can set up a focus status with customized turning on time and turning off time. I'd like to be notified when I am in my own app. Unfortunately INShareFocusStatusIntentHandling was not called when a system notification "Focus on" came out. Anybody know some solutions or ideas about it. Thanks ahead!

According to https://developer.apple.com/forums/thread/682143 you need to implement an Intents Extension from your app and have that extension share the results to the main app via UserDefaults or some other method. You cannot observe the focus state changes directly in your app.

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