Hi,
I am developing an app that receives push notifications but I'm having problem where the app will crash/exit automatically when:
- user taps on the push notification and launch the app
- notification arrives when app is still active
I've only used simple functions within the pushNotificationReceived:
on pushNotificationReceived tMessage
##update status on given field to "Notification Received"
......
##do some functions
......
end pushNotificationReceived
Really appreciate it if anyone can help me out. Thanks!!
p.s. I'm using LC version 6.6.2 to publish my app.
App crashes on receiving push notification
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 35
- Joined: Fri Jul 18, 2014 5:17 am
Re: App crashes on receiving push notification
Hi shoshinsha,
This sounds like a bug as the app should not crash after functions are executed when a push notification is received. Have you tried removing the functions to see if the crash still occurs?
You may wish to try waiting a short amount of period, after the push notification opens the app, to execute any handlers that call your functions as this may provide a solution. Something like a non-blocking "send in time"
e.g.
Kind Regards,
Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
—
This sounds like a bug as the app should not crash after functions are executed when a push notification is received. Have you tried removing the functions to see if the crash still occurs?
You may wish to try waiting a short amount of period, after the push notification opens the app, to execute any handlers that call your functions as this may provide a solution. Something like a non-blocking "send in time"
e.g.
Code: Select all
send "doFunctions" to me in 1 second
Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
—
-
- Posts: 35
- Joined: Fri Jul 18, 2014 5:17 am
Re: App crashes on receiving push notification
Hi Neil,
Thanks for your reply!
I've tried using the send in time function but it's still the same...
I've tried removing the functions within onPushNotificationReceived as well. The result is the same...
Thanks for your reply!
I've tried using the send in time function but it's still the same...
I've tried removing the functions within onPushNotificationReceived as well. The result is the same...
