Repository navigation
Check Xcode build setting FULL_PRODUCT_NAME for bundle name - #55799
Conversation
18e4c0c to
cff5437
Compare
daea0f6 to
2f88ead
Compare
jmagman
left a comment
There was a problem hiding this comment.
@jmagman I remember reviewing #46838. Can you give me the tl;dr on why it was reverted (was it because of
basic_material_app_ios__compile?) and the differences in this PR?
Yes, sorry meant to do this!
There are three main changes:
- I renamed the Flutter Gallery integration test in Xcode's UI (details inline in comment).
- The pre-iOS 11 simulator logs need to be parsed to handle older versions of log lines. This caused the original revert. (details inline in comment).
- The creation template has not been changed. That was the riskiest part of #46838, and upon further thought, isn't really necessary. We can leave as-is with the name being set in the Info.plist, but make sure we handle if users change the Display Name from Xcode's UI (the way you're really supposed to do this).
There was a problem hiding this comment.
- I renamed the Flutter Gallery integration test in Xcode's UI, which names in the project, not the Info.plist.
This project is used in Cirrus and devicelab tests, any if it canflutter runwith a "Flutter Gallery.app" instead of "Runner.app" then it proves this works.
There was a problem hiding this comment.
There was a problem hiding this comment.
- The last attempt at this PR was reverted because of a g3 test that checked the format of a simulator log from some older iOS SDK. I added that test at Add iOS simulator log parse test #55808, and it passes in this PR.
This code is filtering out log lines that come from an app other than this one (category doesn't match the app name). The previous regex assumed the app name was one word (Runner), but now we don't know how many words it will be, and it's hard to separate it out from the hostname, plus we don't know how many tokens the date will have since it's different formats across iOS SDKs. So now it checks if anything after the date (green match below) ENDS in the app name instead of exactly matches.
There was a problem hiding this comment.
This is a great comment, very clear (and the screenshot helps as well). That being said, I was completely bewildered from just reading the code. Do you think you can add more context to the comments here (especially why you're using .endsWith()?
There was a problem hiding this comment.
category != _appName && !category.endsWith(' $_appName') is redundant.
e7d8b63 to
85013ff
Compare
christopherfujino
left a comment
There was a problem hiding this comment.
LGTM, with a nit about additional comments about the log parsing change.
There was a problem hiding this comment.
nit: avoid getters that do work: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#getters-feel-faster-than-methods
The way we usually set this up is to have a private _ hostAppBundleName, and then a _compute HostAppBundleName that initializes the field:
int _foo;
int _computeFoo();
int get foo => _foo ??= _computeFoo();
``
There was a problem hiding this comment.
Will swap productBundleIdentifier too.
|
Sorry for not reviewing; I was OOO Thu-Mon |

Another attempt at #46838.
Description
Users who update their app's display name from Xcode's UI (what gets shown on the home screen under the icon) can no longer
flutter run. Xcode setsPRODUCT_NAMEto whatever is input to General > Display Name, and that's used to name theMy App.appapp product (spaces and all).This will still work for "legacy" apps called Runner.app or with a display name hard-coded in the Info.plist.
Related Issues
Fixes #41793
See also #9767 (comment)
Tests
Updated:
Update gallery integration test to set the name in the project instead of the Info.plist (the default way Xcode projects and macOS Flutter Xcode projects are named).
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change