Integration Steps for myPOS iOS SDK
Follow these steps to integrate the myPOS iOS SDK into your iOS app and get started with payment processing.
Set Up Your Xcode Project
To begin using the SDK:
- Add
myPOSService.frameworkto your Xcode project. - Ensure your app is linked against
myPOSService.frameworkin your project's Build Phases > Link Binary with Libraries section.
Configure Privacy Permissions
Since the SDK uses Bluetooth to communicate with myPOS terminals, you must add the following permission to your app’s Info.plist file:
Code Example
<key>NSBluetoothPeripheralUsageDescription</key>
<string>We use Bluetooth to connect with the myPOS payment terminal.</string>This ensures users are prompted appropriately when Bluetooth access is needed.
Import the SDK
In Objective-C:
Code Example
Objective-C#import <myPOSBluetoothSDK/myPOSBluetoothSDK.h>
If you are using Swift, create a bridging header and import the framework there. For more information about bridging headers, see Apple's documentation.
Initialize the SDK
Bluetooth Mode
To start the payment terminal connection via Bluetooth:
Code Example
Objective-C[myPOSService startInitializationFromController:self withCompletion:^(MPPOSDeviceMode posDeviceMode, NSError * _Nullable error) { }];
WiFi Mode
If your terminal is set up for WiFi (IP mode), use the following initialization method:
Code Example
Objective-C[myPOSService startInitializationFromController:self forURL:url withCompletion:^(MPPOSDeviceMode posDeviceMode, NSError * _Nullable error) { }];
Customizing the Navigation Title
You can customize the navigation bar title shown during SDK screens to match your app’s branding.
Code Example
Objective-C[myPOSService setAppName:@"My App Name"];
Tip: Always test your integration in both Bluetooth and WiFi configurations to ensure compatibility with different terminal setups.