xcode - 如何强制 Flutter 更新我的版本和内部版本号?
问题描述
- 我已将 pubspec.yaml 中的版本更改为 1.0.1+1(从 1.0.0+3)
flutter clean
flutter build ios
- 当我打开 [project]/ios/Runner.xcworkspace 时,它仍然显示 1.0.0 版本。
我究竟做错了什么?如何强制 Xcode 从 CLI 或 pubspec.yaml 更新我的版本?
这就是我的 Info.plist 的样子:
<?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>
解决方案
我知道了。这是因为我在 my 中的行Info.plist
看起来不像以下内容:
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
任何人都知道为什么我有$(MARKETING_VERSION)
and $(CURRENT_PROJECT_VERSION)
?
推荐阅读
- javascript - 子字符串索引问题
- sql-server - T-SQL: alter sequence number current_value without changing start_value
- html - Hamburger nav not clickable - already checked scripts and CDN
- c# - How to get self name
- javascript - 使用 getJSON 时如何使用变量作为 JSON 文件名
- r - 具有不同 x 刻度的双 Y 轴基础 R 图
- android - how to deal with 2 FragmentTransaction
- cordova - 使用带有--release标签的离子构建时任务':app:mergeReleaseResources'的执行失败
- flutter - 作为 api 请求的结果,如何将变量获取到文本字段中?
- css - 有没有办法对 CSS 网格中的项目流进行蛇行/排队?