gpt4 book ai didi

xcode - 如何强制 Flutter 更新我的版本和内部版本号?

转载 作者:行者123 更新时间:2023-12-03 18:32:09 29 4
gpt4 key购买 nike

  • 我已将 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>

    最佳答案

    我知道了。这是因为我在 Info.plist 中的行看起来不像这样:

    <key>CFBundleShortVersionString</key> <string>$(FLUTTER_BUILD_NAME)</string> <key>CFBundleVersion</key> <string>$(FLUTTER_BUILD_NUMBER)</string>

    任何人都知道我为什么有 $(MARKETING_VERSION)$(CURRENT_PROJECT_VERSION) ?

    关于xcode - 如何强制 Flutter 更新我的版本和内部版本号?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61922857/

    29 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com