简体   繁体   English

使用URL Scheme检测其他应用打开的应用

[英]Detect app opening by other app with URL Scheme

this is my scenery: 这是我的风景:

i need to show an alert box for customize settings when my app is opened or returned from background by user and another one when my app is opened or returned from background by other app through URL Scheme. 当我的应用程序由用户打开或从后台返回时,我需要显示一个自定义设置的警报框;当我的应用程序通过URL方案从其他应用程序从后台打开或从后台返回时,我需要显示一个警告框。

How can i do it? 我该怎么做?

The notification of openURL arrive later than view did load... openURL的通知晚于视图加载的时间...

thanks in advance 提前致谢

When your app comes back from the background, app delegate events will arrive in this order: 当您的应用从后台返回时,应用委托事件将按以下顺序到达:

  • applicationWillEnterForeground(_:)
  • application(_:open:options:)
  • applicationDidBecomeActive(_:)

Thus it is easy to know by the time the application becomes active whether this is because of a URL scheme or not. 因此,很容易在应用程序激活时就知道这是否是由于URL方案引起的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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