App crashes on receiving push notification

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
shoshinsha
Posts: 35
Joined: Fri Jul 18, 2014 5:17 am

App crashes on receiving push notification

Post by shoshinsha » Fri Jul 18, 2014 6:04 am

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.

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: App crashes on receiving push notification

Post by LCNeil » Fri Jul 18, 2014 10:03 am

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.

Code: Select all

   send "doFunctions" to me in 1 second
Kind Regards,


Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com

shoshinsha
Posts: 35
Joined: Fri Jul 18, 2014 5:17 am

Re: App crashes on receiving push notification

Post by shoshinsha » Tue Jul 29, 2014 3:00 am

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... :(

Post Reply