feat: Support UIScene Lifecyle#423
Conversation
|
To view this pull requests documentation preview, visit the following URL: docs.page/abausg/home_widget~423 Documentation is deployed and generated using docs.page. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis PR upgrades Flutter/Dart SDK constraints, migrates iOS apps to implicit engine delegates with new scene lifecycle support, integrates FlutterGeneratedPluginSwiftPackage across Xcode builds, and refactors code formatting and tests. ChangesiOS Plugin Architecture and Build System Migration
Code Formatting and Test Updates
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #423 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 175 174 -1
=========================================
- Hits 175 174 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/home_widget/example/ios/Runner.xcodeproj/project.pbxproj (1)
297-307:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winRemove the leftover
[CP] Embed Pods Frameworksbuild phase from the home_widget iOS Runner.
packages/home_widget/example/ios/Runner.xcodeproj/project.pbxprojstill contains the legacy CocoaPods embed-frameworks phase (DA06ECC516BB8D6C47C7C8FB) even though the project is already wired toFlutterGeneratedPluginSwiftPackage, so it should be removed to avoid redundant embed/codesign behavior.🛠️ Proposed cleanup
97C146ED1CF9000F007C117D /* Runner */ = { packageProductDependencies = ( 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */, ); isa = PBXNativeTarget; @@ buildPhases = ( D05EB4AE28294B897266E68B /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3AAC6A4E2B1CD43900ED5F59 /* Embed Foundation Extensions */, - DA06ECC516BB8D6C47C7C8FB /* [CP] Embed Pods Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, ); @@ - DA06ECC516BB8D6C47C7C8FB /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - };🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/home_widget/example/ios/Runner.xcodeproj/project.pbxproj` around lines 297 - 307, Remove the legacy CocoaPods embed-frameworks build phase entry (identifier DA06ECC516BB8D6C47C7C8FB, name "[CP] Embed Pods Frameworks") from the Runner target's buildPhases array and delete the corresponding PBXBuildPhase/PBXCopyFilesBuildPhase object and any references to DA06ECC516BB8D6C47C7C8FB elsewhere in the project.pbxproj so the project no longer contains the redundant embed/codesign phase now handled by FlutterGeneratedPluginSwiftPackage.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/home_widget/lib/src/home_widget_info.dart`:
- Around line 42-45: The parsing of configuration mutates the caller-owned data
map by using cascade with removeWhere on (data['configuration']), so change the
code in the fromMap parsing for configuration to operate on a shallow copy
instead of mutating data: when reading data['configuration'] create a new Map
copy (e.g., Map.from or Map<String,dynamic>.from) and then call removeWhere/cast
on that copy before assigning to the configuration field; reference the
configuration parsing expression that currently uses ((data['configuration'] as
Map<dynamic, dynamic>?) ?..removeWhere(...))?.cast<String, dynamic>() and ensure
the original data variable is not modified.
In `@pubspec.yaml`:
- Line 5: Update the pubspec and PR text to make the minimum SDK rationale
accurate: if UIScene support is the justification, state that UIScene is
supported starting Flutter 3.41 and not 3.38.1, and either lower or correct the
Flutter minimum accordingly; if you intend to require Dart SDK ^3.10.0 and
Flutter 3.38.1 as a general breaking minimum (unrelated to UIScene), explicitly
state that in the PR/changelog and mark it as a breaking change. Ensure the
pubspec.yaml sdk: ^3.10.0 declaration is consistent with the documented Flutter
minimum and that the changelog/PR description documents the breaking-minimum
requirement and rationale for UIScene vs general SDK bump.
---
Outside diff comments:
In `@packages/home_widget/example/ios/Runner.xcodeproj/project.pbxproj`:
- Around line 297-307: Remove the legacy CocoaPods embed-frameworks build phase
entry (identifier DA06ECC516BB8D6C47C7C8FB, name "[CP] Embed Pods Frameworks")
from the Runner target's buildPhases array and delete the corresponding
PBXBuildPhase/PBXCopyFilesBuildPhase object and any references to
DA06ECC516BB8D6C47C7C8FB elsewhere in the project.pbxproj so the project no
longer contains the redundant embed/codesign phase now handled by
FlutterGeneratedPluginSwiftPackage.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 87b25b1e-b95e-4a49-9d37-1ffea9b91704
📒 Files selected for processing (32)
examples/configurable_widget/ios/Flutter/AppFrameworkInfo.plistexamples/configurable_widget/ios/Runner.xcodeproj/project.pbxprojexamples/configurable_widget/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcschemeexamples/configurable_widget/lib/android_configuration_page.dartexamples/configurable_widget/lib/main.dartexamples/configurable_widget/pubspec.yamlexamples/file_and_images/ios/Flutter/AppFrameworkInfo.plistexamples/file_and_images/ios/Runner.xcodeproj/project.pbxprojexamples/file_and_images/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcschemeexamples/file_and_images/ios/Runner/AppDelegate.swiftexamples/file_and_images/ios/Runner/Info.plistexamples/lockscreen_widgets/ios/Flutter/AppFrameworkInfo.plistexamples/lockscreen_widgets/ios/Runner.xcodeproj/project.pbxprojexamples/lockscreen_widgets/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcschemeexamples/lockscreen_widgets/ios/Runner/AppDelegate.swiftexamples/lockscreen_widgets/ios/Runner/Info.plistexamples/lockscreen_widgets/pubspec.yamlpackages/home_widget/example/integration_test/android_test.dartpackages/home_widget/example/integration_test/ios_test.dartpackages/home_widget/example/ios/Flutter/AppFrameworkInfo.plistpackages/home_widget/example/ios/Runner.xcodeproj/project.pbxprojpackages/home_widget/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcschemepackages/home_widget/example/lib/main.dartpackages/home_widget/example/pubspec.yamlpackages/home_widget/ios/home_widget/Sources/home_widget/HomeWidgetPlugin.swiftpackages/home_widget/lib/src/home_widget.dartpackages/home_widget/lib/src/home_widget_callback_dispatcher.dartpackages/home_widget/lib/src/home_widget_info.dartpackages/home_widget/pubspec.yamlpackages/home_widget/test/background_test.dartpackages/home_widget/test/home_widget_test.dartpubspec.yaml
💤 Files with no reviewable changes (4)
- packages/home_widget/example/ios/Flutter/AppFrameworkInfo.plist
- examples/configurable_widget/ios/Flutter/AppFrameworkInfo.plist
- examples/file_and_images/ios/Flutter/AppFrameworkInfo.plist
- examples/lockscreen_widgets/ios/Flutter/AppFrameworkInfo.plist
|
When will it get merged? and published as new version? |
Description
Migrating to support UIScene Lifecycle
Checklist
exampleor documentation.Breaking Change?
Related Issues