Getting Started with iOS
Devices Supported:
BBPOS
Magtek
To get a copy of our SDK, please contact our partner team at [email protected]
Minimum Supported iOS Version
PaySimpleMobileSDK version 1.5.0: iOS 12.1
PaySimpleMobileSDK version 1.7.0: iOS 14
- Copy the PaySimpleMobileSDK.xcframework and triPOSMobileSDK.xcframework files into the root directory of your application project folder. If you are on PaySimpleMobileSDK version 1.5.0 or lower using a .framework file, copy the PaySimpleMobileSDK.framework and triPOSMobileSDK.framework 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
Note: In some Xcode environments, these general settings may be represented by "Frameworks, Libraries, and Embedded Content".Build Phases - Link Binary With Libraries
Build Phases - Embed Frameworks
- Ensure the framework search paths are correct for your project in Build Settings
- The following step is only needed for versions of the SDK 1.5.0 and lower (using .framework): In Build Phases add a new Run Script. This script is required to strip simulator architectures from your release build for the App Store.
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
# This script loops through the frameworks embedded in the application and
# removes unused architectures.
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK
do
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"
EXTRACTED_ARCHS=()
for ARCH in $ARCHS
do
echo "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME"
lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH"
EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")
done
echo "Merging extracted architectures: ${ARCHS}"
lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "${EXTRACTED_ARCHS[@]}"
rm "${EXTRACTED_ARCHS[@]}"
echo "Replacing original executable with thinned version"
rm "$FRAMEWORK_EXECUTABLE_PATH"
mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH"
done
- iDyanmo Only In info.plist add the following item for "Supported external accessory protocols"
- com.magtek.idynamo
- In the files you wish to use the SDK, import the SDK with #import <PaySimpleMobileSDK/PaySimpleMobileSDK.h>
- Access the SDK through the PsSDK type
@property (nonatomic, strong) PsSDK *sharedPsSDK;
..
..
[PsSDK initializeSdk:DeviceTypeHere
environment:EnvironmentTypeHere
error:&error]
_sharedPsSDK = [PsSDK sharedInstance];
_sharedPsSDK.delegate = self;
Updated 3 months ago