I'm trying to implement the new iOS 10 notification. I added an UNUserNotificationAction
to the content and registered the AppDelegate
as the delegate. This is working perfectly. When the user taps the action the app should open and then go to the specific View Controller afterwards. But what is the proper way to open the app? I saw a few solutions where UNUserNotificationActionOptions.foreground
where added to init(identifier:title:options:)
as the options.
Apple docs say this, however:
The action causes the app to launch in the foreground. When the user selects an action containing this option, the system brings the app to the foreground, asking the user to unlock the device as needed. Use this option for actions that require the user to interact further with your app. Do not use this option simply to bring your app to the foreground.
So, if I shouldn't use this, how do I get my app to open? What am I missing?
Thanks, Heiko