The Handpoint SDK for iOS is a framework that allows you to integrate Handpoint's payment solutions into your iOS application.
To be able to use HanbdpointSDK you need to setup some things first:
Add/modify the property "Supported external accessory protocols" and add com.datecs.pinpad
This is what it should look like in the "source code" view of your info.plist:
<key>UISupportedExternalAccessoryProtocols</key>
<array>
<string>com.datecs.pinpad</string>
</array>Important
The Handpoint bluetooth card readers are part of the Apple MFi program. In order to release apps supporting accessories that are part of the MFi Program, you have to apply at Apple. Please fill the MFi form and we will help you with this process.
Enable support for external accessory communication from the Background modes section of the Capabilities tab in your Xcode project.
You can also enable this support by including the UIBackgroundModes key with the external-accessory value in your app’s Info.plist file:
<key>UIBackgroundModes</key>
<array>
<string>external-accessory</string>
</array>This project requires Ruby to run. We recommend installing Ruby using rbenv to manage different Ruby versions easily.
To check if Ruby is already installed:
$ which ruby
$ ruby -vYou can install rbenv with Homebrew using the following commands:
$ brew update
$ brew install rbenvThe next step is to add rbenv to your shell ( ~/.zshrc or relevant shell config file):
eval "$(rbenv init -)"Then reload the shell configuration:
$ source ~/.zshrcFinally you can install the required Ruby version with the following commands:
$ rbenv install 3.2.2
$ rbenv global 3.2.2CocoaPods is a dependency manager for Cocoa projects. You can install it with the following commands:
$ gem install cocoapodsIf you don't have a Podfile yet:
$ pod initTo integrate HandpointSDK into your Xcode project using CocoaPods, specify it in your Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target 'your_target' do
pod 'HandpointSDK', '~> 4.0.2'
endThen, run the following commands:
$ pod install
$ hash -r
$ rehashCarthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthageTo integrate HandpointSDK into your Xcode project using Carthage, specify it in your Cartfile:
github "handpoint/HandpointSDK-iOS"
Run carthage update to build the framework and drag the built HandpointSDK.framework into your Xcode project.
If you'd rather handle the dependency manually there are three approaches to include HandpointSDK in your project:
Download the latest pre-built static library from Handpoint's developer portal and refer to the documentation there for the installation steps.
Download the latest version from the master branch:
$ git clone https://github.com/handpoint/HandpointSDK-iOS.gitAlternatively you can add it as a git submodule:
$ git submodule add https://github.com/handpoint/HandpointSDK-iOS.gitYou'll find the dynamic framework project called HandpointSDK.xcodeproj at the root of the repo.
You'll find the static library project called headstart.xcodeproj under the Library folder.
We strongly discourage you from building this project yourself.
This project contains several targets, you need to build the aggregated target device-simulator Release
This target produces a .zip file in the same directory as the headstart.xcodeproj file containing both the library and the simulator library.
Full SDK documentation can be found at Handpoint's developer portal.
