Acknowledgments 

Prerequisites

ANE Package Content


Integration Instructions : 

  1. Download the ANE+SWC files from the Appoxee Download Page.
  2. Create a new ActionScript Mobile Project, as shown in the image.
  3. Name your project , as shown in the image.
  4. In the new project's dialog under Platform Settings choose the Device target family. Make sure that "Apple iOS" is ticked under "Target Platforms"
  5. in the new project's dialog under Build Paths tab, in the Library Path tab, Add the Appoxee SWC. add other SWC files if you use other 3rd party libs.
  6. in the new project's dialog under Build Paths tab, in the Native Extensions tab, Add the Appoxee ANE. add other ANE files if you use other 3rd party libs.
  7. After the project is generated, go into it's properties,Make sure all ANE files you added including Appoxee's are ticked on. Press OK.


  8. In your app's main .as file , add the following code : 

    //Add this to imports : 
    import com.appoxee.AppoxeeANE;
    
    //Add this to class : 
    private var _appoxeeANE:AppoxeeANE;
    
    //Add the class's constructor : 
    _appoxeeANE = new AppoxeeANE("","",handleIncomingPushMessage);
    ...
    //Add this method to get notified when push messages arrive to the device
    private function handleIncomingPushMessage(payload:String):void {
    			trace("Handle Incoming Push Message Called with : "+result);
    			//handle push payload in callback
    } 

    The method handleIncomingPushMessage() id the method that will be called every time a push notification will be received by the device. Further explanation on using the Incoming Push Notification Callback Method can be found here.

  9. Make sure to package the AppoxeeConfig.plist in your application, and fill the SDK key. The AppoxeeConfig.plist file should reside in the iOS application main bundle. In case that AppoxeeConfig.plist isn't present in the main iOS application bundle, the SDK will not engage.

    Creating AppoxeeConfig.plist:




    <?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>sdk</key>
            <dict>
                <key>sdk_key</key>
                <string></string>
                <key>is_eu</key> <!-- Optional, indicate if account is EU / US -->
                <false/>
                <key>open_landing_page_inside_app</key> <!-- Optional, indicate if landing page should open inside the app or via Safari -->
                <false/>
            </dict>
        </dict>
    </plist>




  10. This conclude the basic integration of the ANE. Click here to see API usage.