Skip to main content
Inspiring
December 21, 2011
Question

Push notifications... at last!

  • December 21, 2011
  • 25 replies
  • 10519 views

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.

This topic has been closed for replies.

25 replies

Participating Frequently
December 21, 2011

Congratulations Anders!

If anyone is interested in my solution for APNs you can PM me too and you can give it a try here

http://flashsimulations.com/2011/12/16/apple-push-notification-service-native-extension-for-adobe-air/

Participant
January 1, 2012

hi anders and piotr did your soultion works with flash builder windows version or it must be used in mac ???

Inspiring
January 2, 2012

Seems like you need to use Mac when building the IPA.

You still need Mac when submitting to iTunes though. (I run Mac with WMware in Windows)