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.
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..
If you want to change the version of your app, just change in pubspec.yml
like version: 1.0.4+3
Then run
“flutter run”
--- or ---
"fvm flutter run" if you are managing your flutter version using fvm
This will regenerate ios/Flutter/Generated.xcconfig and the same referred in Info.ptlist file
FLUTTER_BUILD_NAME=1.0.4
FLUTTER_BUILD_NUMBER=3
Make sure the version details not hard-coded in the file ios/Runner.xcodeproj/project.pbxproj. If it is hardcoded , you can simply remove or comment it out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With