【发布时间】:2021-03-24 09:56:00
【问题描述】:
当我运行 flutter build run 时,我希望版本和内部版本号能够在 pubspec.yaml 1.1.5+10 中使用我的版本
但是 10 总是恢复为 1。这在 info.plist 中设置正确
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
但是当我打开 xcode v12.2 时,它正在将 $(FLUTTER_BUILD_NUMBER) 改回
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
不知何故,xcode 本身正在恢复 info.plist. 中的这些更改
[✓] Flutter (Channel stable, 1.22.2, on Mac OS X 10.15.7 19H2, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
[!] Android Studio (version 4.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[!] Connected device
! No devices available
【问题讨论】:
标签: flutter info.plist