Question

I am using push notifications extension and getting an error :

ReferenceError: Error #1065: Variable com.freshplanet.nativeExtensions::PushNotification is not defined.

These are the simple steps I followed so far:

1) added the extension in the properties/actionscript build path/native extensions . it is with a green flag and the .ane is located in my libs folder

2) added the extensionid to my app.xml file

<extensions> 
     <extensionID>com.freshplanet.AirPushNotification</extensionID> 
</extensions> 

3) registered in the app constructor :

PushNotification.getInstance().registerForPushNotification();

4) Do the following steps, which use Flash Builder 4.5.1:

Change the filename extension of the ANE file from .ane to .swc. This step is necessary so that Flash Builder can find the file.

Select Project > Properties on your Flash Builder project. Select the Flex Build Path in the Properties dialog box.

In the Library Path tab, select Add SWC....

Browse to the SWC file and select Open.

Select OK in the Add SWC... dialog box.

The ANE file now appears in the Library Path tab in the Properties dialog box.

Expand the SWC file entry. Double-click Link Type to open the Library Path Item Options dialog box.

In the Library Path Item Options dialog box, change the Link Type to External. Now you can compile your application using, for example, Project > Build Project. This is all done on iPad

Thanks for the help :-)

Was it helpful?

Solution 2

Well the problem was resolved by opening the project properties panel , in the actionscript build packaging selecting Apple ios, there under the native extensions tab select package for all the extensions needed in the project.

The confusing part here for me was that there are 2 places than need to add the native extensions, one is the actionscript build path and the second is the actionscript build packaging.

The step of renaming the package to .swc and adding it to the build is not need from what I understand.

OTHER TIPS

You don't need a native extension for this as it is part of AIR 3.4. See http://www.adobe.com/devnet/air/articles/ios-push-notifications.html for more information and a step-by-step guide on how to get it to work

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top