Skip to content

Consume Zcash SDK via Swift Package Manager - #68

Draft
j0ntz wants to merge 1 commit into
masterfrom
jon/zcash-cocoapods-to-spm
Draft

Consume Zcash SDK via Swift Package Manager#68
j0ntz wants to merge 1 commit into
masterfrom
jon/zcash-cocoapods-to-spm

Conversation

@j0ntz

@j0ntz j0ntz commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrate the iOS Zcash SDK (ZcashLightClientKit) from a vendored CocoaPods dependency to Swift Package Manager, per the Zcash SDK's move to SPM-only distribution.

  • The pod no longer vendors the ZcashLightClientKit Swift source, libzcashlc.xcframework, or the gRPC-Swift / SQLite.swift pod dependencies. The host app adds zcash-swift-wallet-sdk (the official SDK) as a Swift Package; this package now ships only the React Native bridge.
  • RNZcash.swift imports ZcashLightClientKit from the SPM module (previously the SDK was compiled into the same pod module, so no import was needed).
  • Dropped the zcashlc.h include from the bridging header (the FFI is internal to the SPM SDK).
  • Bumped to 0.13.0.

Host-app integration (edge-react-gui)

The consuming app must add the ZcashLightClientKit Swift Package to its Xcode project and link it to the app target. Because CocoaPods still provides every other dependency, Pods and SPM coexist in the same project (CocoaPods 1.16 auto-mirrors the SPM product into the Pods project so the RN bridge pod can import the module).

Status: DRAFT

This is not publishable/mergeable yet:

  • The host-app SPM integration and a full iOS build + ZEC wallet sim test are still pending (see the host-app task).
  • Known coexistence issue to resolve: react-native-piratechain still pulls gRPC-Swift ~> 1.8 as a Pod while the SPM Zcash SDK pulls grpc-swift 1.27.5 — under static linkage that collides. The clean fix is to also migrate piratechain's SDK (PirateLightClientKit, which is SPM-ready) to SPM so the resolver unifies the gRPC/NIO/SwiftProtobuf/SQLite graph.
  • Follow-up: simplify scripts/updateSources.ts to stop vendoring the now-unused SDK source into the tarball.

https://claude.ai/code/session_019nYrjJ47fMBDnp9XdXT33g

Stop vendoring the ZcashLightClientKit source and libzcashlc.xcframework
into the pod. The host app now adds the zcash-swift-wallet-sdk Swift
Package, and this package ships only the React Native bridge, which
imports ZcashLightClientKit from the SPM module. Drop the gRPC-Swift and
SQLite.swift pod dependencies (now provided transitively by the SPM SDK)
and the zcashlc.h bridging include.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant