Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to create ANE file for In app purchase for iOS

    • 0
    • 2
    • 0
    • 0
    • 0
    • 0
    • 0
    • 1
    • 1.79k
    Comment on it

    Hi Readers,

    This is the video blog where you can find how you can create ANE file for In-App purchase for iOS framework. I have used MAC machine to create it.

    Requirements:

    1. Download ANE-In-App-purchase from GitHub.
    2. Download Air SDK Compiler
    3. Download Apache Ant
    4. Download Java SDK

    Note: I am using Air SDK 17.0 version. So, while creating I have used 17.0 at necessary places. You need to change it to the current version to make the ANE file properly.

    Once this is downloaded, here are some steps that you need to follow. I have explained all the steps in the video. But for reference, I am putting up here as well:

    1. Set up paths for Adobe AIR and Apache Ant
    2. Go to Terminal and write sudo nano /etc/paths. Enter the system password.
    3. Go to the last line and add paths for both Air SDK Compiler and Apache ANT. You have to add path upto bin. Drag and drop the folder "bin" from finder to the paths file that is opened. Make sure there is no space after "bin" other wise the command won't work.
    4. Press Ctrl-O, Enter and then Ctrl-X.
    5. You need to quit the terminal and open it again to check if the commands work.
    6. Run "adt" and "ant" command one by one. Test it by running command without quotes ("). For "adt", it will display Adobe AIR and the version. For "ant" command, it will display "build.xml not found". Thats ok, we will be running that command later. This is just to make sure that the paths have been properly set up.
    7. Run "java -version" to check whether java is installed in the system. If not, then can run the Java dmg that we have downloaded earlier from the links given above. Check again by running "java -version" command. Make sure you don't put quotes(").
    8. Go to the finder now. Go to the Air sdk compiler -> include folder and copy "FlashRuntimeExtensions.h" file.
    9. Now, unzip the downloaded GitHub code and go to the ios->InAppPurchaseIosExtension folder. Paste the "FlashRuntimeExtensions.h" file here.
    10. Create copy of example.build.config file located in the build folder in "ANE-In-App-Purchase-master" folder and name it build.config .
    11. Open "build.config" file in any editor, I have used Xcode here. Change the properties as mentioned in video.
    12. Open "platform.xml" file and change the extension to "17.0" as the Air SDK I am using is of version 17.0.
    13. Change to 8.0 as the latest iOS SDK version I am using is 8.0.
    14. Change linker options. For "ios_version_min" set the value to 8.0.
    15. Open "extension.xml" file and change the extension to "17.0" as the Air SDK I am using is of version 17.0.
    16. Open "build.xml" file and edit few lines. I have displayed in video which part to change.
    17. Add <arg line="-target-player=17.0"/> and change <arg line='-swf-version=13/> to <arg line='-swf-version=17'/>
    18. Delete the lines as displayed in video.
    19. Go to the terminal again. Go to the "build" folder in "ANE-In-App-Purchase-master".
    20. Run command "ant".

    If you face an error like - Error: unable to open '/Users/jas/Desktop/ane_sample/AIRSDK_Compiler/frameworks/libs/player/11.1/playerglobal.swc'.

    Open flex-config.xml file located in AIRSDK_Compiler/frameworks and remove the {targetPlayerMajorVersion}.{targetPlayerMinorVersion}. Replace it with 17.0 if you are using Air SDK 17.0 else put the version you are using.

    From:

    <external-library-path>
                <path-element>libs/player/{targetPlayerMajorVersion}.{targetPlayerMinorVersion}/playerglobal.swc</path-element>
     </external-library-path>
    

    To:

    <external-library-path>
                <path-element>libs/player/17.0/playerglobal.swc</path-element>
    </external-library-path>
    

    Run command "ant" again.

    If you still face any error, please put your comments. I will try to help you.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: