我正在使用 macOs sonoma 14.4.1 和 xcode 15.3 模拟器设置 17.4,并且我将其用于本机反应。我正在尝试实施 fastlane 来部署我的应用程序以将我的应用程序部署到 testflight。但当我运行命令 fastlane beta 时,我的应用程序在前几次构建,但在运行将其上传到 testflight 时我面临身份验证问题。运行 2 到 3 次后,我的目的地从 xcode 中取消设置,如果我尝试运行命令在手机或模拟器上安装我的应用程序,那么我就是这样在此处输入图像描述,而我已经在我的设备上安装了平台系统。如果我重新启动系统,那么它就会自行解决。请帮我找到解决方案
我尝试了很多方法来解决它
尝试将此代码用于 Fastlane
我的工作没有任何问题
IOS_APP_SPECIFIER = 'com.xyz'.freeze
AND_APP_SPECIFIER = 'com.xyz'.freeze
# Fastlane update
update_fastlane
###################### SETUP ######################
dir = File.expand_path('..', Dir.pwd).freeze
APP_VERSION_NAME = "6.2.2".freeze
XCODE_PROJECT_PATH = "ios/#{PROJECT_NAME}.xcodeproj".freeze
XCODE_WORKSPACE_PATH = "ios/#{PROJECT_NAME}.xcworkspace".freeze
RELEASE_SCHEME_NAME = "#{PROJECT_NAME}".freeze
BUILT_PRODUCTS_PATH = "#{dir}/build".freeze
BUILT_DSYM_IOS = "#{dir}/build/#{PROJECT_NAME}.app.dSYM.zip".freeze ##sdc.app.dSYM.zip
###################### BEFORE ALL ######################
before_all do
print "### Yarn install.. \n"
yarn(command: "install", package_path: "./package.json")
end
default_platform(:ios)
########################## iOS LANES ##########################
platform :ios do
desc "Build and push build to TestFlight"
lane :beta do
cocoapods(
podfile: 'ios/Podfile',
use_bundle_exec: false,
repo_update: true,
)
Dir.chdir("..") do
# code here runs in the parent directory
sh "if ! grep -q '#include <functional>' ./ios/Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h; then chmod 755 ./ios/Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h && sed -i '' 's|#include <string>|#include <functional>\\n#include <string>|' ./ios/Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h; fi"
end
api_key = app_store_connect_api_key(
key_id: "KGY3AYRK6Q",
issuer_id: "xxx-xxx-xxx-xxx",
key_filepath: "fastlane/AuthKey.p8",
duration: 1200,
in_house: false
)
increment_version_number(
version_number: APP_VERSION_NAME,
xcodeproj: XCODE_PROJECT_PATH,
)
nextVersion = latest_testflight_build_number(
app_identifier: IOS_APP_SPECIFIER,
version: APP_VERSION_NAME,
api_key: api_key,
) + 1
print "IOS Next Release is #{nextVersion} \n"
increment_build_number(xcodeproj: XCODE_PROJECT_PATH, build_number: nextVersion)
update_project_team(
path: XCODE_PROJECT_PATH,
teamid: TEAMID
)
build_app(
workspace: XCODE_WORKSPACE_PATH,
scheme: RELEASE_SCHEME_NAME,
output_directory: BUILT_PRODUCTS_PATH,
clean: true,
silent: true,
suppress_xcode_output: true,
xcargs: ' -allowProvisioningUpdates '
)
changelog = changelog_from_git_commits(
commits_count: 6,
quiet: true,
# merge_commit_filtering: "exclude_merges"
)
upload_to_testflight(
skip_waiting_for_build_processing: true,
wait_processing_timeout_duration: 1200,
app_identifier: IOS_APP_SPECIFIER,
changelog: changelog,
api_key: api_key,
)
sentry_config = property_file_read(file: "./android/sentry.properties")
notification(subtitle: "Finished Building IOS", message: "#{PROJECT_NAME} #{APP_VERSION_NAME}_#{nextVersion}")
end
end