代号 One 推送通知类型 4 在 iOS 崩溃
Codename One push notification type 4 crashes on iOS
我目前正在 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 而崩溃。
由于后台通知工作,这看起来像是回归。我已经为即将发布的版本提交了一个 here 到 investigate/resolve 的问题。
我目前正在 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 而崩溃。
由于后台通知工作,这看起来像是回归。我已经为即将发布的版本提交了一个 here 到 investigate/resolve 的问题。