Skip to main content

Quick Start

Overall Process

Overall Process

iOS Integration

Step 1: Create an app

App ID Reference Document

Overall Process

  • App name: The name of your app
  • Store: The platform that is divided into Android and iOS, and you should select iOS in this case.
  • App Bundle ID: bundleID is the identifier of your app in the Apple App Store, which can be obtained by viewing your app in App Store Connect.
  • iTunesConnect App Specific Shared Secret: The shared secret, which is needed to verify the order receipt generated by your app. For the acquisition method, please refer to: https://help.apple.com/app-store-connect/#/devf341c0f01. There are two shared keys: One is the shared key for all apps; the other is a shared key for a single app. A shared key for a single app is recommended.

Step 2: Configuration

Notification Receiving Configuration( Important: If you have your own receiving server, please refer to the "Configure Notification Receiving Server")

To send Apple server notifications to Appwheel, please configure the following address

Overall Process

to Apple Store Connect: (Currently supports V1 type notifications) Overall Process

Overall Process

Configure Notification Receiving Server(optional)

▪ If you have your own notification receiving server that needs the push data, you can set the receiving server address in the AppWheel main site. We will send each message once in the order in which the messages arrive, but sometimes the messages may not be delivered in sequence, or will be transmitted multiple times. You should design the program in the way of idempotent processing.

Overall Process

▪ After the configuration is complete, you can test the availability of the address. The configuration must be consistent with the requirements, that is, accept the request of the POST method, return 200 Http status code after successful processing, and return 400 or 500 status code when processing fails. In addition, because there is no actual business data body in the test, the 200 http status code can be returned when empty data is received.

p8 file configuration for purchasing discounted products

When your app has a discount set in the Apple App Store, and you want to sync the information to AppWheel, you need to set the p8 file in AppWheel。

Overall Process

Service Account credentials File: A file with a .p8 suffix, commonly called a p8 file. When you need to enable the subscription discount function, you need to have a signature for the discount, and the p8 file is an essential key to generate this signature. Obtain it through: https://help.apple.com/app-store-connect/#/dev689c93225

Step 3: Setting up the Installation Environment

Requirements iOS 10.0 and above

CocoaPods

This SDK is hosted in Cocoapods. please make sure you have installed Cocoapods and your project has been compiled and run successfully with Cocoapods before installing this SDK. If your project has been compiled and run successfully with Cocoapods and you can find Podfile in your project.

Import Bridging-Header.h

If your project is a Swift project, then you need to import Objective-C into Swift. You can find the Bridging-Header.h file in your project after importing.

Step 4: Install the SDK

SDK Installation

Configuring The SDK

Displaying Products

Making Purchases

Restoring Purchases

User Benefits

Adding a Global Listener

Step 5: Acceptance Inspection

  • App Configuration Check
  • Whether the notification is configured successfully: Check the configuration in the AppStoreConnect backend

Overall Process

  • App configuration is as follows

Overall Process

Overall Process

  • Whether the initialization interface is called at startup
  • Whether the AppWheel SDK can get the information of purchased products
  • Subscription Products
  • Discount products (optional)
  • Discount for new users
  • Promotion offer
  • Coupon
  • Consumable products
  • Non-consumable products
  • Non-renewable products
  • Whether the AppWheel SDK can restore product information

Android Integration

Step 1: Create an app

App ID reference Document

createAnAppAndroid

  • App name: The name of your app
  • Store: The platform that is divided into Android and iOS, and you should select Android in this case.
  • Google Play package: The package name of your app, which is the unique identifier of your app in the Google Play Store and can be obtained in the Google Play Console
  • Service Account credentials JSON: The json file required by the server to verify the order. Before you obtain this file, please confirm that you have completed the necessary configuration for Google payments, which is described in the Necessary Preparation for AppWheel (Android). When you have completed the configuration, you will have a json file. Please upload this file to our backend to create your Android app accordingly.

Step 2: Configuration

Notification Receiving Configuration ( Important: If you have your own receiving server, please refer to the "Configure Notification Receiving Server")

To send Google server notifications to AppWheel, please configure the address

configServerAndroid To Google Cloud Platform,(ensure you can enable Google Cloud Pub/Sub)):

notificationReceivingConfigurationAndroid

Configure Notification Receiving Server(optional)

▪ If you have your own notification receiving server that needs the push data, you can set the receiving server address in the AppWheel main site. We will send each message once in the order in which the messages arrive, but sometimes the messages may not be delivered in sequence, or will be transmitted multiple times. You should design the program in the way of idempotent processing.

configServerAndroid

▪ After the configuration is complete, you can test the availability of the address. The configuration must be consistent with the requirements, that is, accept the request of the POST method, return 200 Http status code after successful processing, and return 400 or 500 status code when processing fails. In addition, because there is no actual business data body in the test, the 200 http status code can be returned when empty data is received.

Product Configuration

  • There's already a product configuration
  • No product configuration

Step 3: Install the SDK

SDK Installation

Configuring The SDK

Displaying Products

Making Purchases

Restoring Purchases

User Benefits

Adding a Global Listener

Step 4: Acceptance Inspection

  • App Configuration Check
  • To make sure a notification is configured successfully: Check if the Google Cloud Pub/Sub queue has notification settings

pubSub

  • The basic configuration is as follows

androidSetting

  • Whether the initialization interface is called at startup
  • Whether the AppWheel SDK can get the information of purchased products
  • Subscription Products
  • In-App Products
  • Discount products (optional)
  • Single Payment Products
  • Recurring Payment Products
  • Whether the AppWheel SDK can restore product information

Other steps: Integration of advanced features

///Adding a listener
UserOrderManager.getProvider().addPurchaseObserver(new OrderObserver() {
@Override
public void onUpdateOrders(List<MTGPurchase> purchases) {
// Monitor order changes
}
});
///Remove listener
UserOrderManager.getProvider().removePurchaseObserver(orderObserver);

Stripe

第一步:配置应用

配置应用

第二步:创建SKU

配置商品

第三步:接口对接

接口对接

第四步:发起订阅

发起订阅

第五步:查询权益解锁功能

查询权益