I am attempting to get push notifications working. I am building my app in FlashBuilder 4.6 using Starling 1.4.1 and AIR 3.9.
I have been referencing these two sources:
My app keeps crashing on the subscribe call. I have tried deploying to both an iPad4 and an iPhone4, both running iOS7. It crashes on both.
if (RemoteNotifier.supportedNotificationStyles.length > 0)
preferredStyles = new Vector.<String>();
preferredStyles.push(NotificationStyle.ALERT, NotificationStyle.BADGE, NotificationStyle.SOUND);
subscribeOptions = new RemoteNotifierSubscribeOptions();
subscribeOptions.notificationStyles = preferredStyles;
remoteNot = new RemoteNotifier();
The command that crashes the app is remoteNot.subscribe. I have tried putting that command in an activate event handler, and it still crashes (not right away, but when I minimize the app and then restore it). None of the remoteNot event handlers ever get called.
The app runs fine if I comment out that one line of code.
Anyone have any ideas or tips?