Is there a way to detect if user was already in yo

2019-07-25 20:54发布

Is this possible to know inside my Siri intent handler if the user was in my app before launching Siri?

1条回答
We Are One
2楼-- · 2019-07-25 21:59

You can use App Groups to share data between your app's main target and your Siri intent handler. You could simply store a Bool in UserDefaults indicating whether your app was already launched or not, then access the same value using App Groups from your Siri intent handler.

For more information on App Groups, see the App Extension Programming Guide.

查看更多
登录 后发表回答