Internal experiment only. This repository lives under the Velotio GitHub org (
velotio-tech) and exists solely as an engineering tryout for Spreedly client work. It is not an official PayPal product, not an official Spreedly SDK release, and not intended for production merchant use.
Spreedly’s iOS checkout work needs both Braintree and PayPal in the same application. Official SPM packages collide:
multiple packages ('braintree_ios', 'paypal-ios') declare targets with a conflicting name: 'PPRiskMagnes'
This repo tests a workaround: rebuild the PayPal iOS SDK as separate XCFrameworks, then distribute them from a single Swift package that does not declare the conflicting PPRiskMagnes target — so PayPal binaries can resolve alongside braintree_ios.
| Who | Use |
|---|---|
| Velotio / Spreedly iOS engineers | Spike, validate SPM resolve + dual-SDK apps |
| Spreedly product / tech lead | Review feasibility before any production approach |
| External merchants | Do not use |
| SPM product | XCFramework |
|---|---|
CorePayments |
XCFrameworks/CorePayments.xcframework |
PaymentButtons |
XCFrameworks/PaymentButtons.xcframework |
PayPalWebPayments |
XCFrameworks/PayPalWebPayments.xcframework |
CardPayments |
XCFrameworks/CardPayments.xcframework |
| (built, not in Package.swift) | FraudProtection.xcframework, PPRiskMagnes.xcframework |
FraudProtection / PPRiskMagnes are produced by the build script and committed under XCFrameworks/, but not declared in Package.swift — declaring PPRiskMagnes would recreate the SPM name clash with Braintree.
dependencies: [
.package(url: "https://github.com/velotio-tech/PayPalSDK.git", branch: "main")
],
targets: [
.target(
name: "MyApp",
dependencies: [
.product(name: "CorePayments", package: "PayPalSDK"),
.product(name: "PaymentButtons", package: "PayPalSDK"),
.product(name: "PayPalWebPayments", package: "PayPalSDK"),
]
)
]In Xcode: File → Add Package Dependencies… → git@github.com:velotio-tech/PayPalSDK.git
PayPalSDK.podspec vendors the same XCFrameworks. Default subspecs match SPM (no Magnes).
platform :ios, '16.0'
use_frameworks!
target 'MyApp' do
pod 'Braintree', '~> 7.0'
pod 'PayPalSDK', :git => 'https://github.com/velotio-tech/PayPalSDK.git', :branch => 'main'
# Or pin a tag: :tag => '2.0.1'
# Optional Magnes (avoid with Braintree): pod 'PayPalSDK/FraudProtection', ...
endSubspecs: CorePayments, PaymentButtons, PayPalWebPayments, CardPayments, optional FraudProtection.
Proof demo: DemoCocoaPods/ — pod install then build the workspace (Braintree + PayPalSDK).
cd DemoCocoaPods && pod install
xcodebuild build -workspace DemoCocoaPods.xcworkspace -scheme DemoCocoaPods \
-destination 'generic/platform=iOS Simulator' CODE_SIGNING_ALLOWED=NOOfficial paypal-ios and braintree_ios both declare SPM binary target PPRiskMagnes, so they cannot resolve together.
This package avoids that by not declaring PPRiskMagnes / FraudProtection in Package.swift. You can resolve this package alongside Braintree and use:
CorePaymentsPaymentButtonsPayPalWebPaymentsCardPayments
The Magnes XCFrameworks remain in XCFrameworks/ for manual experiments only.
# One-time: vendor source
git clone --depth 1 https://github.com/paypal/paypal-ios.git vendor/paypal-ios
./scripts/build-xcframeworks.shRequires Xcode with iOS + Simulator SDKs.
Package.swift # SPM
PayPalSDK.podspec # CocoaPods
XCFrameworks/ # committed binaries (SPM + CocoaPods)
DemoDualSDK/ # SPM + Braintree proof
DemoCocoaPods/ # CocoaPods + Braintree proof
scripts/build-xcframeworks.sh
vendor/paypal-ios/ # gitignored build input
build/ logs/ # gitignored
See VERSION.md.
PayPal SDK sources and binaries remain subject to PayPal’s upstream license. This repo only repackages them for an internal Spreedly feasibility experiment hosted in Velotio’s org. Do not publish, redistribute outside the engagement, or treat as a supported Spreedly distribution channel without explicit approval.