Repository navigation
fix: example iOS build fails with SPM package identity mismatch - #127
Open
muzahidul-opti wants to merge 1 commit into
Open
muzahidul-opti wants to merge 1 commit into
muzahidul-opti wants to merge 1 commit into
Conversation
Runner.xcodeproj referenced ios/optimizely_flutter_sdk as a folder, which Xcode treats as a local package override with identity 'optimizely_flutter_sdk'. Flutter's generated plugin package references the same package via a symlink named 'optimizely-flutter-sdk', and SPM refuses the mismatched identities. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Summary
example/ios/Runner.xcodeproj Flutter group - optimizely_flutter_sdk -> ../../ios/optimizely_flutter_sdk # folder ref (added in #116) FlutterFramework FlutterGeneratedPluginSwiftPackageXcode treats a package folder added to a project as a local override, and it uses the folder name as the package identity (
optimizely_flutter_sdk). Flutter's generated plugin package points at the same package through a symlink namedoptimizely-flutter-sdk. SPM won't let one package have two identities:Removing the folder reference leaves Flutter's generated package as the only reference to the plugin. You can still browse and edit the plugin sources through that package in Xcode.
Evidence
master, checkout folderoptimizely-flutter-sdk):cd example && flutter build ios --simulator --no-codesign→ exit 1, the identity error above.After (this branch, same folder name):
✓ Built build/ios/iphonesimulator/Runner.app→ exit 0.AppDelegate.swift/Info.plist, analyzer excludes inanalysis_options.yaml). They aren't needed for this fix, so I left them out of this PR.Merge Danger
Door: two-way. Revert the two removed lines.
Blast Radius: example app only. It isn't part of the pub.dev package, and CI doesn't build it. No effect on SDK consumers.
🤖 Generated with Claude Code