Setup
This article describes how to set up the iOS Mobile Checkout SDK for Native iOS.
Step 1 | Configure a Universal Link
To allow players to return to your game after completing checkout in an external browser, such as Safari, you need to set up a Universal Link.
In Xcode:
-
Open your project and select your main project file.
-
Go to the Signing & Capabilities tab.
-
Click + Capability and search for Associated Domains. If you don’t see it, ensure you’re using a real device configuration.
-
Under Domains, add:
For example:
Step 2 | Set up a URL scheme
URL schemes allow your app to handle redirects from an in-app browser or embedded checkout flow.
In Xcode:
-
Open your project, select your target, and navigate to the info.plist file.
-
In the Information Property List, expand the URL types section. If it doesn’t exist, create it by clicking +.
-
Add an Item section if none exists, and set it to the following:
- URL identifier:
action
- URL Schemes:
acnative-${PRODUCT_BUNDLE_IDENTIFIER}
- URL identifier:
Step 3 | Import the SDK
To integrate the iOS Mobile Checkout SDK:
- Drag the provided .framework file into your Xcode project navigator.
- In the popup, make sure Copy items if needed is checked.
- Select your target and go to the General tab -> Frameworks, Libraries, and Embedded Content. Set the SDK to Embed & Sign.
Step 4 | Register deeplink handlers
After a player completes a purchase or exits the checkout in Safari, they’ll be redirected back to your app via a deeplink. Your app must capture this URL and forward it to the Appcharge SDK to finalize the transaction.
If your app handles deeplinks, make sure to call the Bridge handleDeeplink
method inside your existing handlers to pass the URL to the Appcharge SDK.
If your app doesn’t already handle deeplinks, add the following methods in your SceneDelegate
: