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>
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
If you don't have a Podfile
yet:
$ pod init
To 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', '~> 3.2.3'
end
Then, run the following command:
$ pod install
Carthage 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 carthage
To 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.git
Alternatively you can add it as a git submodule:
$ git submodule add https://github.com/handpoint/HandpointSDK-iOS.git
You'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.