Quantcast
Channel: flashsimulations.com » flash builder
Viewing all articles
Browse latest Browse all 2

Apple Push Notification Service native extension for Adobe AIR

$
0
0

Here’s another AIR native extension for iOS I’m currently working on – Apple Push Notification Service (APNs) support.
It’s almost complete – the most important things are there. You can register to APNs, get your device token and receive remote notification in ActionScript – everything that you need to build a great app.

Grab the source from github: https://github.com/pkoscierzynski/NativeAPNService

To run the example you need to go to Apple Developer Portal and create a new application id, generate push notification certificates and a new mobile provisioning profile.
I’d recomend this tutorial by Matthijs Hollemans, it’s very detailed and self explanatory (like all the tutorials on Ray’s site).
Apple Push Notification Services Tutorial: Part 1/2

I also used php sample to publish my message to APNs sandbox servers. Follow the tutorial step by step and you should get everything working.

When you’ll have your app id and be sure to put it in the apropriate xml tags of AIR application descriptior.
In AIR 3.1, application descriptor has a new section for iOS apps – Entitlements. In Entitlements section you need to provide the id of you application, otherwise the APN won’t work (this section is the content of Entitlements.plist file known from native Xcode / Objective-C).

Adobe AIR application descriptor. iPhone Entitlements section.

Apple Push Notifications in Adobe AIR iOS application from Piotr Koscierzynski on Vimeo.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images