ios - 如果我在 didFinishLaunchingWithOptions 中返回 false 会发生什么?

标签 ios uiapplicationdelegate

我尝试在 didFinishLaunchingWithOptions 方法中返回 false,但没有任何反应,我的应用程序成功运行,任何人都可以告诉我为什么这个东西有效,以及这里有什么区别(true/false)。

最佳答案

它不会确定应用程序是否启动,只是确定它是否可以处理“选项”。

Return Value

false if the app cannot handle the URL resource or continue a user activity, otherwise return true. The return value is ignored if the app is launched as a result of a remote notification.

Ref: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622921-application

关于ios - 如果我在 didFinishLaunchingWithOptions 中返回 false 会发生什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56232724/

相关文章:

ios - 如何删除 UITableViewCell 第一行的垂直间距

ios - 在 UITableViewController 中处理多个计时器值?

objective-c - 在 applicationDidBecomeActive 中捕获 launchOptions

ios - 在 AppDelegate.m 上设置 label.text

cocoa-touch - 收到applicationDidEnterBackground时退出app而不是进入后台

ios - 如何增加变量末尾的数字?

ios - NumberFormatter 无法使用 Xcode 15.0 beta 正确识别 iOS 17 beta 中的区域设置货币设置

ios - 在 UISearchController 中隐藏搜索栏上的取消按钮

ios - 如果从通知或跳板触发,如何在 applicationDidBecomeActive 中确定?

objective-c - View Controller 委托(delegate)