based license is required?

Hi, I have a question about store plugin:
Can I use the store plugin in xcode simulatore for my test without basic corona licensing?

Thanks

Have you tried?

Rob

Yes, but on the device and on the simulator Xcode a popup appears: “You will not be able to public this app to the store because it uses a restricted library (store)”. 

the function does not receive the list of purchases in the app configured by me, I do not know if I’ve done something wrong or if it is normal, considering that I do not have the license

Thanks

http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

This tutorial covers how to view the console log for the simulator where you can look for errors that might be in your code.  Unfortunately, I’ve not gotten a solid answer from Engineering on it.  I’m going on the assumption that you cannot, but even if you can, you still need to find your errors.  This tutorial will help you.

Rob

I found this exact same problem today: did you realize what the problem was ?

A license restriction or a bug ?

Thank you for any hint.

st

Hello,

In-App Purchases are available to the Basic, Pro, and Enterprise user tiers. This feature is not included in the free product… it begins at the Basic tier which is $16/month (billed annually).

http://coronalabs.com/pricing/

Take care,

Brent

Hello Brent,

just become a Basic. Downloaded (again) the 2393a version and run. The message “You will not be able to public this app to the store because it uses a restricted library (store)” has disappeared. Great !

My problem is now the store.canMakePurchases returns false: and in the iPhone all restrictions are off i.e. purchases are allowed.

This is code:

if ( device.isAndroid ) then

    store = require( “plugin.google.iap.v3” )

     v3 = true

     infoLabel.text=“Google store plugin  load”

elseif ( device.isApple ) then

     infoLabel.text=“Apple store library load”

     store = require( “store” )

end

local message

        if  (store==nil) then 

            message=“Store cannot be created on this device”

            native.showAlert( system.getInfo(“appName”), message , { “Ok”}, exitFromIap )

        elseif ( not store.canMakePurchases) then

            message=translations.localize(“warnpurchasenotenabled”, “language”)

            native.showAlert( system.getInfo(“appName”), message , { “Ok”},exitFromIap )

        else

            --utilize ‘store.availableStores’ function:

            if ( store.availableStores.apple ) then

                currentProductList = appleProductList

                store.init( “apple”, storeTransaction )

            elseif ( v3 == true or store.availableStores.google ) then

                currentProductList = googleProductList

                store.init( “google”, storeTransaction )

            else

                local message= “In-app purchases are not supported on this system/device.”

                native.showAlert( system.getInfo(“appName”), message , { “Ok”},exitFromIap )

            end

        end   

The inloLabel tells I am on an Apple device. good.

I then always get the (translated) message: warnpurchasenotenabled.

Bad.

Any issue with this API ?

Thanks for any help

Stefano

Try to go to Preferences and choose Deauthorize and Quit.  Log back in and see if that helps.

Rob

I fixed the bug this way:

if ( device.isAndroid ) then

        store = require( “plugin.google.iap.v3” )

        v3 = true

        infoLabel.text=“Google store plugin  load”

    elseif ( device.isApple ) then

        infoLabel.text=“Apple store library load”

        store = require( “store” )

    end

    …

local message

        if  (store==nil) then 

            message=“Store cannot be created on this device”

            native.showAlert( system.getInfo(“appName”), message , { “Ok”}, exitFromIap )

        

        else

            --utilize ‘store.availableStores’ function:

            if ( store.availableStores.apple ) then

                currentProductList = appleProductList

                store.init( “apple”, storeTransaction )

            elseif ( v3 == true or store.availableStores.google ) then

                currentProductList = googleProductList

                store.init( “google”, storeTransaction )

            else

                local message= “In-app purchases are not supported on this system/device.”

                native.showAlert( system.getInfo(“appName”), message , { “Ok”},exitFromIap )

            end

        end

        if device.isApple and ( not store.canMakePurchases)  then

            message=translations.localize(“warnpurchasenotenabled”, “language”)

            native.showAlert( system.getInfo(“appName”), message , { “Ok”},exitFromIap )

        end

I call the store.canMakePurchases AFTER the store.init method API. It now runs well.

Any comment appreciated. 

Thank you.

Stefano

That makes sense.  You have to init the service before you can learn if the parents have turned off purchasing or not.  This is also something you probably should check before you attempt to make a purchase.  Your app could be running, allowing purchases  and then a parent turn off the feature and your app could then resume without restarting and you might not know its turned off.

Rob

ok then: issue fixed.

Thanks

stefano

Have you tried?

Rob

Yes, but on the device and on the simulator Xcode a popup appears: “You will not be able to public this app to the store because it uses a restricted library (store)”. 

the function does not receive the list of purchases in the app configured by me, I do not know if I’ve done something wrong or if it is normal, considering that I do not have the license

Thanks

http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

This tutorial covers how to view the console log for the simulator where you can look for errors that might be in your code.  Unfortunately, I’ve not gotten a solid answer from Engineering on it.  I’m going on the assumption that you cannot, but even if you can, you still need to find your errors.  This tutorial will help you.

Rob

I found this exact same problem today: did you realize what the problem was ?

A license restriction or a bug ?

Thank you for any hint.

st

Hello,

In-App Purchases are available to the Basic, Pro, and Enterprise user tiers. This feature is not included in the free product… it begins at the Basic tier which is $16/month (billed annually).

http://coronalabs.com/pricing/

Take care,

Brent

Hello Brent,

just become a Basic. Downloaded (again) the 2393a version and run. The message “You will not be able to public this app to the store because it uses a restricted library (store)” has disappeared. Great !

My problem is now the store.canMakePurchases returns false: and in the iPhone all restrictions are off i.e. purchases are allowed.

This is code:

if ( device.isAndroid ) then

    store = require( “plugin.google.iap.v3” )

     v3 = true

     infoLabel.text=“Google store plugin  load”

elseif ( device.isApple ) then

     infoLabel.text=“Apple store library load”

     store = require( “store” )

end

local message

        if  (store==nil) then 

            message=“Store cannot be created on this device”

            native.showAlert( system.getInfo(“appName”), message , { “Ok”}, exitFromIap )

        elseif ( not store.canMakePurchases) then

            message=translations.localize(“warnpurchasenotenabled”, “language”)

            native.showAlert( system.getInfo(“appName”), message , { “Ok”},exitFromIap )

        else

            --utilize ‘store.availableStores’ function:

            if ( store.availableStores.apple ) then

                currentProductList = appleProductList

                store.init( “apple”, storeTransaction )

            elseif ( v3 == true or store.availableStores.google ) then

                currentProductList = googleProductList

                store.init( “google”, storeTransaction )

            else

                local message= “In-app purchases are not supported on this system/device.”

                native.showAlert( system.getInfo(“appName”), message , { “Ok”},exitFromIap )

            end

        end   

The inloLabel tells I am on an Apple device. good.

I then always get the (translated) message: warnpurchasenotenabled.

Bad.

Any issue with this API ?

Thanks for any help

Stefano

Try to go to Preferences and choose Deauthorize and Quit.  Log back in and see if that helps.

Rob

I fixed the bug this way:

if ( device.isAndroid ) then

        store = require( “plugin.google.iap.v3” )

        v3 = true

        infoLabel.text=“Google store plugin  load”

    elseif ( device.isApple ) then

        infoLabel.text=“Apple store library load”

        store = require( “store” )

    end

    …

local message

        if  (store==nil) then 

            message=“Store cannot be created on this device”

            native.showAlert( system.getInfo(“appName”), message , { “Ok”}, exitFromIap )

        

        else

            --utilize ‘store.availableStores’ function:

            if ( store.availableStores.apple ) then

                currentProductList = appleProductList

                store.init( “apple”, storeTransaction )

            elseif ( v3 == true or store.availableStores.google ) then

                currentProductList = googleProductList

                store.init( “google”, storeTransaction )

            else

                local message= “In-app purchases are not supported on this system/device.”

                native.showAlert( system.getInfo(“appName”), message , { “Ok”},exitFromIap )

            end

        end

        if device.isApple and ( not store.canMakePurchases)  then

            message=translations.localize(“warnpurchasenotenabled”, “language”)

            native.showAlert( system.getInfo(“appName”), message , { “Ok”},exitFromIap )

        end

I call the store.canMakePurchases AFTER the store.init method API. It now runs well.

Any comment appreciated. 

Thank you.

Stefano

That makes sense.  You have to init the service before you can learn if the parents have turned off purchasing or not.  This is also something you probably should check before you attempt to make a purchase.  Your app could be running, allowing purchases  and then a parent turn off the feature and your app could then resume without restarting and you might not know its turned off.

Rob