Set up using Carthage
The SDK supports installation using the Carthage dependency manager.
Just run the carthage update command in the SDK root directory and get the WDePOS and related frameworks from Carthage/Build/<platform>
directory
carthage update
Set up Manually (Not Recommended)
To manually install the SDK:
-
Make sure you have cocoapods installed.
-
Download the SDK from Wirecard ePOS SDK for iOS repository on Github.
- Unzip it and run 'pod install' within "unzipped_SDK/Example" folder.
- After the pods are installed, copy the Pods.xcodeproj from "unzipped_SDK/Example/Pods" into your own project. Make sure you are copying the xcodeproj and not the Pods folder; otherwise you may enter into duplicated definitions problems.
- After the Pods.xcodeproj is added to your project, manually add the following frameworks into your project's General section "Embedded binaries":
AFNetworking.framework
BerTlv.framework
CocoaLumberjack.framework
INTULocationManager.framework
libextobjc.framework
Lockbox.framework
Mantle.framework
Overcoat.framework
ZipArchive.framework - Other Wirecard ePOS SDK frameworks need to be added manually. Add to your project the WDePos.framework and the WDePosResources.bundle files, and other hardware frameworks you plan on using, from "unzipped_SDK/Pod/Classes". Terminal Extension frameworks that add support for terminals, printers, cash registers and scanners are:
Device Framework Accessory protocol [SPm2] Spire_SDK.framework com.thyron [StarMicronics , mPOP] Stario_SDK.framework jp.star-m.starpro [DPP-250] Datecs_SDK.framework com.datecs.printer.escpos [SocketScanner] Socket_SDK.framework com.socketmobile.chs Together with the step .5, your "Embedded binaries" section will look like: - You also need to add the WDePosResources.bundle file into your project's Build Phases "Copy Bundle Resources” section:
- Now add the following Apple frameworks in your project's General "Linked Frameworks and Libraries" section:
ExternalAccessory
CoreFoundation
CoreLocation
CoreBluetooth
UIKit
CoreGraphics
Security
SystemConfiguration
Foundation
MobileCoreServices
Together with the steps above, it will look like: - Make sure your project Build Settings/Build Options has “Always Embed Swift Standard Libraries” set to YES:
- And the last step: edit your project's info.plist (the faster way is as a text file) and copy paste the lines below. That way your project will include all needed keys/values and protocols for enabling hardware communication, permissions, etc. Make sure you don't have the following keys already defined with different values, and that you are going to use the UISupportedExternalAccessoryProtocols into your app (do not include the ones for hardware you don't plan on supporting, see point .6).
<key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict> <key>UIBackgroundModes</key> <array> <string>audio</string> <string>fetch</string> <string>external-accessory</string> <string>bluetooth-peripheral</string> <string>bluetooth-central</string> </array> <key>NSBluetoothPeripheralUsageDescription</key> <string>BlueTooth is required for Terminal and Printer communication</string> <key>NSCameraUsageDescription</key> <string>Camera will be used for barcode scanning and taking Photos for product catalogue</string> <key>NSLocationWhenInUseUsageDescription</key> <string>The terminal location will be used for all payments</string> <key>NSMicrophoneUsageDescription</key> <string>Audio jack is used for payment terminals such as BBPOS Chippers/Swippers</string> <key>NSPhotoLibraryUsageDescription</key> <string>Media Library will be used for adding pictures to catalogue products of your own</string> <key>UISupportedExternalAccessoryProtocols</key> <array> <string>com.socketmobile.chs</string> <string>com.thyron</string> <string>com.datecs.printer.escpos</string> <string>jp.star-m.starpro</string> </array>