gpt4 book ai didi

ios - 如何判断 handleOpenURL 是在应用程序启动时调用还是在应用程序运行时调用?

转载 作者:可可西里 更新时间:2023-11-01 04:16:06 24 4
gpt4 key购买 nike

由于事件的顺序根据这两种情况中的哪一种正在进行而略有不同,我希望能够分辨出不同之处。有什么建议吗?

最佳答案

您不应使用 handleOpenURL,因为它已被弃用。相反,请使用 application:openURL:sourceApplication:annotation:(自 iOS 4.2 起可用)。

Apple's documentation在此处给出有关 application:openURL:sourceApplication:annotation 的问题的答案:

If your app had to be launched to open the URL, the app calls the application:willFinishLaunchingWithOptions: and application:didFinishLaunchingWithOptions: methods first, followed by this method. The return values of those methods can be used to prevent this method from being called. (If the application is already running, only this method is called.)

关于ios - 如何判断 handleOpenURL 是在应用程序启动时调用还是在应用程序运行时调用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18334829/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com