Hi, I have a problem with local notifications. App crashes when trying to get back in app with local notification.
I copied the Kitchen Sink sample but modified a bit the bg.js.
In bg.js, there is something like this:
Titanium.App.addEventListener('whatever', function(e){ var myNotification = Titanium.App.iOS.scheduleLocalNotification({ alertBody: msg_body, alertAction: "Yup", userInfo: {"key": "value"}, date:new Date(new Date().getTime()) }); }Well, this is not my exact code, but this is the spirit. I tried to remove everything useless, but can't find the answer...
Here is the crash report header: https://gist.github.com/956064
Is this is a somewhat documented problem?
2 Answers
Answer here: http://stackoverflow.com/questions/5890181/titanium-mobile-local-notification-crashes
Just incase it is not clear.
The solution is to make an array, and increment the array with each notification. For me, the simulator crashed when not an array. Yet pushing it to the iphone it worked fine. Once both are array, no problems.
What would be great is if somebody with great powers "link" or "close" other issues which are clearly the same.
http://developer.appcelerator.com/question/119302/local-notification-crashes
Thanks for the link Jean-Phillippe.
Your Answer
This question has been locked and cannot accept new answers.