4

i am trying to add in app purchase features in my iOS app. i use fresh planet nativeExtension(AirInAppPurchase.ane).while i compiling, it traces "in app purchase is not supported"...

Things i used.

  1. Adobe Flash pro CS6(AS3).
  2. Adobe AIR SDK 17.
  3. Window 7.

i correctly link nativeExtension(AirInAppPurchase.ane) in my project.

i correctly configured my iOS-app for in-app purchase in iTunes connection.

i got the freshPlanet native extension from"https://github.com/freshplanet/ANE-In-App-Purchase"

i think i made mistake in documentation...

Things I want to know

  1. Where to put my product id in my project(as3 classs).

  2. What is the use of Capabilities.manufacturer.indexOf('iOS') > -1 || Capabilities.manufacturer.indexOf('Android') > -1;" which is in InAppPurchase.as.

  3. What is the use of ExtensionContext.createExtensionContext("com.freshplanet.AirInAppPurchase", null);
  4. what is the clear documentation for in-app purchase for iOS-app.

please help me.... For this reason i am struggling. i couldn`t go further step..

Anand N
  • 41
  • 2

1 Answers1

0
  1. You put it best as a static constant in one Class for it

    class ProductList { public static var PRODUCT_1:String = "com.site.iap.product1"; ... }

Then when you need it you access it with ProductList.PRODUCT_1;

  1. It is to check the platform currently being used. It is possible that you are running your app on the emulator in windows so it is not Android or iOS. Native extension or ANE extends native capabilities of device, and windows doesn't have iOS or Android capabilities.

  2. It is use to instantiate Native extension that handles native code.

  3. There is no clear documentation. They gave it for free and open source but they don't provide documentation for it. You will find most of the usage either here on on starling forums.

Tree
  • 29,135
  • 24
  • 78
  • 98