Xcode won't use with FLUTTER_BUILD_NAME
I ran into this issue yesterday and really struggled to find out what's going on my flutter project. I hope my two cents help anyone out there...
One day I manually updated version in xcode (super mistake) then Generated.xcconfig not worked anymore. I still don't know why some settings have changed also but anyway here's solution:
well-working versioning project:
project of the problem:
When I changed the three Runner configuration file to Debug
, Release
, Release
, the version showed up immediately:
ps) I got hint from the chat of @Zholen and @Claudio Redi. Thank you so much. I still don't know which action triggered that settings but I'm going to bed now..
Zholen
Updated on December 21, 2022Comments
-
Zholen over 1 year
Xcode won't build using $(FLUTTER_BUILD_NAME) or $(FLUTTER_BUILD_NUMBER)
Runner -> Target -> Build Settings -> Versioning
Runner -> Target -> General -> Identity
Runner -> Flutter -> Generated.xcconfig
info.plist
Can anyone see what I'm doing wrong here? The Generated.xcconfig correctly has the version information from my pub spec.yaml version: 1.0.3+5
But each time I build the version information is null.
-
Claudio Redi almost 4 yearsWhere do you see version information as null?
-
Zholen almost 4 yearsIn app it reports it as null+null via package_info. And if I GetInfo from Finder on the build it reports a '--'. If I set the version values myself package_info reports correctly.
-
Zholen almost 4 yearsAlso, at some point I had to add Runner -> Project -> User-Defined -> FLUTTER_ROOT to build, which would indicate that it is not puling it from Generated.xcconfig either
-
Claudio Redi almost 4 yearsDo you have any other xcconfig file in the project? If you do... do they include
Generated.xcconfig
? -
Zholen almost 4 yearsThere is a folder called Flutter that contains Release.xcconfig, Debug.xcconfig, Generated.xcconfig, and AppFrameworkInfo.plist, all of which is generated/managed by Flutter. The 3rd screenshot is of data inside the Generated.xcconfig
-
Claudio Redi almost 4 years
Release.xcconfig
andDebug.xcconfig
includeGenerated.xcconfig
, right? -
Zholen almost 4 yearsYes, both files #include Generated.xcconfig as the last line
-
-
Gary O' Donoghue about 2 yearsthanks man, worked a treat!