Skip navigation
DanFl1020
Currently Being Moderated

RemoteNotifier events not firing after invoking subscribe method

Jul 15, 2013 7:45 AM

I am creating an iOS application.  I need to use APNS.  The application is set up at Apple and is working, but I am unable to test Push Notifications because I am unable to get a device token.  From my understanding issuing RemoteNotifier.subscribe should cause RemoteNotificationEvent.TOKEN to fire.  This never happens.  The code is below.  None of the RemoteNotifier events fires.

 

var preferredNotificationStyles:Vector.<String> = new Vector.<String>;

 

preferredNotificationStyles.push(NotificationStyle.ALERT);

preferredNotificationStyles.push(NotificationStyle.SOUND);

preferredNotificationStyles.push(NotificationStyle.BADGE);

 

var subscribeOptions:RemoteNotifierSubscribeOptions = new RemoteNotifierSubscribeOptions();

subscribeOptions.notificationStyles = preferredNotificationStyles;

 

var rn:RemoteNotifier = new RemoteNotifier();

 

rn.addEventListener(RemoteNotificationEvent.TOKEN, sendDeviceTokenToServer);

rn.addEventListener(RemoteNotificationEvent.NOTIFICATION, notificationReceivedByApp);

rn.addEventListener(StatusEvent.STATUS, subscriptionFailureCallback);

 

rn.subscribe(subscribeOptions);

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points