Skip to content

feat: add SPM support for iOS - #109

Open
grvgoel81 wants to merge 1 commit into
masterfrom
feat/ios-spm-support
Open

feat: add SPM support for iOS#109
grvgoel81 wants to merge 1 commit into
masterfrom
feat/ios-spm-support

Conversation

@grvgoel81

@grvgoel81 grvgoel81 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Motivation and Context

Jira Link: https://consensyssoftware.atlassian.net/browse/EMBED-482

Description

Adds Swift Package Manager (SPM) support for the iOS plugin while keeping CocoaPods working (dual support).

  • Added ios/web3auth_flutter/Package.swift with dependencies on Web3Auth (≥12.0.1) and FetchNodeDetails (≥8.0.1)
  • Moved iOS sources into the SPM layout under ios/web3auth_flutter/Sources/web3auth_flutter/
  • Converted the iOS plugin to pure Swift (Web3AuthFlutterPlugin) — SPM does not allow mixed Swift/ObjC in one target
  • Updated ios/web3auth_flutter.podspec to use the new source paths and align version to 7.0.0
  • Bumped example app iOS deployment target from 13.0 → 14.0 (required by Web3Auth / plugin package)
  • Updated gitignores for .build/ and .swiftpm/
    CocoaPods remains supported for apps that have not migrated to SPM yet.

How has this been tested?

Tested the example app on Flutter 3.38.2:
SPM path

flutter config --enable-swift-package-manager
cd example
flutter clean && flutter pub get
flutter build ios --no-codesign
flutter run   # iOS Simulator

Screenshots (if appropriate):

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project. (run lint)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My code requires a db migration.

Note

Medium Risk
iOS integration and minimum OS (14+) change how apps build and who can adopt the plugin; auth behavior should be unchanged but build regressions are the main risk.

Overview
Adds Swift Package Manager support for the iOS plugin while keeping CocoaPods pointed at the same Swift sources under ios/web3auth_flutter/Sources/web3auth_flutter/. A new Package.swift pulls in Web3Auth (≥12.0.1) and an explicit FetchNodeDetails dependency for SPM module visibility.

The iOS bridge is pure Swift now: the Objective-C Web3AuthFlutterPlugin shim is removed and the plugin class is renamed from SwiftWeb3AuthFlutterPlugin to Web3AuthFlutterPlugin. The podspec version moves to 7.0.0, source_files follow the SPM tree, and the minimum platform is iOS 14.0 (example app and AppFrameworkInfo.plist updated from 13.0). Gitignores add .build/ and .swiftpm/.

Reviewed by Cursor Bugbot for commit d9bd5e3. Configure here.

@grvgoel81 grvgoel81 self-assigned this Sep 8, 2026
@grvgoel81 grvgoel81 changed the title feat: dual SPM and CocoaPods support for iOS feat: add SPM support for iOS Sep 8, 2026
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