【问题标题】:Codename One push notification type 4 crashes on iOS代号一推送通知类型 4 在 iOS 上崩溃
【发布时间】:2016-06-09 12:44:23
【问题描述】:

我目前正在 iOS 上尝试推送通知。发送类型 4 的通知时,应用在运行时直接崩溃。如果它没有运行,推送通知会正确显示,但是当点击通知时,应用程序会在启动时崩溃,并出现以下异常:

由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:“-[__NSCFDictionary UTF8String]:无法识别的选择器已发送到实例 0x17fd5aa0”

来自我的 iPad 的完整日志:

Jun  8 15:31:56 iPad-von TCApp[562] <Warning>: Received notification while running: {
        aps =     {
            alert =         {
                body = "Test Body";
                title = "Notification Test";
            };
            sound = default;
        };
    }
Jun  8 15:31:56 iPad-von TCApp[562] <Error>: -[__NSCFDictionary UTF8String]: unrecognized selector sent to instance 0x17fd5aa0
Jun  8 15:31:56 iPad-von TCApp[562] <Error>: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary UTF8String]: unrecognized selector sent to instance 0x17fd5aa0'
    *** First throw call stack:
    (0x22efb91b 0x22696e17 0x22f012b5 0x22efeee1 0x22e2a238 0x36511 0x38ed3 0x27723e01 0x27712ecb 0x2459ec07 0x2459eab9 0x2459edb9 0x22ebddff 0x22ebd9ed 0x22ebbd5b 0x22e0b229 0x22e0b015 0x243fbac9 0x274dd189 0x4671af 0x894e3 0x1da62b 0x434187 0x4341bf 0x29e58)
Jun  8 15:31:56 iPad-von SpringBoard[47] <Warning>: HW kbd: Failed to set (null) as keyboard focus
Jun  8 15:31:56 iPad-von com.apple.xpc.launchd[1] (UIKitApplication:de.mypackage.in.TCAppcn1[0x812c][562]) <Notice>: Service exited due to signal: Abort trap: 6
Jun  8 15:31:56 iPad-von SpringBoard[47] <Warning>: Application 'UIKitApplication:de.mypackage.in.TCAppcn1[0x812c]' crashed.
Jun  8 15:31:56 iPad-von UserEventAgent[23] <Warning>: 1764032310646: id=de.mypackage.in.TCAppcn1 pid=562, state=0
Jun  8 15:31:56 iPad-von ReportCrash[564] <Error>: assertion failed: 13F69: libsystem_trace.dylib + 15927 [FCFC8D6B-F8E1-3577-84A7-8A591C88D819]: 0x0
Jun  8 15:31:56 iPad-von Unknown[564] <Error>: 
Jun  8 15:31:56 iPad-von ReportCrash[564] <Warning>: os_activity_diagnostic_for_pid() failed!
Jun  8 15:31:56 iPad-von ReportCrash[564] <Notice>: Formulating report for corpse[562] TCApp
Jun  8 15:31:56 iPad-von ReportCrash[564] <Warning>: Saved type '109(109_TCApp)' report (5 of max 25) at /var/mobile/Library/Logs/CrashReporter/TCApp-2016-06-08-153156.ips

我正在将带有 url 编码格式的邮递员请求发送到新的推送服务器 https://push.codenameone.com/push/push。 (当我通过 PHP 发送通知时,我得到了同样的例外)

token:****
type:4
auth:****
certPassword:***
cert:****
body:Notification Test;Test Body
production:false
device:cn1-ios-****

为了调试,我没有在 PushCallback 的 push 方法中实现任何东西。请注意,它不会因类型 3 崩溃。

【问题讨论】:

    标签: codenameone


    【解决方案1】:

    由于后台通知工作,这看起来像是一种回归。我已经提交了一个问题here 来调查/解决它以供即将发布的版本使用。

    【讨论】:

      猜你喜欢
      • 2017-03-09
      • 1970-01-01
      • 1970-01-01
      • 2023-03-12
      • 1970-01-01
      • 1970-01-01
      • 2013-01-26
      • 2018-12-18
      相关资源
      最近更新 更多