Skip to content
payrocdevelopers

Set up the SDK

Add the Tap to Pay on iPhone SDK to your Xcode project, link the libraries, and configure your build settings.

Prerequisites: Authentication

To set up the SDK and start integrating, add the Tap to Pay on iPhone SDK to your Xcode project, and then configure your build settings.

Integration steps

  1. Download the SDK package.

  2. Extract the archives.

  3. Link the libraries to your app.

  4. Copy the resources to your project.

  5. Add your API key.

  6. (Optional) Create a Swift bridging header.

  7. Update your build settings.

Step 1. Download the SDK package

Step 2. Extract the archives

  1. Extract the contents from the PayrocTapToPayOniPhoneSDK zip folder. The package contains the following folders and files:
Folder or fileDescription
docs/HTML documentation and a script to load the documentation on your computer.
iosSample/Sample apps that we've created using Swift and Objective-C.
libs/SDK and plugin static libraries.
payconfig.xmlConfiguration file that contains the gateway URLs and your API key.
  1. Go to the libs folder, and then extract the following zip folders:

    • gochip-applettp*.zip

    • gochip-sdk*.zip

  1. In Xcode, open your project, and then select your project in the Project navigator.

  2. From the TARGETS list, select your app.

  3. Select the Build Phases tab.

  4. Expand Link Binary With Libraries, and then select +.

  5. Add each of the following libraries:

    • libAFNetworking*.a

    • libc++.tbd

    • libgochip-common*.a

    • libgochip-restconnector*.a

    • libgochip-sdk*.a

    • libgochip-applettp*.a

    • libISO8601*.a

    • libJSONModel*.a

Step 4. Copy the resources to your project

  • Copy the following files to the root of your app project:

    • PayrocTapToPayOniPhoneSDK/libs/Core.h

    • PayrocTapToPayOniPhoneSDK/payconfig.xml

Check that Xcode copied payconfig.xml into your app

If the payconfig.xml file isn't in Copy Bundle Resources, your app builds successfully but can't reach our gateway.

To check that Xcode copied payconfig.xml into your app when it builds, complete the following steps:

  1. From the TARGETS list, select your app, and then select the Build Phases tab.

  2. Expand Copy Bundle Resources.

  3. Check that the payconfig.xml file appears in the list.

  4. (Optional) If the payconfig.xml file isn't in the list, select +, and then add it.

Step 5. Add your API key

  • In the payconfig.xml file, enter your API key and integration ID.

Note: We provided you with your API key and integration ID when you boarded with us.

Step 6. (Optional) Create a Swift bridging header

If you're using Objective-C, go to Step 7. Update your build settings.

If you're using Swift, you need to create a Swift bridging header. To create a Swift bridging header, complete the following steps:

  1. Create a file named [YourAppName]-Bridging-Header.h in the root of your project.

  2. Add the following code to the file:

    objectivec
    #ifndef [YourAppName]_Bridging_Header_h
    #define [YourAppName]_Bridging_Header_h
    
    #import "Core.h"
    
    #endif /* [YourAppName]_Bridging_Header_h */
    

Step 7. Update your build settings

  1. From the TARGETS list, select your app, and then select the Build Settings tab.

  2. In the search box, search for Other Linker Flags, and then set its value to -ObjC.

  3. Search for Header Search Paths, and then add the path to the root of your app project.

  4. (Optional) If you're using Swift, search for Objective-C Bridging Header, and then set its value to the path of the bridging header that you created in Step 6.

Next step

After you set up the SDK, you need to configure the processing terminal.

Browse guides

Search documentation

API reference169
Guides118
Knowledge38
legal1
Solutions32
Workflows74
↑↓highlight↵openView all search results

Menu

Theme

Sign out

Your saved plans remain in your organization. This browser’s private draft and account view will be cleared.

Talk to an engineer