Check Xcode build setting FULL_PRODUCT_NAME for the name of the built app during flutter run#46838
Merged
fluttergithubbot merged 1 commit intoflutter:masterfrom Dec 13, 2019
Merged
Conversation
zanderso
approved these changes
Dec 12, 2019
| projectDir.path, | ||
| ]); | ||
|
|
||
| FakeAsync().run((FakeAsync time) { |
| } | ||
|
|
||
| // Match the log prefix (in order to shorten it): | ||
| // * Xcode 8: Sep 13 15:28:51 cbracken-macpro localhost Runner[37195]: (Flutter) Observatory listening on http://127.0.0.1:57701/ |
christopherfujino
approved these changes
Dec 12, 2019
Contributor
christopherfujino
left a comment
There was a problem hiding this comment.
LGTM, thanks again for taking this!
jmagman
added a commit
that referenced
this pull request
Dec 13, 2019
This was referenced Apr 28, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Users following the iOS deployment instructions to update their app's display name (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).Since the instructions say to edit the field in Xcode, there's really no way to extrapolate it from the pubspec or anywhere else.
There have been other attempts to avoid running
-showBuildSettingsfor performance reasons, like parsing the Info.plist for the bundle identifier, but that has caused different problems where the build settings/Info.plist get mismatched. And parsing the project file is never a good idea because it can't differentiate between other products the developer adds, like a watch app or non-Flutter framework.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:
Added: project_test.dart tests.
Checklist
///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change