Skip to content

checkout/checkout-ios-components

Repository files navigation

Checkout.com Checkout.com

Flow for Mobile iOS SDK

license GitHub release (latest by date)

Minimum Requirements

  • iOS 15+
  • Xcode 16+
  • Swift 6
  • arm64

⚠️ Note
We dropped the support for x86. As of April 2025, Apple requires all apps submitted to the App Store to be built by Xcode 16+ which can’t be downloaded on an Intel chip MacBook. Hence there is no use case for the old architecture. We only support arm64 architecture.

Integration

For detailed integration steps, refer to our official documentation ↗️ . You can also explore our Sample Application for a practical implementation.

🔐 3DS authentication can be enabled by setting it to true during Configuration initialization.

 threeDS: .init(enabled: true, attemptN3D: true)

attemptN3D You can choose to automatically downgrade your payment to a non-3DS payment if there are any technical issues during the 3DS authentication process that would otherwise cause the payment to fail. To do this, set the attemptN3D field in your request to true and we'll automatically attempt to process the payment without 3DS authentication More info ↗️

Swift Package Manager

⚠️ Important
SPM (Swift Package Manager) and CocoaPods can usually coexist in the same project without issues. That said, since CocoaPods is now in maintenance mode, the iOS team made a tech decision to officially support only SPM going forward. It’s simpler to manage and already works well alongside CocoaPods if needed.

Swift Package Manager ↗️ integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies. It should work out of the box on latest Xcode projects since Xcode 11 and has had a lot of community support, seeing huge adoption over the recent years. This is our preferred distribution method for Frames iOS and is the easiest one to integrate, keep updated and build around.

If you've never used it before, get started with Apple's step by step guide into adding package dependencies ↗️ to your app

SPM sometimes has caching issues, it's better to do some clean up before upgrading to a new release.

  • close Xcode
  • In terminal:
  • Run brew install git-lfs
  • cd to your project folder then run these to clear cache
rm -rf ~/Library/Caches/org.swift.swiftpm
rm -rf ~/Library/org.swift.swiftpm
rm -rf ~/.swiftpm
rm -f ~/.swiftpm/configuration/mirrors.json
rm -f ~/.swiftpm/configuration/registries.json
rm -rf .build .swiftpm
rm -f Package.resolved
swift package reset
rm -rf ~/Library/Caches/com.apple.dt.Xcode
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ~/Library/Developer/Xcode/DerivedData/ModuleCache.noindex
rm -rf ~/Library/Developer/Xcode/DerivedData/PrecompiledHeaders
rm -rf ~/Library/Developer/Xcode/Archives
rm -rf ~/Library/Developer/Xcode/Products
rm -rf ~/Library/Caches/com.apple.dt.Xcode/SourcePackages
rm -rf ~/Library/Developer/Xcode/SourcePackages
rm -rf ~/Library/Caches/com.apple.nsurlsessiond
rm -rf ~/Library/Caches/com.apple.CFNetwork
  • Build the project using xcodebuild -resolvePackageDependencies

Setting Up the Sample App

Please use our Dashboard to create sandbox ↗️ /production ↗️ values:

  • processing_channel_id
  • secret_key
  • public_key
  1. After cloning the repository, navigate to SampleApplication/SampleApplication/Configuration. You will find the following files:

    • env-example.xcconfig: A template file containing dummy environment variables, which is tracked in source control.

    • EnvironmentVars.stencil: A code generation template used by Sourcery ↗️

  2. Open a terminal and navigate to the repository’s root folder:

    cd path/to/repository
  3. Run the initialization script:

    bash .github/scripts/init-env-vars.sh
  4. Locate the newly created env.xcconfig file (excluded from version control) and update it with your Checkout.com public and private keys.

  5. Generate the required Swift environment variables:

    bash .github/scripts/codegen-env-vars.sh
  6. This script will generate EnvironmentVars.generated.swift, which will be used in the project.

  7. Open the Sample Application in Xcode and run it.

  8. After completing the setup, your configuration files should resemble the structure shown below:

  9. Set the processingChannelID value when creating a PaymentSessionRequest in the sample application.

⚠️ Important
The secret key is embedded in the Sample Application only for demonstration purposes. Never include a secret key in your production application. Instead, always use your backend API to generate a payment session securely.

Changelog

Find our CHANGELOG ↗️

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages