Push notifications... at last!
For several weeks I have been working an ANE for iOS Push Notifications (APNS). I now have a beta with the following specs.
Methods:
registerForAPN( badges : Boolean = true, sounds : Boolean = true, alerts : Boolean = true, newsStandContent : Boolean = false ) : void;
unregisterForAPN() : void;
askForAPNtypes() : void;
setLocalBadge( badgeNumber : Number) : void;
Last method doesn't really have to do with APN, but was build in because you probably will need it.
All methods are void. For consistency all data is sent back through events.
Events:
REGISTERING - Just for debugging. Means registerForRemoteNotificationTypes was called.
REGISTERED - Means registration was successful. Returns deviceToken on event.deviceToken
FAILED - Means registration failed. Returns error string on event.info
UNREGISTERING - Just for debugging. Means unregisterForRemoteNotifications was called.
NOTIFICATION - Returns the payload of an APN as a string on event.info (not yet thoroughly tested, since I don't need it in my own implementation)
TYPES - Returns the currently registered APN-types as booleans on event.types.badges, event.types.sounds, event.types.alerts, event.types.newsStandContent.
Send me a PM with your e-mail address if you are interested in this ANE. Source code will not be released, just a ready-to-use ANE.