Install the SDK 2017-02-05T13:57:02+00:00

iOS – Install the SDK

The Jetpay iOS SDK can be installed from a number of sources.

CocoaPods, Carthage and Github are currently supported.

1. Install the latest version of CocoaPods

2. Add pod ‘Jetpay’ to your Podfile and run pod install from the command line

3. Open your project using the Xcode workspace (*.xcworkspace)

To update to the latest version of the Jetpay SDK, run  pod update Jetpay from the command line

Download & Installing Carthage

1. Download Carthage using either Homebrew or a .pkg installer.

2. Download the .pkg installer here https://github.com/Carthage/Carthage/releases

3. Double-click the Carthage.pkg and follow the instructions to install.

4. Confirm Carthage has installed by typing: carthage version in a terminal window.

Configuring Carthage

1. Navigate to the root folder of your Xcode project from a Terminal window.

2. Create the Carthage Cart file using touch Cartfile. Carthage uses the Cartfile to specify dependencies and where to install these dependencies from.

3. Open the Cartfile using: open -a Xcode Cartfile

Note: Any other editor will do, but avoid Apple’s TextEdit because of it’s use of “smart quotes”.

4. Add the following line to the Cartfile and save it: github “JetPaySolutions/jetpay-ios-framework”

Retrieving the JetPay SDK with Carthage

1. Now that your Cartfile has been created and updated with the Jetpay SDK dependency, type: carthage update —platform iOS from a Terminal window.

2. This instructs Carthage to clone the JetPay SDK repository into ./Carthage/Checkouts and then to build these files into a framework in ./Carthage/Build. Since the Jetpay SDK repo already contains the framework, the framework file is located in ./Carthage/Checkouts.

Adding the SDK to your project

1. From Xcode, right-click on the project, then select the   “Add Files to..YOUR PROJECT”  option, and select Jetpay.framework from within the ./Carthage/Checkouts folder.

Linking your App against the SDK

1. From within Xcode, for each target in your project which will use the Jetpay SDK, select the target, go to the General tab, scroll down to the Embedded Binaries section and drag Jetpay.framework onto this section.

Note: Xcode may have already done this for you, depending on what Xcode version you are running.

2. Finally, for each source file in your project which uses the SDK, insert  import Jetpay at the top of the source file.

You are now ready to go!

Downloading the SDK

1. Download or Clone the JetPay SDK from https://github.com/JetPaySolutions/jetpay-ios-framework

2. For the download, a jetpay-ios-framework-master folder will be downloaded.

Adding the SDK to your project

1. From Xcode, right-click on the project, select the “Add Files to..YOUR PROJECT” option, and select Jetpay.framework  from within the jetpay-ios-framework-master folder.

Linking your App against the SDK

1. From within Xcode, for each target in your project which will use the JetPay SDK, select the target, go to the General tab, scroll down to the Embedded Binaries section and drag Jetpay.framework onto this section.

Note: Xcode may have already done this for you, depending on what Xcode version you are running.

2. Finally, for each source file in your project which uses the SDK, insert  import Jetpay  at the top of the source file.

You are now ready to go!

Next – Configure the SDK