I found a crash issue. Tested iPhone 4 (iOS 7.1) and iPhone 5 (iOS 8).
These are the steps to reproduce:
- Put this in main.lua:
[lua]local GameThrive = require ( “plugin.GameThrivePushNotifications” )
local function DidReceiveRemoteNotification(message, additionalData, isFirstOpen)
print(“Notification”, message, additionalData, isFirstOpen)
end
GameThrive.Init(“abc123”, “123”, DidReceiveRemoteNotification)
local function onSystemEvent(event)
if event.type == “applicationSuspend” then
system.scheduleNotification(2, {alert = “Hey now”})
end
end
Runtime:addEventListener( “system”, onSystemEvent );
[/lua]
-
Build app, put on device and open it
-
Agree to notifications <-- Sometimes crashing here, but if not continue to next step
-
Suspend it
-
Local notification is shown in 2 seconds
-
Tap the local notification at top of screen
-
Crash 100% of the time
Log:
Oct 16 15:52:31 KT-100673-5179 SpringBoard[43] <Warning>: LICreateIconForImage passed NULL CGImageRef image
Oct 16 15:52:31 KT-100673-5179 delayedNotifications[224] <Error>: *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]’
*** First throw call stack:
(0x24b62e3f 0x32210c8b 0x24a83ad3 0x24a838b7 0x1764a9 0x176671 0x282698b5 0x2826d4a7 0x2826ca1b 0x2826c99d 0x28261c83 0x2b2951f9 0x2b2a40e9 0x24b295b5 0x24b28879 0x24b273b3 0x24a75621 0x24a75433 0x2be240a9 0x28060359 0x76883 0x32790aaf)
Oct 16 15:52:31 KT-100673-5179 locationd[63] <Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
Oct 16 15:52:31 KT-100673-5179 ReportCrash[225] <Error>: task_set_exception_ports(B07, 400, D03, 0, 0) failed with error (4: (os/kern) invalid argument)