-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Upgrade project.pbxproj to include flutter_assets #13011
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
Conversation
91117ae to
eee38ec
Compare
jakobr-google
left a comment
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.
LGTM, just a couple of points.
| bool codesign: true, | ||
| bool usesTerminalUi: true, | ||
| }) async { | ||
| upgradePbxProjWithFlutterAssets(app.name); |
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.
You'll need an await here, otherwise it might not be done by the time the build runs.
|
|
||
| final StringBuffer buffer = new StringBuffer(); | ||
| lines.forEach(buffer.writeln); | ||
| xcodeProjectFile.writeAsString(buffer.toString()); |
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.
Should add an await here, as well.
|
|
||
| printStatus("Upgrading project.pbxproj of $app' to include the " | ||
| "'flutter_assets' directory"); | ||
| lines.insert(lines.indexOf(l1) + 1, l2); |
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.
This'll work in by far the most cases, but if the user has been tinkering with the project, there's a small risk they might have changed some of these, in which case it'll be hard for us to upgrade the project automatically.
Could you check if these lines exist, and print out a message telling the user what to do manually if they don't?
(if a line doesn't exist, indexOf() returns -1, so the current code will insert the corresponding new line at the beginning of the file.)
| final String l7 = ' 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,'; | ||
| final String l8 = ' 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,'; | ||
|
|
||
| if (lines.contains(l2)) |
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.
Maybe check for a line containing path = Flutter/flutter_assets?
jakobr-google
left a comment
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.
LGTM
|
cc @xster who may be interested since he's working on auto-update code. |
|
@szakarias is this ready to land? |
|
It should land when #12944 is landed. |
)" This reverts commit 08128cb.
* Revert "Include a directory with Flutter assets (#12944)" This reverts commit 3af6b9c. * Revert "Upgrade project.pbxproj to include flutter_assets (#13011)" This reverts commit 08128cb. * Revert "Upgrade complex_layout project.pbxproj to include flutter_assets (#13544)" This reverts commit 35f1a04. * mark complex_layout_ios__start_up as flaky
* Revert "Include a directory with Flutter assets (flutter#12944)" This reverts commit 3af6b9c. * Revert "Upgrade project.pbxproj to include flutter_assets (flutter#13011)" This reverts commit 08128cb. * Revert "Upgrade complex_layout project.pbxproj to include flutter_assets (flutter#13544)" This reverts commit 35f1a04. * mark complex_layout_ios__start_up as flaky
Needed for #12944.