Repository navigation
fix: example iOS SPM build and apply Flutter 3.44 example migrations - #127
Merged
Merged
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>
Commit the project migrations Flutter applies on every build/analyze so the example no longer leaves a dirty working tree: - AppDelegate: register plugins via FlutterImplicitEngineDelegate (UIScene) - Info.plist: UIApplicationSceneManifest with FlutterSceneDelegate - analysis_options.yaml: exclude platform/build dirs from the analyzer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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:Also commits the project migrations Flutter 3.44 applies on every
flutter build/analyze. Without them, every build leaves the example with uncommitted changes: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.flutter build iosleft 3 modified files. After, rebuilding leavesgit statusclean, and the build still passes.cd example && flutter analyze: 85 issues both before and after. All are existingprefer_const_constructors-style info lints, and none come from this PR.Merge Danger
Door: two-way. Revert the two removed lines.
Blast Radius: example app only. The UIScene migration changes how the example registers plugins, following Flutter's own template. It isn't part of the pub.dev package, and CI doesn't build it. No effect on SDK consumers.
🤖 Generated with Claude Code