feat: add SPM support for iOS - #109
Open
grvgoel81 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).
ios/web3auth_flutter/Package.swiftwith dependencies onWeb3Auth(≥12.0.1) andFetchNodeDetails(≥8.0.1)ios/web3auth_flutter/Sources/web3auth_flutter/Web3AuthFlutterPlugin) — SPM does not allow mixed Swift/ObjC in one targetios/web3auth_flutter.podspecto use the new source paths and align version to7.0.0.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
Screenshots (if appropriate):
N/A
Types of changes
Checklist:
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 newPackage.swiftpulls inWeb3Auth(≥12.0.1) and an explicitFetchNodeDetailsdependency for SPM module visibility.The iOS bridge is pure Swift now: the Objective-C
Web3AuthFlutterPluginshim is removed and the plugin class is renamed fromSwiftWeb3AuthFlutterPlugintoWeb3AuthFlutterPlugin. The podspec version moves to 7.0.0,source_filesfollow the SPM tree, and the minimum platform is iOS 14.0 (example app andAppFrameworkInfo.plistupdated from 13.0). Gitignores add.build/and.swiftpm/.Reviewed by Cursor Bugbot for commit d9bd5e3. Configure here.