Monetization

Prepares the project for in-app purchasing and advertisement.

Ads panel

Captures information about ad keys for (depending on the device targets) iOS and/or Android. iAds will work only for iOS devices, while adMob works for both platforms. If both are in use, AdMob will be used only for Android connections.

  • Enable iAds (iOS only): if checked, will show iAds (banner format) in the app (it requires the iTunes Bundle ID below);
* iTunes Bundle ID: it is the app bundle id, created by iTunes Connect;

> Apple finished iAds support. It is deprecated.
  • Enable AdMob: if checked, will show adMob ads (banner format) in the app (it requires the adMob Key below);

  • Add Ads in all pages: if checked, loads and display different banners in all

  • pages of the app;

    • Ad position X: x axis position of the ad in the page;

    • Ad position Y: y axis position of the ad in the page;

Important: Ads only show in the devices, not in the Simulator.

In-App Purchase panel

Add icon to add a new product Name&ID

Select icon to select a row of products table. You can delete a selected row with Trash icon

Add icon opens Add New Product dialog

  • Name: enter a name for your product, as set in the appropriated store (we strongly suggest you to have the same product name and id if you are connecting with more than one store);

  • ID: it is the ID created in the appropriated store (this is the string used to get your product from Apple/Google’s store;

Allows you to setup products that can be purchased from the app. It requires customizations in the stores you want to connect (Apple and Google Play only at this moment) that are out of the scope of this guide.

Below, a quick overview of the process (an even better document to follow comes from Corona Labs Tutorial: Understanding In-App Purchase):

Understanding IAP

IAP is complex mostly because it does not allow you to test your application in the Simulator and, part of the code needs to reside in Apple or Google’s servers. As several “how-tos” mention (see some below), you are going to spend more time working in Apple/Googles’s side (configuring profiles, etc) than with Kwik.

Start reading this great walk-through from Troy Brant’s (the code part is not important as Kwik will handle it for you):

Basically you will need to create a Unique App ID

  • Create a new provisioning profile
  • Add you application to iTunes
  • Upload your app binary (even if it is not finished) – you need a binary to create a product
  • Add your product(s)
  • IAP in Kwik

As mentioned before, Kwik only works with internal asset purchases. Considering it uses the concept of pages, imagine that some pages will be unlocked only when the user purchase them. You may have a free storybook that allows the reader to read until the middle of the story. To finish it, he/she needs to buy the rest of the pages.

This simple page lock/unlock is Kwik default IAP function. You can lock a page from Page Properties.

Downloadable Sample With IAP Badger

This is advanced programming to enable downloadable contents with IAP.

A sample app consists of three epsodes. Epsode1 is free, Epsode2 and Epsode3 are to be paied. Once paied, the image files of Eposde2 or Epsode3 is downloaded from an Internet server iap_badger is well known library of Corona SDK. It supports apple, google and amazon Sample app

this sample uses IAP Badgear so that you can test IAP function with Corona simulator with dummy product IDs.

results matching ""

    No results matching ""