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>;
var subscribeOptions:RemoteNotifierSubscribeOptions = new RemoteNotifierSubscribeOptions();
subscribeOptions.notificationStyles = preferredNotificationStyles;
var rn:RemoteNotifier = new RemoteNotifier();
I was able to get this working by moving the code that deals with RemoteNotifier into its own actionscript class. I originally had it within the <script> of the Flex <view>.