-
Notifications
You must be signed in to change notification settings - Fork 3
fix: prevent duplicate elements in LaunchScreen.storyboard on repeated runs #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: ujas-m-simformsolutions <[email protected]>
| <constraint firstAttribute="trailing" secondItem="YRO-k0-Ey4" secondAttribute="trailing" id="TQA-XW-tRk"/> | ||
| <constraint firstItem="YRO-k0-Ey4" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="duK-uY-Gun"/> | ||
| <constraint firstAttribute="bottom" secondItem="edQ-YT-iED" secondAttribute="bottom" id="e2S-gZ-2jl"/> | ||
| <constraint firstAttribute="bottom" secondItem="edQ-YT-iED" secondAttribute="bottom" id="wnX-KJ-aN5"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont remove this constraint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restored the constraint in commit d214e27.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the command adds duplicate image with id edQ-YT-iED
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit d214e27. Added logic to check for existing background image element in the storyboard before creating a new one, preventing duplicates.
Co-authored-by: ujas-m-simformsolutions <[email protected]>
Description
Running
dart run splash_master createmultiple times duplicated elements inLaunchScreen.storyboard, causing invalid XML that breaks iOS builds.Changes
Fix duplicate background image element (
lib/cmd/ios_splash.dart)edQ-YT-iEDbefore creating a new onegetBackgroundImageElement(subViews)to verify element doesn't exist before creationFix constraint cleanup logic (
lib/cmd/ios_splash.dart)remove(getElement())toremoveWhere()at lines 178-183 and 216-221This makes the command idempotent—multiple runs produce identical, valid output without duplicate elements.
Checklist
fix:,feat:,docs:etc).docsand added dartdoc comments with///.examplesordocs.Breaking Change?
Related Issues
Closes #80
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.