This document outlines development practices that we follow while developing this SDK.
The included demo app utilizes a sandbox sample merchant server hosted on Heroku.
Ensure that you have SwiftLint installed as we utilize it within our project.
To install via Homebrew run:
brew install swiftlint
Our Xcode workspace has a Run Phase which integrates in SwiftLint so the only prerequisite is installing via Homebrew.
While we use SwiftLint in the SDK to adhere to a general style, there are some guidelines that are not able to be captured by our linter rules. Those guidelines are defined in our style guide. Please refer to these when developing for the SDK.
Each module has a corresponding unit test target. These can be run individually, or all at once via the UnitTests scheme.
To run the tests:
- Fetch test dependencies
pod install
- Run tests
xcodebuild test -workspace Braintree.xcworkspace -scheme UnitTests -destination 'platform=iOS Simulator,name=iPhone 14'- OR via the Xcode UI by selecting the
UnitTestsscheme +⌘U
Note: Running the UI and IntegrationTests schemes follows the same steps as above, just replacing the UnitTests scheme name in step 3.
Refer to the ios/releases section in the internal SDK Knowledge Repo.