ECP - iOS SDK
Supported Devices
- Stripe M2 Reader
Getting Started
To get a copy of our SDK, please contact our partner team at [email protected] or directly reach out to your Integrated Partner Manager.
Minimum Supported iOS Version
iOS 13.0
When utilizing the iOS ECP SDK, do not manually delete locations in the Stripe dashboard. Manual deletion of locations in the Stripe dashboard will interfere with functionality of the SDK.
- Copy the EverCommercePaymentsIosSdk.xcframework and StripeTerminal.xcframework files into the root directory of your application project folder.
- In the Application General Settings import the frameworks as an Embedded Library.
- Make sure the framework files appear in the following places for the Application Target:
General Settings - Embedded Binaries
General Settings - Linked Frameworks and Libraries
Build Phases - Link Binary With Libraries
Build Phases - Embed Frameworks
- Ensure the framework search paths are correct for your project in Build Settings
- In the files you wish to use the SDK, import the SDK with: #import <EverCommercePaymentsIosSdk/EverCommercePaymentsIosSdk.h>
- Access the SDK through the ECPSDK type:
@property (nonatomic, strong) ECPSdk *sharedECPSDK;
..
..
self.sharedECPSdk = [ECPSDK sharedInstance];
self.sharedECPSdk.delegate = self;
App Configuration
In order for your app to work with the SDK, please make the following changes to your Info.plist file in Xcode
- Enable location services through the setting of the NSLocationWhenInUsageDescription (Privacy - Location When In Use Usage Description) key.
- Enable UIBackgroundModes (Required Background Modes) with a value of bluetooth-central.
- Enable NSBluetoothPeripheralUsageDescription (Privacy - Bluetooth Peripheral Usage Description).
- iOS 13 and later: enable NSBluetoothAlwaysUsageDescription (Privacy - Bluetooth Always Usage Description)
Example:
Key | Value |
---|---|
NSLocationWhenInUseUsageDescription | Location access is required to accept payments. |
UIBackgroundModes | bluetooth-central |
NSBluetoothPeripheralUsageDescription | Bluetooth access is required to connect to supported card readers. |
NSBluetoothAlwaysUsageDescription | This app uses Bluetooth to connect to supported card readers. |
The SDK needs to know where payments occur. If we can't determine the location of a device, payments may become disabled and fail with an error code of 4096 until location access is restored. Please ensure users of your app who are taking payments always allow location permissions.
Updated 8 months ago