jpStoreKit

jpStoreKit

In-app purchase for iOS and tvOS
Version : 2.0
Price : $50
State : Outtvosipadiphone

Downloads

Changelog

v2.0

  • Now compatible with Apple TV (except for the function named 'openAppStoreInApp')
  • Now compatible with ShiVa 2.0.
  • Compiled for Mac and Linux in addition to Windows, so you can now use it while working with ShiVa Editor for each of these operating systems.
  • Now uses a user token instead of an email to activate

v1.1

  • Optimized for ShiVa 1.9.2

API

jpStoreKit.activate ( sUserToken, sActivationKey ) local tProductsIdentifier = table.newInstance ( ) table.add ( tProductsIdentifier, "com.mycompany.myapp.product1" ) table.add ( tProductsIdentifier, "com.mycompany.myapp.product2" ) table.add ( tProductsIdentifier, "com.mycompany.myapp.product3" ) --Products Data. Must be the first thing you do. jpStoreKit.requestProductsData ( tProductsIdentifier ) "onStoreKitRequestFailed" ( sError ) "onStoreKitRequestDidEnd" ( ) "onStoreKitInvalidProductReceived" ( sProductIdentifier ) "onStoreKitProductReceived" ( sProductIdentifier ) sTitle = jpStoreKit.getProductLocalizedTitle ( sProductIdentifier ) nPrice = jpStoreKit.getProductPrice ( sProductIdentifier ) sLocalizedPrice = jpStoreKit.getProductLocalizedPrice ( sProductIdentifier ) tAvailableProducts = jpStoreKit.getAvailableProducts ( ) bYes = jpStoreKit.isProductDataAvailable ( sProductIdentifier ) bYes = jpStoreKit.canMakePayments ( ) --Transactions (you must request products data first) jpStoreKit.buyProduct ( sProductIdentifier ) "onStoreKitBuyProductFailed" ( sProductIdentifier, sError ) "onStoreKitProductPurchased" ( sProductIdentifier ) "onStoreKitProductRestored" ( sProductIdentifier ) "onStoreKitProductTransactionFailed" ( sProductIdentifier, kError ) jpStoreKit.restoreCompletedTransactions ( ) "onStoreKitProductRestored" ( sProductIdentifier ) "onStoreKitRestoreTransactionsFailed" ( sError ) "onStoreKitRestoreTransactionsFinished" ( ) --App Store jpStoreKit.openAppStoreApplication ( sItunesItemIdentifier ) jpStoreKit.openAppStoreInApp ( sItunesItemIdentifier ) "onStoreKitOpenAppStoreInAppFailed" ( ) "onStoreKitOpenAppStoreInAppSucceed" ( ) "onStoreKitAppStoreInAppClosed" ( ) --Constants jpStoreKit.kErrorClientInvalid jpStoreKit.kErrorPaymentCancelled jpStoreKit.kErrorPaymentInvalid jpStoreKit.kErrorPaymentNotAllowed jpStoreKit.kErrorStoreProductNotAvailable jpStoreKit.kErrorUnknown

Description

jpStoreKit communicates with the App Store on behalf of your application. Your application uses jpStoreKit to receive localized information from the App Store about products you want to offer in your application. Your application displays this information to users and allows them to purchase items. When a user wants to purchase an item, your app calls jpStoreKit to collect payment from the user.

jpStoreKit also let you display an in-app AppStore, where you can choose to display your other games or any iTunes item.

Requirements

  • The jpEventQueue plugin is required (free)
  • The jpTools plugin is required (free)

Information about the tvOS library

  • jpStoreKit.openAppStoreInApp ( sItunesItemIdentifier ) is not available