- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
未运行的应用在进入 iBeacon 区域时由 iOS 启动。第一个调用的方法是- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions。由于启动原因可能不同,我希望能够从启动选项中检测到启动是否是由于进入特定(我正在监视的)iBeacon 区域。这可能吗?
我从 ApplicationDelegate 文档中找到了以下内容,但我不认为这是正确的,因为它没有直接提及 iBeacons。
UIApplicationLaunchOptionsBluetoothCentralsKey The presence of this key indicates that the app previously had one or more CBCentralManager objects and was relaunched by the Bluetooth system to continue actions associated with those objects. The value of this key is an NSArray object containing one or more NSString objects.
Each string in the array represents the restoration identifier for a central manager object. This is the same string you assigned to the CBCentralManagerOptionRestoreIdentifierKey key when you initialized the central manager object previously. The system provides the restoration identifiers only for central managers that had active or pending peripheral connections or were scanning for peripherals.
Available in iOS 7.0 and later.
最佳答案
要查看信标检测是否启动了您的应用,请检查 UIApplicationLaunchOptionsLocationKey
。这不会告诉您哪个 CLBeaconRegion
条目启动了您的应用程序。为此,您必须等待后续的 didEnterRegion
并检查传递的值。
关于ios - 应用程序 didFinishLaunchingWithOption : detecting if app was launched after entering iBeacon region,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33563266/
所以我尝试使用此方法根据用户在设置包中选择的内容加载特定主题。当我插入 NSLog 时,它将加载默认的它们(现代主题),但它永远不会更改为粉红色主题。 每次启动应用程序时都会加载此方法,即使应用程序仍
iOS 4 用户正在使用我的应用程序并使其在后台运行,有新版本可用,并且用户从 App Store 下载该新版本。 下载并安装新版本后,我的应用程序是否会退出并重新启动,以便我可以确保 didFini
我在启用推送通知时遇到问题。 使用此代码,我尝试启用通知: - (BOOL)application:(UIApplication *)application didFinishLaunchingWit
我嵌入到一个环境 (Adobe AIR) 中,无法覆盖 didFinishLaunchingWithOptions。还有其他方法可以获得这些选项吗?它们是否存储在某个全局变量中?或者有人知道如何在 A
我在现有项目中面临一个奇怪的问题。 从早上开始,我就面临着来自火力基地的一次奇怪的崩溃。 它工作正常,没有任何问题,但从早上开始我就面临这个问题。 崩溃: *** Terminating app du
我附上了两个调用方法的线程,该方法应始终在主线程上运行: 这导致了崩溃,因为我正在尝试创建持久存储协调器。 最佳答案 堆栈具有误导性。崩溃与 didFinishLaunchingWithOptions
在 didFinishLaunchingWithOptions 中,您如何知道应用程序是从前台恢复还是新启动?我需要知道这个方法,因为有 2 个任务要运行,具体取决于 launchOptions 是什
我正在我的应用程序中实现推送通知,并且当应用程序打开时一切正常:收到通知时,我的方法 [self processRemoteNotification:pushNotification] 按预期触发。现
didFinishLaunchingWithOptions` 做了什么以及何时调用它? 此外,我正在寻找类似 Android 中的“事件生命周期”图表的图表。如果您知道,请分享。 最佳答案 应用委托(
我觉得我应该知道这一点,但我不知道,这总是让我感到困惑。 浏览示例代码和教程时,我有时会看到 AppDelegates 有一个 @property UIWindow* 窗口, 然后是 @synthes
我想知道如何在应用更新下载后再次调用 didFinishLaunchingWithOptions,因为我所有的函数调用都在那里。 我需要再次调用它 self.dataArray = [self rea
我已经从后台终止了该应用程序。终止应用程序后,我发送一个推送通知。我对将要调用的 AppDelegate 函数有两个疑问: 1。 didFinishLaunchingWithOptions 会被调用吗
当我发送推送通知并且我的应用程序处于打开状态或在后台并单击推送通知时,我的应用程序将重定向到 PushMessagesVc viewController (如预期的那样) 我使用如下代码: -(voi
在为 iOS 开发时,您应用的第一个入口点是 -[AppDelegate application:didFinishLaunchingWithOptions:]。此方法的返回类型是 BOOL。默认情况
我对显示本地通知有相当大的理解问题。据我在其他线程中阅读,首先使用应用程序创建并安排本地通知。 要显示该通知,必须使用委托(delegate) didFinishLaunchingWithOption
我正在将文件导出为 NSData 对象并将它们的文件类型与我的应用相关联。 然后我可以通过在设备上打开邮件来导入文件,然后单击该文件并使用它打开应用程序。 但是,这样做时我无法从 XCode 启动应用
我只是想在 didFinishLaunchingWithOptions 中显示带有动画的 View ,我的代码如下: - (BOOL)application:(UIApplication *)appl
我在 didFinishLaunchingWithOptions 中有这段代码: self.window = [[UIWindow alloc] initWithFrame:[[UIScreen ma
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launc
我在应用程序一开始就有以下内容:didFinishLaunchingWithOptions: - (BOOL)application:(UIApplication *)application didF
我是一名优秀的程序员,十分优秀!