Table of contents
- iOS 12.0+
- Swift 5.3+
- Xcode 12.0+
This is the recommended integration method.
dependencies: [ .package(url: "https://github.com/afterpay/sdk-ios.git", .upToNextMajor(from: "5.2.0")) ]
github "afterpay/sdk-ios" ~> 5.2
pod 'Afterpay', '~> 5.2'
If you prefer not to use any of the supported dependency managers, you can choose to manually integrate the Afterpay SDK into your project.
Download the latest release source zip from GitHub and unzip into an
Afterpay directory in the root of your working directory.
Add the Afterpay SDK as a git submodule by navigating to the root of your working directory and running the following commands:
git submodule add https://github.com/afterpay/sdk-ios.git Afterpay cd Afterpay git checkout 5.2.0
Now that the Afterpay SDK resides in the
Afterpay directory in the root of your working directory, it can be added to your project or workspace with the following steps:
- Open the new
Afterpaydirectory, and drag
Afterpay.xcodeprojinto the Project Navigator of your application’s Xcode project or workspace.
- Select your application project in the Project Navigator to navigate to the target configuration window and select the application target under the “Targets” heading in the sidebar.
- In the tab bar at the top of that window, open the “General” panel.
- Click on the
+button under the “Frameworks, Libraries, and Embedded Content” section.
- Select the
Afterpay.frameworkfor your target platform.
And that’s it, the Afterpay SDK is now ready to import and use within your application.