Its always difficult developing iOS apps on Windows as we don’t have access to the native stuff. While using Native Extensions for iOS devices we often miss-configure the application xml.

I used the example application for using Apple Push Notifications mentioned here – http://flashsimulations.com/2011/12/16/apple-push-notification-service-native-extension-for-adobe-air/

We need to follow the following steps in order to use Native Extensions for iOS on Windows using Flash Builder 4.6 and AIR 3.1:

- We need to add the app id configured in apple’s developer portal.

<!– A universally unique application identifier. Must be unique across all AIR applications.
Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. –>
<id>com.riaxe.testapp</id>

- We need to copy the Entitlements present in the pList file from the mobileprovision file

We can get the Entitlements from the mobileprovision file that we use. We can get the mobileprovision file from the apple’s developer portal.

We can copy the XML from the file under Entitlements section.

<key>Entitlements</key>
<dict>
<key>application-identifier</key>
<string>LACP5QKG47.com.riaxe.testapp</string>
<key>get-task-allow</key>
<true/>
<key>keychain-access-groups</key>
<array>
<string>LACP5QKG47.*</string>
</array>
</dict>

- We need to add the Entitlements XML structure onto the Application XML

<iPhone>
<Entitlements>
<![CDATA[
<key>application-identifier</key>
<string>LACP5WER47.com.riaxe.testapp</string>
<key>get-task-allow</key>
<true/>
<key>keychain-access-groups</key>
<array>
<string>LACP5WER47.*</string>
</array>
]]>
</Entitlements>
<InfoAdditions><![CDATA[
<key>UIDeviceFamily</key>
<array>
<string>1</string>
<string>2</string>
</array>
]]></InfoAdditions>
<requestedDisplayResolution>high</requestedDisplayResolution>
</iPhone>

Done!!! This would definitely fix build issues in Flash Builder 4.6 for iOS devices.

Share