Promotional IAP is provided for iOS 11. This function allows you to register twenty-in-app products to expose through the Product list or Search box on Apple App Store. On game, utilize Hive SDK v4.4.1 to activate Promotional IAP.
Refer to the followings for details of Promotional IAP.
To code the Promotional IAP, Hive SDK provides checkPromotePurchase
API. The API returns Market PID, which is requested from Apple App Store. Make sure to implement the following works before calling checkPromotePurchase
API.
After initializing IAP v4 and completing the actions above you can receive iappromote
event through UE global callback. When sending the event, call Product List Search API and checkPromotePurchase
API in sequence to receive Market PIDs of which users requested to purchase from App Store. When Market PID is returned, code for users to purchase the item matched with Market PID.
API Reference: hive.IAPV4.checkPromotePurchase
1 2 3 4 5 6 7 |
using hive; IAPV4.checkPromotePurchase((ResultAPI result, String marketPid) => { if (result.isSuccess()) { // TODO: Check marketPid and proceed with product purchase using purchase API } }); |
API Reference: IAPV4::checkPromotePurchase
1 2 3 4 5 6 7 8 9 |
#include <HIVE_SDK_Plugin/HIVE_CPP.h> using namespace std; using namespace hive; IAPV4::checkPromotePurchase([=](ResultAPI const & result, string marketPid) { if (result.isSuccess()) { // TODO: Check marketPid and proceed with product purchase using purchase API } } |
API Reference: IAPV4Interface .checkPromotePurchase
1 2 3 4 5 6 7 |
import HIVEService IAPV4Interface.checkPromotePurchase() { result, marketPid in if result.isSuccess() { // TODO: Check marketPid and proceed with product purchase using purchase API } } |
API Reference: HIVEIAPV4 checkPromotePurchase
1 2 3 4 5 6 7 |
#import <HIVEService/HIVEService-Swift.h> [HIVEIAPV4 checkPromotePurchase: ^(HIVEResultAPI *result, NSString *marketPid) { if ([result isSuccess]) { // TODO: Check marketPid and proceed with product purchase using purchase API } }]; |