This article explains how to import the Payment Links SDK for iOS. You can install it via Swift Package Manager (SPM) or manually.
Requirements
| |
|---|
| iOS | 13.0 or higher |
| Framework | Static .xcframework |
| Swift | 5.7 – 5.10 |
| Xcode | 15.0 or higher |
Distribution methods
CocoaPods is deprecated and doesn’t include the latest version of the iOS Payment Links SDK. The last version published to CocoaPods is v1.6.0. Use Swift Package Manager (SPM) instead.
Import the SDK via SPM
To import the Payment Links SDK for iOS via SPM:
-
Open your iOS project in Xcode.
-
Go to File > Add Package Dependencies.
-
Enter the iOS Payment Links SDK repository URL:
https://github.com/Appcharge/ios-payment-links.
-
Use the dropdown-menu to select your Dependency Rule:
-
Up to Next Major Version: for the latest major version. (Recommended)
-
Up to Next Minor Version: for the latest minor version.
-
Use the Add to Project drop-down menu to select your app target.
Import the SDK manually
To import the Payment Links SDK for iOS manually:
- Clone the Appcharge Payment Links repository to your local machine.
- Drag the
ACPaymentLinks.xcframework folder 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.
Import the SDK via CocoaPods (Deprecated)
To import the Payment Links SDK for iOS via CocoaPods:
-
If your project doesn’t already use CocoaPods, you need to install it:
sudo gem install cocoapods
-
Run
--version to determine you current pods version:
-
Initialize pods:
-
Install pods:
pod repo update
pod install
-
Open your workspace:
-
Add the Appcharge Payment Links SDK via your Podfile:
platform :ios, '13.0'
target 'YourApp' do
// Import the latest version, or
pod 'ios-payment-links'
// Import a specific version
pod 'ios-payment-links', '~> <version>'
end
-
Last, run the following:
pod repo update
pod install