Reputation: 5176
Usually, User-Defined
Value would inherited from Project setting as xcode-how-to-have-target-settings-inherit-from-project,
But I found that the FLUTTER_BUILD_NAME
& FLUTTER_BUILD_NUMBER
not the case. Their value in Project
& Target
are independent
.
Is there some config I should change to apply them to be inherited ?
Upvotes: 9
Views: 10153
Reputation: 293
Just change the version in pubspec.yaml
and then in terminal flutter build ios
and go to Xcode you will see the new version in build setting
Upvotes: 15
Reputation: 5176
Basically it's because I miss the part of version: 1.0.0+1
in file pubspec.yaml
.
It's format is: "version: FLUTTER_BUILD_NAME
+FLUTTER_BUILD_NUMBER
"
/ios/Flutter/Generated.xcconfig
with FLUTTER_BUILD_NAME
& FLUTTER_BUILD_NUMBER
base on pubspec.yaml
.inherit the value
in target setting & project setting from this .xcconfig
;So just update the version in pubspec.yaml
, don't update it in Project Setting
or Target Setting
to avoid value overwrite
.
Upvotes: 12