StoreKit.isSupported returns false on iOS device

I recently purchased my own Milkman StoreKit extension for in-app purchases on iOS. I'm having trouble initializing StoreKit on my iPhone 4S.

I followed the instructions in the Milkman games example and my code looks like this:

log("Is Supported " + StoreKit.isSupported());    
if(StoreKit.isSupported())
{   
    StoreKit.create();
    log("StoreKit Initialized.");

    // make sure that purchases will actually work on this device before continuing!
    // (for example, parental controls may be preventing them.)
    if (!StoreKit.storeKit.isStoreKitAvailable())
    {
        log("Store is disable on this device.");
        return;
    }
}

      

The docs for the StoreKit.isSupported () function say this:

isSupported ()  method   
public static function isSupported():Boolean
Checks if the current platform supports StoreKit. Note that this only determines whether the app is running under iOS (as opposed to Android, Windows, etc.) Use this call before initializing StoreKit in order to confirm that you are on iOS. (So that you can avoid initializing StoreKit on an unsupported platform when building a multi-platform app.)

Returns
Booleantrue if StoreKit is supported; false otherwise.

      

When I run my application from Flash Builder on my laptop, the Storekit.isSupported () function returns false (as expected, since this is not an iOS device). However, when I create an IPA and deploy my iPhone 4, it STILL returns false even though I have a WiFi connection and verified that I have no IAP restrictions on my phone.

Someone had the same problem and solved it, or does anyone have any suggestions on what I can try next?

Many thanks

+3


source to share





All Articles