Apple

Apple

https://docs.coronalabs.com/guide/monetization/IAP/index.html

Apple Developer Portal

https://developer.apple.com/


iTunes Connect

https://itunesconnect.apple.com

Agreements, Tax and Banking

My Apps

Features > Products

For instance, IAP products are defined like this

name type product id
book01 Non-Consumable com.kwiksher.bookshelf.book01
book02 Non-Consumable com.kwiksher.bookshelf.book02

Tester Account

you can create sandbox tester accounts and build your app with the development profile.

from Users and Rolls > SandBox Testers,

[original] foo@gmail.com

[test accounts]

There seems no way to clear transaction record once the test account purchased an item. You need to create a new test account if you like to start from an initial state.

Don't sign in iTunes store with a tester account. Once signed in, the account is not treated as SandBox tester any longer.

http://help.apple.com/itunes-connect/developer/#/dev8b997bee1


Notes

iOS does not require an additional settings to build.setting or config.lua

Purchasing Disabled (Apple)

https://docs.coronalabs.com/guide/monetization/IAP/index.html#initialization

store.canMakePurchases is a Solar2D API.

iOS devices have a setting which can disable in-app purchasing entirely. You should use this API to check in advance with external codes if purchasing is allowed and notify the user if it's forbidden.

Connection error

Sandbox testing would work with devices. Don't test with XCode's iOS simulator.

Even tested with device, the sandbox testing would return “NSURLConnection finished with error - code -1001” or “Cannot connect to iTunes Store”

Solar2D sample

To make sure your settings in iTuneConnect, you can test with InAppPurchase sample of Solar2D

local appleProductList =
{
	-- These Product IDs must already be set up in your store
	-- We'll use this list to retrieve prices etc. for each item
	-- Note, this simple test only has room for about 6 items, please adjust accordingly
	-- The iTunes store will not validate bad Product IDs.
	"com.anscamobile.NewExampleInAppPurchase.ConsumableTier1",
	"com.anscamobile.NewExampleInAppPurchase.NonConsumableTier1",
	"com.anscamobile.NewExampleInAppPurchase.SubscriptionTier1",
}