Hey all,
I’ve implemented IOS promoted IAP using Corona store library and would like to share what I feel is a deficiency found in the library.
I used the following link for testing.
itms-services://?action=purchaseIntent&bundleId=my.package.id&productIdentifier=my.iap.product.id
Corona SDK IAP library encapsulated in store module receives the intent and forwards it to the listener specified in the init call like so:
store.init( transactionListener )
The transactionListener is fired after the user purchases or cancels the transaction or if transaction failed.
There are couple common dialogs that are typically presented:
-
Login dialog - allows the user to input their credentials before the purchase
-
Confirm IAP dialog - displays the IAP product price and allows the user to either buy or cancel
As it stands today there appears to be no way to execute any LUA code prior to user taking some kind of action on the above dialogs. Only after taking an action of some type the listener will fire with the state variable set to either “cancelled” or “purchased”.
With the library behaving this way it’s not possible to customize the user’s IAP “landing” experience. Whatever your application loads when it starts will be displayed. In some cases it can even show the black screen.
It would be great if Corona could add another event type ( call it promoted_iap or something similar) prior to displaying any of the IOS IAP dialogs.