Apple

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

Apple Developer Portal

https://developer.apple.com/

  • create a new AppID (not use a wildcard App ID)
  • create iOS Provisioning Profiles (development or distribution)

iTunes Connect

https://itunesconnect.apple.com

Agreements, Tax and Banking

  • Contact info
  • Banking info
  • Tax Info

My Apps

  • create a new App with the same Bundle ID as your app in App Developer Portal

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
  • also each product needs screenshot image of 1024x1024 and 960x640

  • fill each filed and price list box with text and value and make it Ready to Submit when saved

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]

  • foo+us@gmail.com
  • foo+uk@gmail.com
  • foo+jp@gmail.com

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

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 Corona 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.

  • App store app On device, the bottom of Featured tab, you find the current logging Apple ID. Click it and sign out. Then continue your test with your app.

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

Corona SDK sample

To make sure your settings in iTuneConnect, you can test with InAppPurchase sample from Corona Labs

  • CoronaSDK/SampleCode/Monetization/InAppPurchase

  • In productData.lua, you may set your product IDs and run the sample built with your provisioning profile.

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",
}

results matching ""

    No results matching ""