我正在努力通过Fastlane将dSYM文件上传到Firebase。我的车道看起来像这样:
desc "Fetch and upload dSYM files to Firebase Crashlytics"
lane :refresh_dsyms_firebase do |options|
download_dsyms(version: options[:version])
upload_symbols_to_crashlytics(gsp_path: "./App/GoogleService-Info.plist")
clean_build_artifacts
end
我确认这是plist
文件的正确路径,但是当我第一次尝试运行通道时,会看到以下内容:
[17:22:47]: invalid byte sequence in UTF-8
[17:22:47]: invalid byte sequence in UTF-8
[17:22:47]: invalid byte sequence in UTF-8
,然后为找到的每个dSYM文件之一:
[17:22:48]: Uploading '70DBE65E-227E-3754-89F2-EEFA6B8EEC2F.dSYM'...
[17:22:48]: Shell command exited with exit status instead of 0.
我正在尝试确切确定此过程中缺少的内容。有人有想法吗?我对Fastlane相当陌生,因此绝对可以假设我会缺少一些基本知识。 (尽管,退出状态为空有点奇怪。)
fastlane 2.107.0
答案 0 :(得分:1)
./ fastlane / Pluginfile
gem 'fastlane-plugin-firebase_app_distribution'
车道
before_all do
# Update fastlane
update_fastlane
# Update fastlane plugins
sh("fastlane update_plugins")
# Update firebase tools
sh("curl -sL firebase.tools | upgrade=true bash")
end
从AppStore下载dsym,然后上传到firebase
download_dsyms(version: '1.0', build_number: '1')
upload_symbols_to_crashlytics(gsp_path: "./App/Environment/production/GoogleService-Info-production.plist")
从存档中获取dsym(在构建后)并上传到firebase
gym(
configuration: 'Release',
scheme: 'MyApp',
include_bitcode: true
)
upload_symbols_to_crashlytics(gsp_path: "./App/Environment/production/GoogleService-Info-production.plist")
答案 1 :(得分:1)
首先,您需要使用upload_symbols_to_crashlytics
,但在使用它之前,您需要从App Store Connect下载dsym,为此,您应该使用带有某些参数download_dsyms
的{{1}}和version
,Fastlane会询问您有关build_number
的问题,因此我建议您使用它在获得答案之前不要中断构建。
app_identifier
我的应用是
desc "Upload any dsyms in the current directory to Crashlytics of firebase"
lane :upload_dsyms do |options|
version_number = get_version_number(target: "your_app_target")
build_number = get_build_number
download_dsyms(
app_identifier: "your_app_identifier",
version: version_number,
build_number: build_number
)
upload_symbols_to_crashlytics(gsp_path: "./your_app_name or your_app_target/another_directroy/GoogleService-Info.plist")
clean_build_artifacts
end
答案 2 :(得分:0)
对此感兴趣的任何人都可以关注以下主题:https://github.com/fastlane/fastlane/issues/13096
TL; DR:致电时
upload_symbols
它将从安装的名为./Pods/Fabric/upload-symbols -a db4d085462b3cd8e3ac3b50f118e273f077497b0 -gsp ./App/GoogleService-Info.plist -p ios /private/var/folders/x1/x6nqt4997t38zr9x7zwz72kh0000gn/T/d30181115-8238-1fr38bo/D4CE43B9-9350-3FEE-9E71-9E31T39080CD.dSYM
的Fabric容器中调用二进制文件,并且看起来像这样:
Info.plist
您会注意到它使用Fabric API密钥和GoogleService-Info.plist路径来调用它。我不知道为什么,但是这将导致它不上传。在运行快速通道之前,您必须从class PerksSerializer < ActiveModel::Serializer
attributes :id, :status, :scope, :business_name, :business_description, :business_address_street,
:business_address_state, :business_address_city, :business_address_postal_code,
:business_website, :latitude, :longitude, :headline, :description, :start_date, :end_date,
:redemption_instructions, :cashier_instructions, :redemption_button_text, :claim_type,
:business_manager_approved_by, :created_at
belongs_to :primary_business_category
belongs_to :secondary_business_category
end
文件中临时删除结构配置信息。 (请记住要重新添加结构配置)。
答案 3 :(得分:0)
对于大多数人来说,这可能不是一个选择,但是我只是从头开始解决了这个问题。如果您是从Fabric过来的,这可能并不十分明显,但我认为我只是撕下创可贴。我最初的设置是使用Fabric(Answers)/ Firebase Crashlytics,它是Fabric-> Firebase的迁移路径,尽管很微妙,但两者之间的配置略有不同,并导致upload_symbols_to_crashlytics
Fabric
中的Info.plist
声明"${PODS_ROOT}/Fabric/run"
,然后将$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
添加到输入文件中AppDelegate
中删除Fabric.with([Crashlytics.self])
,您也可以杀死import Fabric
,因为Firebase现在已经覆盖了它。desc "Upload any dsyms in the current directory to crashlytics"
lane :upload_dsyms do |options|
download_dsyms(version: version_number, build_number: build_number)
upload_symbols_to_crashlytics(gsp_path: "./App/Resources/GoogleService-Info.plist")
clean_build_artifacts
end
答案 4 :(得分:0)
这对我有用
desc "Downlaod and Uplaod dSYMS to Firebase"
lane :uplaod_dsyms do
download_dsyms # This will download all version
upload_symbols_to_crashlytics(
gsp_path: "Path to your google plist",
binary_path: "./Pods/FirebaseCrashlytics/upload-symbols") # this goes to cocoapods of FirebaseCrashlytics
clean_build_artifacts # Delete the local dSYM files
end