The Sample App

Building the Sample Application

  1. Install xCode version 7.2 or newer on your Mac from the Mac app store. You may be able to use an earlier version, but for the purposes of this guide, we will assume you are using xCode version 7.2 or newer. To find more information on xCode, please visit https://developer.apple.com/support/xcode/.
  2. Copy the Elavon Sample App zip file (ElavonPaySampleApp.zip) and unzip in the Command Line (using the Terminal app on your Mac computer), using:

unzip CommerceConverge-SampleAppDebug.zip -d _outputFolder_

where you replace outputFolder with the folder you would like all the files to located.

* Do not unzip the zip file by double clicking on it as this will cause the files to lose symbolic links that are needed inside the uncompressed folders. * Do not release your application using the debug build of Commerce frameworks that are included with the sample app or from ElavonPayDebug.zip. Use the frameworks found inside ElavonPayRelease.zip.
  1. Open xCode and open ElavonPaySampleApp.xcodeproj using xCode’s File | Open menu from the folder you unzipped the files.
  2. Connect your iOS device to your Mac.
  3. On the toolbar where it shows what device you are building for, click on it and choose your device you just connected. You can build the sample app for the simulator, but you will be unable to complete a transaction.

  1. Now, we need to change the Team and Provisioning profile you are using to build the application so that it can run on phones of your team.

    1. In the project navigator, click on ElavonPaySampleApp.

    2. Under Targets click on ElavonPaySampleApp.

    3. Make sure the General settings is clicked near the top of xCode.

    4. Click on the team combobox and select your development team you are part of through Apple’s Developer Program, or you can choose your personal team. Should have your team with personal team in parenthesis.

    5. You may need to click Fix Issue in order to download a code signing certificate if you have not previously. The provisioning profile is set to Automatic, so xCode should be able to create one for you when building.

  2. The ElavonPaySampleApp is built to allow US and Canadian transactions by default. You will need the Converge Mrchant ID and your Apple Merchant ID for the countries you want to test. There are two places you need to put them:

    1. Default Values

      1. First press Command+Shift+O and type ViewController.m.

      2. Look for the list of defines under “// Default Values”. Fill in the values for your merchant.

    2. Project Settings

      You also need to set the Apple Merchant ID in the project settings.

      1. In the project navigator, click on ElavonPaySampleApp.

      2. Under Targets, click on ElavonPaySampleApp.

      3. Click on the Capabilities tab.

      4. Turn the Wallet capability on.

      5. Turn the Apple Pay capability on.

      6. Click the + under Merchant IDs and add the US and/or Canadian merchant IDs.

  3. To build, press Command+B.

  4. To run, press Command+R.

  5. Once your application is running, verify the correct Converge Merchant ID and Apple Merchant ID are showing.

  1. If you want to run the sample app with the release build of the framework, run unzip ElavonPayRelease.zip, and copy the frameworks using:

    cp -a

    over the debug frameworks including in the sample app zip file. You will be unable to debug when you use the release builds of the framework.

Only release your application using the release version of the framework.