Access Checkout is split into two projects:
- The framework, AccessCheckoutSDK, available as a Cocoapods pod
- A sample App, AccessCheckoutDemo, demonstrating a simple integration
Simply add this SDK to your project using Cocoapods
Note: <access-checkout-ios-root> refers to the folder that contains your copy of the access-checkout-ios repository
-
Install XCode, if not already installed
-
Install cocoapods (for dependency management), if not already installed
sudo gem install cocoapods
-
Install dependencies for the SDK project (i.e. add pods)
cd <access-checkout-ios-root>/AccessCheckoutSDK pod install pod update
-
Open project in XCode
- Click on 'File > Open'
- Select the '/AccessCheckoutSDK/' directory and click 'Open'
-
Build the project
- Click the
Play
button in the top left corner to build the project, the build should be successful.
- Click the
-
Install
pact-ruby-standalone
- Download a copy from https://github.com/pact-foundation/pact-ruby-standalone
- Unzip the file in a folder of your choice (reference as
<pact-ruby-folder>
hereafter) - Run the
install.sh
script located in<pact-ruby-folder>
. This will install binaries in<pact-ruby-folder>/pact/bin/
-
Create a syml link to the
pact-ruby-standalone
binaries in the AccessCheckoutSDK projectcd <access-checkout-ios-root>/AccessCheckoutSDK/ mkdir pact cd pact ln -s <pact-ruby-folder>/pact/bin .
This step is required because we have configured a Test pre-action/post-action in XCode to start/stop a mock-service before and after the PACT tests. If you want, you can check this configuration as following:
1. Click on the AccessCheckoutSDK scheme next to the Play/Stop icon at the top of XCode 2. Click `Edit Scheme` 3. Expand `Test` 4. Click on `Pre-actions` / `Post-actions` to see the commands that are run
-
Go to the Test Navigator in XCode. You can access it by
- Clicking on View > Navigators > Show Test Navigator menu
- Or by clicking on the Diamond icon in the small menu bar above the list of modules
-
Click on the
Play
icon next toAccessCheckoutSDKTests
to run the unit tests -
Click on the
Play
icon next toAccessCheckoutSDKPactTest
to run the PACT tests- If you're having failures, make sure that the
<access-checkout-ios-root>/AccessCheckoutSDK/pact/bin
sym link exists
- If you're having failures, make sure that the
-
Install dependencies for the demo app
cd <access-checkout-ios-root>/AccessCheckoutDemo pod install pod update
-
Open project in XCode
- Click on 'File > Open'
- Select the '/AccessCheckoutSDKDemo/' directory and click 'Open'
-
Run the demo app
- Click the
Play
button on the top-left corner of the screen will actually open the demo app in the simulated device of your choice.
- Click the