App in appstore, but "Notice In-app purchases is not supported by this device" keeps showing up?

Well, after 10 or so reviews, it finally went through!

The problem now is that in-app purchases are broken… well, they work fine enough in sandbox mode, but when the app went live it only shows “Notice  In-app purchases is not supported by this device” when I go to the store. It is a native popup message box. The products does not load either, so it only shows an empty screen after that…

You can actually test it for yourself. The app is named “Smartball: Gravity Games” and is free to download. Just search for “smartball”.

Anyone else experiencing this? Its strange as the app even got through review. Its build 1135.

Can you show your IAP code?  I believe this error message is inside the If/Else statement within your IAP code. 

Well, you are right. Its based on the IAP example, so the warning is actually in the code:

if (not validProducts) or (#validProducts \<= 0) then -- There are no products to purchase. This indicates that in-app purchasing is not supported. local noProductsLabel = display.newText( "Sorry!\nIn-App purchases is not supported on this device.", display.contentWidth / 2, display.contentHeight / 3, display.contentWidth / 2, 0, native.systemFont, 16) noProductsLabel:setTextColor(0, 0, 0) showStoreNotAvailableWarning() else (even more code) and: function showStoreNotAvailableWarning() if isSimulator then native.showAlert("Notice", "In-app purchases is not supported by the Corona Simulator.", { "OK" } ) else native.showAlert("Notice", "In-app purchases is not supported on this device.", { "OK" } ) end end

The strange thing is that it works in IOS sandbox mode, but not in the live app… It looks like the products list is empty for the live one.

The sandbox app still works and all products have been approved, so I don´t know why they don´t load on the live app:

function loadProductsCallback( event ) if testingproduct then -- io.flush() -- remove for production end -- save for later use validProducts = event.products --event.products[i].localizedPrice invalidProducts = event.invalidProducts addProductFields() end

It could be related to this so I just wait a little and see if the problem goes away:

http://forums.coronalabs.com/topic/39300-loadproductscallback-error-ios/

Short update: The problem went away after about a day. Apparently it takes time for Apple servers to update.

Can you show your IAP code?  I believe this error message is inside the If/Else statement within your IAP code. 

Well, you are right. Its based on the IAP example, so the warning is actually in the code:

if (not validProducts) or (#validProducts \<= 0) then -- There are no products to purchase. This indicates that in-app purchasing is not supported. local noProductsLabel = display.newText( "Sorry!\nIn-App purchases is not supported on this device.", display.contentWidth / 2, display.contentHeight / 3, display.contentWidth / 2, 0, native.systemFont, 16) noProductsLabel:setTextColor(0, 0, 0) showStoreNotAvailableWarning() else (even more code) and: function showStoreNotAvailableWarning() if isSimulator then native.showAlert("Notice", "In-app purchases is not supported by the Corona Simulator.", { "OK" } ) else native.showAlert("Notice", "In-app purchases is not supported on this device.", { "OK" } ) end end

The strange thing is that it works in IOS sandbox mode, but not in the live app… It looks like the products list is empty for the live one.

The sandbox app still works and all products have been approved, so I don´t know why they don´t load on the live app:

function loadProductsCallback( event ) if testingproduct then -- io.flush() -- remove for production end -- save for later use validProducts = event.products --event.products[i].localizedPrice invalidProducts = event.invalidProducts addProductFields() end

It could be related to this so I just wait a little and see if the problem goes away:

http://forums.coronalabs.com/topic/39300-loadproductscallback-error-ios/

Short update: The problem went away after about a day. Apparently it takes time for Apple servers to update.