use*_*961 17 info.plist flutter
当我运行时,flutter build run我希望版本和内部版本号能够在 pubspec.yaml 1.1.5+10 中使用我的版本
然而 10 总是恢复为 1。这在 info.plist 中设置正确
\n <key>CFBundleVersion</key>\n <string>$(FLUTTER_BUILD_NUMBER)</string>\n <key>CFBundleShortVersionString</key>\n <string>$(FLUTTER_BUILD_NAME)</string>\nRun Code Online (Sandbox Code Playgroud)\n但是当我打开 xcode v12.2 时,它又变$(FLUTTER_BUILD_NUMBER)回
<key>CFBundleVersion</key>\n<string>$(CURRENT_PROJECT_VERSION)</string>\nRun Code Online (Sandbox Code Playgroud)\n不知何故,xcode 本身正在恢复 info.plist 中的这些更改。
[\xe2\x9c\x93] Flutter (Channel stable, 1.22.2, on Mac OS X 10.15.7 19H2, locale en-US)\n \n[\xe2\x9c\x93] Android toolchain - develop for Android devices (Android SDK version 28.0.3)\n[\xe2\x9c\x93] Xcode - develop for iOS and macOS (Xcode 12.2)\n[!] Android Studio (version 4.1)\n \xe2\x9c\x97 Flutter plugin not installed; this adds Flutter specific functionality.\n \xe2\x9c\x97 Dart plugin not installed; this adds Dart specific functionality.\n[!] Connected device\n ! No devices available\nRun Code Online (Sandbox Code Playgroud)\n
Elv*_*les 25
这是 ios/Runner.xcodeproj/project.pbxproj 文件中的问题,
我通过此
更新解决了我的版本和内部版本号
改变这个:
CURRENT_PROJECT_VERSION = your buildnumber
MARKETING_VERSION = your version到:
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
MARKETING_VERSION = "$(FLUTTER_BUILD_NAME)";
我多次遇到类似的问题。我所做的是设置所有配置文件的生成配置 [PROFILE](调试、发布、配置文件)。
转到 XCode -> 运行器 -> 项目(运行器) -> 信息。
在目标级别,所有跑步者都使用 Pods-Runner.[PROFILE]。在项目级别没有使用配置,所以我选择为所有生成。
我不知道此更改的实际影响是什么,但现在从 generated.xcconfig 文件中获取构建版本和名称。
Xcode 中的信息不会仅仅因为您更新并保存pubspc.yaml而更新。您必须针对 iOS 重新构建才能使更改反映在 Xcode 中。
| 归档时间: |
|
| 查看次数: |
8936 次 |
| 最近记录: |