Alipay+ DocsAlipay+ Docs

Quickstart

This topic introduces how to quickly set up Alipay+ ACQP iOS SDK.

Before you begin

Before you get started, ensure that the following requirements are met:

  • Install the following tools:
    • Xcode 12.* or later
  • Ensure that the minimum deployment target is set to iOS 9 or later.

Get started

Step 1. Add SDK to your project

  1. Log on to Alipay+ Developer Center to download the SDK binaries as a package. You can also obtain the source code if you need to review or customize the SDK source code.
  2. Ensure that the Alipay+ SDK and your own SDK (if exists) are linked together to your project.
  • If you previously used CocoaPods to publish your SDK or you can use CocoaPods to publish your SDK to other integrators, add the following line to your podspec file:
copy
 s.vendored_frameworks = ['YOUR_PATH/AlipayPlusClient.framework'] 
s.resources = ["YOUR_PATH/AlipayPlusClient.framework/AlipayPlusResource.bundle"]
  • If you do not use CocoaPods, you can guide other integrators to manually add the SDK as follows:
    1. Add AlipayPlusClient.framework to your project. Make sure to select Copy items if needed.
    2. Add AlipayPlusClient.framework/AlipayPlusResource.bundle to your project. Make sure to select Copy items if needed. image
    3. Make sure to add -ObjC to Build Settings > Linking > Other Linker Flags to use class category.image

Note: If your project is created using swift and the "Undefined symbol: ___llvm_profile_runtime" error is triggered during build, try add -fprofile-instr-generate to Build Settings > Linking > Other Linker Flags to resolve the error.

Step 2. Set up the SDK before using other APIs

  1. Import the SDK header file to your project.
copy
import <AlipayPlusClient/AlipayPlusClient.h>
  1. Set up the SDK with required configurations.
copy
IAPConfiguration *configuration = IAPConfiguration.new;
configuration.envType = @"PROD";
configuration.acquirerId = @"xxx";
configuration.merchantId = @"yyy";
configuration.language= @"zzz";
[AlipayPlusClient.shared setConfiguration:configuration];

Next steps

After you have integrated the Alipay+ ACQP iOS SDK, you can move on to use the SDK in Cashier Payment. For more information, see Cashier Payment integration.