gpt4 book ai didi

iphone - 在 iPhone 的后台启动应用程序

转载 作者:行者123 更新时间:2023-12-03 21:08:41 26 4
gpt4 key购买 nike

有没有一种方法可以使用 url 方案方法在后台启动应用程序,或者如果它已经在后台运行,则调用它而不需要它(被调用者)来到前台?我听说这可以在 iOS 4.2 中完成,但当我使用时没有看到它

[[UIApplication 共享应用程序] openURL:url];

打开应用程序。谢谢,N.

最佳答案

看起来不可能。

If your application is not running when a URL request arrives, it is launched and moved to the foreground so that it can open the URL. The implementation of your application:didFinishLaunchingWithOptions: method should retrieve the URL from its options dictionary and determine whether the application can open it. If it can, return YES and let your application:openURL:sourceApplication:annotation: or application:handleOpenURL: method handle the actual opening of the URL.

If your application is running but is in the background or suspended, it is moved to the foreground to open the URL. Shortly thereafter, the system calls the delegate’s application:openURL:sourceApplication:annotation: to check the URL and open it. If your delegate does not implement this method (or the current system version is iOS 4.1 or earlier), the system calls your delegate’s application:handleOpenURL: method instead.

iOS Application Programming Guide

关于iphone - 在 iPhone 的后台启动应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4764289/

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