Upgrade project.pbxproj to include flutter_assets#13011
Upgrade project.pbxproj to include flutter_assets#13011szakarias merged 3 commits intoflutter:masterfrom
Conversation
91117ae to
eee38ec
Compare
jakobr-google
left a comment
There was a problem hiding this comment.
LGTM, just a couple of points.
| bool codesign: true, | ||
| bool usesTerminalUi: true, | ||
| }) async { | ||
| upgradePbxProjWithFlutterAssets(app.name); |
There was a problem hiding this comment.
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.
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.
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.
Maybe check for a line containing path = Flutter/flutter_assets?
|
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.