Running the Clover Go iOS SDK sample app

(Legacy Content)

Initial SDK setup

  1. Clone the SDK, go into the Example folder and check out the branch for Swift 5:
git clone https://github.com/clover/remote-pay-ios-go.git
cd remote-pay-ios-go/Example
git checkout CloverGo_Swift5.0
  1. Ensure that the following dependencies in your Podfile are set to the right versions:
    pod 'Starscream', :git => 'https://github.com/daltoniam/Starscream.git', :tag => '3.0.5'pod 'GoConnector', '3.3.5'
  2. Update your project dependencies by running pod install.

Xcode steps

  1. Close any current Xcode sessions and open CloverConnector.xcworkspace.
  2. Set your Enable Bitcode setting to false for the following:
  • Project Target (CloverConnector > CloverConnector_Example > Build Options > Enable Bitcode = No)
  • Pod CloverGoSDK (Pods > CloverGoSDK > Build Settings > Build Options > Enable Bitcode = No)
1744
  • Pod GoConnector (Pods > GoConnector > Build Settings > Build Options > Enable Bitcode = No)
  1. In ViewController.swift, set your accessToken, apiKey, and secret in the following code block:
override func viewDidLoad() {
        super.viewDidLoad()
        PARAMETERS.accessToken = "Access token that you generated via the OAuth flow earlier"
        PARAMETERS.apiKey = "Get this value from your DevRel representative"
        PARAMETERS.secret = "Get this value from your DevRel representative"
        if let savedEndpoint = UserDefaults.standard.string(forKey: WS_ENDPOINT) {
            endpointTextField.text = savedEndpoint
        }
    }