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:
Set up paths for Adobe AIR and Apache Ant
Go to Terminal and write sudo nano /etc/paths. Enter the system password.
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.
Press Ctrl-O, Enter and then Ctrl-X.
You need to quit the terminal and open it again to check if the commands work.
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.
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(").
Go to the finder now. Go to the Air sdk compiler -> include folder and copy "FlashRuntimeExtensions.h" file.
Now, unzip the downloaded GitHub code and go to the ios->InAppPurchaseIosExtension folder. Paste the "FlashRuntimeExtensions.h" file here.
Create copy of example.build.config file located in the build folder in "ANE-In-App-Purchase-master" folder and name it build.config .
Open "build.config" file in any editor, I have used Xcode here. Change the properties as mentioned in video.
Open "platform.xml" file and change the extension to "17.0" as the Air SDK I am using is of version 17.0.
Change to 8.0 as the latest iOS SDK version I am using is 8.0.
Change linker options. For "ios_version_min" set the value to 8.0.
Open "extension.xml" file and change the extension to "17.0" as the Air SDK I am using is of version 17.0.
Open "build.xml" file and edit few lines. I have displayed in video which part to change.
Add <arg line="-target-player=17.0"/> and change <arg line='-swf-version=13/> to <arg line='-swf-version=17'/>
Delete the lines as displayed in video.
Go to the terminal again. Go to the "build" folder in "ANE-In-App-Purchase-master".
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.
0 Comment(s)