flutter clean
flutter build ios
What am I doing wrong? How can I force Xcode to update my version from CLI or pubspec.yaml?
This is how my Info.plist looks like:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Name</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Sundee</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Your location will be used to determine sun angle.</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Your location will be used to determine sun angle.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Your location will be used to determine sun angle.</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
app_version 0.0. This is a Flutter widget that checks and displays the version status of application and you can easily guide user to update your app. A most easily usable Flutter widget about application version check!
To update the Flutter SDK use the flutter upgrade command: This command gets the most recent version of the Flutter SDK that’s available on your current Flutter channel. If you want an even more recent version of the Flutter SDK, switch to a less stable Flutter channel and then run flutter upgrade.
Both the version and the builder number may be overridden in flutter build by specifying --build-name and --build-number, respectively. Read more about versioning at semver.org.
If it identifies any data change, it will rebuild its widgets, and set the new data to the current widget tree. This way, Flutter will redraw its UI and display the current state of your application. Changing a state in the Flutter will always cause the UI to rebuild itself. However, this case is not always one hundred percent effective.
The themeMode property will cause a full rebuild of the application to conform with the specified theme as seen above. Congratulations! You can now rebuild a widget even when Flutter fails to do so. Flutter uses setState() to reference the state object and identify any change to the state.
The same thing happened to me.
I think that when I used the xcode interface he changed the file ios/Runner.xcodeproj/project.pbxproj
and he didn't get the value automatically
I solved it like this.
change this:
CURRENT_PROJECT_VERSION = your buildnumber
MARKETING_VERSION = your version
to:
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
MARKETING_VERSION = "$(FLUTTER_BUILD_NAME)";
this appears 3 times
I got it. It's because my lines in my Info.plist
did not look like the following:
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
Anyone has an idea why I had $(MARKETING_VERSION)
and $(CURRENT_PROJECT_VERSION)
?
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