Getting Started with Capture SDK for iOS¶
The Socket Mobile Capture SDK uses Bluetooth Classic through the External Accessory framework for the barcode scanner products and Bluetooth Low Energy (BLE) for the Contactless Reader/Writer products (Socket Mobile D600).
For applications that need to work with barcode scanners, make sure the following requirements are met:
- Your application needs to be registered in our whitelist before submitting your application to the Apple Store. It will not pass the Apple Store review if this is not done.
- Your application must have the string
com.socketmobile.chsin the Supported External Protocol setting.
- Your application will need a proper AppKey. Follow the link to create an AppKey. Note: You don’t need to create your own AppKey to compile and run the sample apps.
- The scanner needs to be paired with your devices in Application Mode. This can be done using Socket Mobile Companion app (recommended), which can be downloaded from the App Store . To pair your scanner in Application Mode without using Companion app, follow the instructions at: Configure and Pair Socket Mobile Devices in Application Mode for iOS.
- Try a sample app. Depending on your choice of language, you can try either the Single Entry in Swift or Single Entry in Objective C.
The Capture SDK is released as a CocoaPods package.
- There are 2 Capture flavors:
SKTCaptureObjCfor Objective C and
- Add the Capture SDK in your application and if your project does not already use a CocoaPods, then add the file
Podfilein your project root folder. The content of the file should look like this for Swift:
platform :ios, '9.0' target 'MyApp' pod 'SKTCapture', '~> 1.1'
use_frameworks! is no longer necessary since CocoaPods 1.5.0 and should be removed otherwise a double symbols link warnings will be displayed when you run your application in Debug mode.
- If your application already has a Podfile then you just need to add this line:
pod 'SKTCapture', '~> 1.1'.
- For Objective C the same applies, just the name changes:
platform :ios, '9.0' target 'MyApp' pod 'SKTCaptureObjC', '~> 1.1'