Skip to main content
This topic has been closed for replies.

4 replies

Participant
March 1, 2012

For the delegate, I needed to dynamically subclass the existing UIApplicationDelegate and add the required call backs to it.  If I tried to create and set my own delegate, the app would crash every time one of adobes custom delegate methods is called, such as notifyAsyncMessage.  I have a reply with code sample on this page http://stackoverflow.com/questions/9204993/push-notification-ios-native-extension-for-adobe-air/9493911#9493911

Hope this helps

Inspiring
December 21, 2011

The answer is yes yes yes

http://forums.adobe.com/thread/940310#

Participant
September 27, 2011

I've successfully create a Native Extension that tries to register to APNS.

The problem seems to be that I got:

<Warning>: No valid 'aps-environment' entitlement string found for application 'XXXX': (null). Notifications will not be delivered.

in the device console.

aps-environment is generally set in the plist (for native apps) file or in the mobileprovision (If I'm not wrong).

I got the right value for aps-environment in the mobileprovision, but it seems ignored by the compiler.

I've tried to add it also to the application descriptor... nothing.

Any idea?

Thanks

Marco

September 27, 2011

Hi:

You will need to provide custom entitlements to enable APN. In order to do so. You will need to re-codesign the ipa generated by AIR SDK (AS AIR currently does not provide a way to specify custom entitlements). Following are the steps which might help you.

1. Create a custom entitlements.plist file I have pasted mine below:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

    <key>application-identifier</key>

    <string>XXXXXXXXXX.com.yourname.oranything</string>

    <key>keychain-access-groups</key>

    <array>

        <string>XXXXXXXXXX.com.yourname.oranything</string>

    </array>

    <key>aps-environment</key>

    <string>development</string>

    <key>get-task-allow</key>

    <true/>

</dict>

</plist>

where XXXXXXXXXX is a unique 10 digit app identifier prefix you can find in your mobileprovision or on iTunes Store Provisioning portal.

2. Now extract the .ipa file to get the Paylod folder

3. Now use the xcode codesign commandline tool to re-codesign with custom entitlements:

codesign -f -s "iPhone Developer: Your Name (XXXXXXXXXX)" "--resource-rules=./Payload/binary.app/ResourceRules.plist" --entitlements "/path/to/entitlement/file/Entitlements.plist" "./Payload/binary.app"

"iPhone Developer: Your Name (XXXXXXXXXX)" in above command comes from your key chain. It should have you developer certificate installed. The same will show this string.

4. Again compress the Payload folder as zip

5. Rename .zip to ipa.

6. Install and test. It should work!!

Known Participant
September 27, 2011

@marc_one

I haven't tried out the native extensions yet but I heard from an adobe evangelist that at Adobe Max 2011 there is going to be someone presenting this exact thing to use APN's. So if you can wait until then, you will get the code that you need. If you can find out who is presenting this part, they might have the code for the presentation somewhere on their blog/site.

Participating Frequently
June 30, 2011

Not at this time. In an upcoming release, it should be possible to integrate the native code necessary for this into your AIR app.

Known Participant
August 18, 2011

Has adobe given out any information on when this feature is planned to be available?

Inspiring
August 19, 2011

AIR 3.0 is in beta right now. http://labs.adobe.com/technologies/flashplatformruntimes/air3/

No public release date atm.