Tom*_*ran 5 deployment xcode command-line-interface flutter
flutter cleanflutter build ios我究竟做错了什么?如何强制 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>
Run Code Online (Sandbox Code Playgroud)
Tom*_*ran 12
我知道了。这是因为我在 Info.plist 中的行看起来不像这样:
<key>CFBundleShortVersionString</key> <string>$(FLUTTER_BUILD_NAME)</string> <key>CFBundleVersion</key> <string>$(FLUTTER_BUILD_NUMBER)</string>
Run Code Online (Sandbox Code Playgroud)
任何人都知道为什么我有$(MARKETING_VERSION)和$(CURRENT_PROJECT_VERSION)?
这样的事情我也经历过。
我认为当我使用xcode接口时他更改了文件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)";
这出现了 3 次
| 归档时间: |
|
| 查看次数: |
2541 次 |
| 最近记录: |