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

vddsk6oq  于 11个月前  发布在  其他
关注(0)|答案(2)|浏览(83)

我有一个现有的应用程序,并希望使用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"


我在应用商店里有这个版本
x1c 0d1x的数据
在Xcode中也是一样



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

fdbelqdn

fdbelqdn1#

Apple Connect不会接受具有相同版本号的新版本,但您可以让fastlane处理,以确保您不会错过某些内容。使用如下内容:

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

字符串

2jcobegt

2jcobegt2#

您可以使用以下命令在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"]是当前构建中使用的特定目标。

相关问题