使用 fastlane 将新版本上传到同一版本?

问题描述 投票:0回答:2

我有一个现有的应用程序并且想要使用

Fastlane
因此,在添加一些配置后,我想将新版本发送到 testflight,

所以我使用这条车道

platform :ios do
   
    private_lane :staging_build do
        increment_build_number(xcodeproj: './ios/myapp.xcodeproj')
        gym(scheme: 'myApp', workspace: './ios/myapp.xcworkspace')
    end

   
    desc 'Build & send to testflight'
    lane :upload_to_testF do
        staging_build
        upload_to_testflight(username: '*****@gmail.com', app_identifier: 'com.comp.myapp')
        commit_version_bump(message: 'bump build')
        push_to_git_remote
    end 

end

所以跑步后

fastlane ios send_to_testF

.ipa 文件生成并生成版本号增量

我终于收到了这个错误

ERROR ITMS-90186: "Invalid Pre-Release Train. The train version '1.0.14' is closed for new build submissions"
ERROR ITMS-90062: "This bundle is invalid. The value for key CFBundleShortVersionString [1.0.14] in the Info.plist file must contain a higher version than that of the previously approved version [1.0.14]. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring"

我在应用商店里有这个版本

这在 Xcode 中也是一样的

那么他们为什么要求增加它! 即使我只是尝试在代码和应用商店中将其增加到 1.0.15,但仍然遇到相同的错误!

ios xcode react-native fastlane
2个回答
1
投票

Apple connect 不会接受具有相同版本号的新版本,但您可以让 fastlane 处理该问题,以确保您不会错过任何内容。使用类似的东西:

...
increment_version_number(
  version_number: "1.0.15" # Set a specific version number
)

0
投票

您可以使用以下命令检索 appStore 上的当前版本并自动增量与其相关的构建:

current_version = get_version_number(
    xcodeproj: xcodeproj,
    target: ENV["TARGET"]
  )
  latest_build_number = latest_testflight_build_number(
    version: current_version,
    app_identifier: ENV["BUNDLE_ID"]
  )
  build_number = (latest_build_number + 1)
  increment_build_number(
    xcodeproj: xcodeproj,
    build_number: build_number,
  )

虽然

ENV["BUNDLE_ID"]
是项目包 ID,
xcodeproj
是您的 xcodeproj 名称,
ENV["TARGET"]
是当前构建中使用的特定目标。

© www.soinside.com 2019 - 2024. All rights reserved.