【问题标题】:Titanium Crash when App is on Foreground and receives a Push Notification message (IOS)当 App 处于前台并收到推送通知消息 (IOS) 时 Titanium Crash
【发布时间】:2016-08-14 21:11:18
【问题描述】:

我正在使用带有节点 js 的 aps 自定义服务器。当应用程序处于后台时,推送消息接收正常,但当应用程序处于前台时,iOS 崩溃:

出现此错误:

-[TiApp application:didReceiveRemoteNotification:]: 无法识别的选择器发送到实例。

我的系统变量:

Operating System
  Name                        = Mac OS X
  Version                     = 10.11.4
  Architecture                = 64bit
  # CPUs                      = 4
  Memory                      = 8589934592
Node.js
  Node.js Version             = 0.12.7
  npm Version                 = 2.11.3
Titanium CLI
  CLI Version                 = 5.0.9
Titanium SDK
  SDK Version                 = 5.3.1.GA
  SDK Path                    = /Users/myuser/Library/Application Support/Titanium/mobilesdk/osx/5.3.1.GA
  Target Platform             = iphone

堆栈跟踪

 -[TiApp application:didReceiveRemoteNotification:]: unrecognized selector sent to instance 0x147d1d650
[ERROR] :  The application has crashed with an uncaught exception 'NSInvalidArgumentException'.
[ERROR] :  Reason:
[ERROR] :  -[TiApp application:didReceiveRemoteNotification:]: unrecognized selector sent to instance 0x147d1d650
[ERROR] :  Stack trace:
[ERROR] :  
[ERROR] :  0   CoreFoundation                      0x00000001813fedb0 <redacted> + 124
[ERROR] :  1   libobjc.A.dylib                     0x0000000180a63f80 objc_exception_throw + 56
[ERROR] :  2   CoreFoundation                      0x0000000181405c4c <redacted> + 0
[ERROR] :  3   CoreFoundation                      0x0000000181402a1c <redacted> + 408
[ERROR] :  4   CoreFoundation                      0x0000000181300c5c _CF_forwarding_prep_0 + 92
[ERROR] :  5  MyApp                            0x00000001002707f4 MyApp + 2017268
[ERROR] :  6   UIKit                               0x00000001868161a8 <redacted> + 2676
[ERROR] :  7   UIKit                               0x0000000186803f84 <redacted> + 136
[ERROR] :  8   FrontBoardServices                  0x0000000182d9f7ac <redacted> + 36
[ERROR] :  9   FrontBoardServices                  0x0000000182d9f618 <redacted> + 168
[ERROR] :  10  FrontBoardServices                  0x0000000182d9f9c8 <redacted> + 56
[ERROR] :  11  CoreFoundation                      0x00000001813b509c <redacted> + 24
[ERROR] :  12  CoreFoundation                      0x00000001813b4b30 <redacted> + 540
[ERROR] :  13  CoreFoundation                      0x00000001813b2830 <redacted> + 724
[ERROR] :  14  CoreFoundation                      0x00000001812dcc50 CFRunLoopRunSpecific + 384
[ERROR] :  15  GraphicsServices                    0x0000000182bc4088 GSEventRunModal + 180
[ERROR] :  16  UIKit                               0x00000001865c6088 UIApplicationMain + 204
[ERROR] :  17  Cablecol                            0x0000000100089658 Cablecol + 22104
[ERROR] :  18  libdyld.dylib                       0x0000000180e7a8b8 <redacted> + 4
[ERROR] :  *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[TiApp application:didReceiveRemoteNotification:]: unrecognized selector sent to instance 0x147d1d650'
[ERROR] :  *** First throw call stack:
[ERROR] :  (0x1813fedb0 0x180a63f80 0x181405c4c 0x181402a1c 0x181300c5c 0x1002707f4 0x1868161a8 0x186803f84 0x182d9f7ac 0x182d9f618 0x182d9f9c8 0x1813b509c 0x1813b4b30 0x1813b2830 0x1812dcc50 0x182bc4088 0x1865c6088 0x100089658 0x180e7a8b8)
[LiveView] Client disconnected

欢迎提出任何建议。


我在回答自己。

尝试不使用 LiveView 后,应用程序不会崩溃,因此这是 liveview 中的一个错误。我已经建议改进 JIRA。我已经用 5.3.1.GA 和 5.4.0.GA 验证了这个错误。

【问题讨论】:

  • 您能否在推送负载中显示您收到的 JSON 数据格式?
  • 我认为您应该尝试禁用 LiveView,因为不建议将 LiveView 用于推送通知。
  • 感谢您回复 Prashant Saini,我无法向您显示有效负载,因为它在我将有效负载记录到回调之前崩溃。可能是实时取景,我会测试一下,看看会发生什么。
  • 为什么你看不到有效载荷并且它崩溃了......如果真的是这种情况,那么我相信有效载荷应该没有问题......只是环境有问题。 ...有效负载格式将帮助我们将您的场景与我们的工作推送集成相匹配。希望很快能听到你解决问题的消息:)
  • 请用实际答案回答问题,而不是编辑您的问题。如果答案会出现,那就太好了;)

标签: ios titanium push appcelerator aps


【解决方案1】:

我在回答自己。

尝试不使用 LiveView 后,应用程序不会崩溃,因此这是 liveview 中的一个错误。我已经建议改进 JIRA。我已经用 5.3.1.GA 和 5.4.0.GA 验证了这个错误。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-05-11
    • 1970-01-01
    • 2019-06-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-10-21
    相关资源
    最近更新 更多