This repository contains the Swift Package Manager distribution of the Braintree iOS SDK.
The MCP server automatically updates the SPM package when new versions of the Braintree iOS SDK are released.
- Node.js >= 14.0.0
- Git configured with write access to this repository
Create a .env
file in the root directory with the following variables:
# Server Configuration
PORT=3000
# GitHub Configuration
GITHUB_SECRET=your-webhook-secret
GITHUB_TOKEN=your-github-token
BRAINTREE_REPO=braintree/braintree_ios
-
Install dependencies:
npm install
-
Start the server:
npm start
For development with auto-reload:
npm run dev
- Go to your GitHub repository settings
- Navigate to Webhooks > Add webhook
- Set Payload URL to your server URL (e.g.,
https://your-server.com/webhook
) - Set Content type to
application/json
- Set Secret to the same value as
GITHUB_SECRET
in your.env
file - Select "Let me select individual events"
- Choose only "Releases"
- Click "Add webhook"
- When a new release is published in the Braintree iOS repository, GitHub sends a webhook event to the MCP server
- The server verifies the webhook signature using the secret
- If the event is a new release, the server:
- Downloads the new XCFramework
- Updates the package version
- Commits and pushes the changes
- Creates a new tag for the release
You can manually update the frameworks using:
./update-framework.sh <version> [--force]
Example:
./update-framework.sh 6.30.0 --force
dependencies: [
.package(url: "https://github.com/yourusername/braintree_ios_spm.git", from: "6.30.0")
]
Then add the specific Braintree modules you need to your target dependencies:
targets: [
.target(
name: "YourTarget",
dependencies: [
.product(name: "BraintreeCore", package: "braintree_ios_spm"),
.product(name: "BraintreeCard", package: "braintree_ios_spm"),
.product(name: "BraintreePayPal", package: "braintree_ios_spm")
// Add other modules as needed
]
)
]
This package provides the following Braintree modules:
- BraintreeCore - Core functionality required by all other modules
- BraintreeAmericanExpress - American Express payments
- BraintreeApplePay - Apple Pay integration
- BraintreeCard - Credit and debit card payments
- BraintreeDataCollector - Fraud detection tools
- BraintreeLocalPayment - Local payment methods
- BraintreePayPal - PayPal payments
- BraintreePayPalMessaging - PayPal messaging components
- BraintreePayPalNativeCheckout - Native PayPal checkout experience
- BraintreeSEPADirectDebit - SEPA direct debit payments
- BraintreeShopperInsights - Shopper data collection
- BraintreeThreeDSecure - 3D Secure authentication
- BraintreeVenmo - Venmo payments
This repository automatically downloads the official Braintree iOS SDK XCFramework from the official Braintree repository and creates a Swift Package Manager compatible package.
The GitHub Action workflow runs whenever a new release is published, downloading the specified version of the Braintree XCFramework, calculating its checksum, and updating the Package.swift file.
For documentation and usage instructions, see the official Braintree documentation.