从Banner /自定义操作启动应用程序时未调用applicationDidBecomeActive [英] applicationDidBecomeActive not called when launching app from Banner/custom action

查看:169
本文介绍了从Banner /自定义操作启动应用程序时未调用applicationDidBecomeActive的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试实施iOS-8的新交互式通知时,我遇到了这个奇怪的问题。在处理本地通知时,一切都按预期工作,但是当涉及APNS时 - 事情不能很好。

I'm facing this weird problem while trying to implement iOS-8's new Interactive Notifications. When dealing with Local Notifications everything works as expected, but when it comes to APNS - things do not work well.

详细信息:我得到自定义推送,因为它应该通过横幅(我只注册到最小上下文),但是当用户点击代表自定义操作的按钮时,我的应用程序的委托 applicationDidBecomeActive:不会被调用;事实上 - 应用程序陷入了非活动模式。

In details: I get the custom push as it should through the banner (I register only to the minimal context), but when the user taps the button that represents the custom action, my application's delegateapplicationDidBecomeActive: is not called; In fact - the app gets stuck on an inactive mode.

奇怪的是,从通知屏幕启动时,应用程序确实进入活动模式(从右到右)今日)。
除此之外,在这两种情况下,我的代表:

The weird thing is that the app does go to active mode when launched from the Notifications screen (The one to right of the Today). Beside that, on both cases, my delegate:

handleActionWithIdentifier:forRemoteNotification:completionHandler:

使用正确的标识符进行调用。

does get called with the right Identifier.

任何帮助都将是非常感谢!

Any help would be very much appreciated!

推荐答案

看起来这是一个iOS 8 Bug。在Urban Airship的iOS更改日志文档中找到以下内容:

Looks like this is an iOS 8 Bug. Found the following on Urban Airship's iOS change log document:


iOS 8 Notes(2014年9月25日更新)

iOS 8 Notes (Updated September 25, 2014)

iOS 8.0.0中可能会影响您的应用程序的已知问题:
- 从交互式通知启动时,应用程序不会进入活动状态,后续应用程序会话不会收到
应用程序:didBecomeActive委托调用或

UIApplicationDidBecomeActiveNotification通知。应用程序
状态永远不会转换为非活动(雷达#18179525)。这笔
将影响使用
互动通知的申请报告的准确性。

Known issues with iOS 8.0.0 that may impact your application: - Applications do not enter the 'active' state when started from an interactive notification and subsequent app sessions do not receive the application:didBecomeActive delegate call or
UIApplicationDidBecomeActiveNotification notification. The application state never transitions out of 'inactive' (Radar #18179525). This will impact the accuracy of reporting for applications using interactive notifications.

http://docs.urbanairship.com/reference/libraries/ios/latest/ios_changelog.txt

我没有发现任何迹象表明这已经在最新的iOS 8版本中得到修复,包括8.1和8.2-Beta,也没有解决方法。

I Did not find any indication that this had been fixed in the latest iOS 8 versions, including 8.1 and 8.2-Beta, nor any workaround to deal with it.

这篇关于从Banner /自定义操作启动应用程序时未调用applicationDidBecomeActive的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆