Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/278.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 不使用GoogleService-Info.plist将调试符号上载到Crashlytics_Python_Ios_Xcode_Firebase_Crashlytics - Fatal编程技术网

Python 不使用GoogleService-Info.plist将调试符号上载到Crashlytics

Python 不使用GoogleService-Info.plist将调试符号上载到Crashlytics,python,ios,xcode,firebase,crashlytics,Python,Ios,Xcode,Firebase,Crashlytics,我正在将Firebase Crashlytics(以及分析)集成到我的团队应用程序中。由于各种原因,我们正在手动配置一个FIROptions对象并调用它,配置我们需要的属性,然后从那里调用它。这是伟大的工作,我可以看到分析工作和崩溃上传到我们的Crashlytics仪表板 但是,我无法在构建阶段成功上传生成的.dSYM文件。建议脚本将此添加为构建过程的最后一步: "${PODS_ROOT}/Fabric/run" 该阶段还应作为输入文件传递Info.plist。但是,当我从捆绑包中删除Goog

我正在将Firebase Crashlytics(以及分析)集成到我的团队应用程序中。由于各种原因,我们正在手动配置一个
FIROptions
对象并调用它,配置我们需要的属性,然后从那里调用它。这是伟大的工作,我可以看到分析工作和崩溃上传到我们的Crashlytics仪表板

但是,我无法在构建阶段成功上传生成的
.dSYM
文件。建议脚本将此添加为构建过程的最后一步:

"${PODS_ROOT}/Fabric/run"
该阶段还应作为输入文件传递
Info.plist
。但是,当我从捆绑包中删除
GoogleService Info.plist
时,构建失败,出现以下错误:
无法从构建环境中获取谷歌服务文件中的GMP\u APP\u ID

这对我来说很有意义,因为它仍然在寻找我删除的
GoogleService Info.plist
。我编写了自己的Python脚本,试图从我们的数据生成一个临时的.plist文件,目前看起来如下:

import subprocess
import tempfile
import plistlib
import pathlib

firebase_app_id: str = "<# OUR FIREBASE APP ID HERE #>"

with tempfile.TemporaryDirectory() as temp_folder, open(pathlib.Path(temp_folder) / "GoogleService-Info.plist", "wb") as temp_plist:
    plistlib.dump({"GOOGLE_APP_ID": firebase_app_id}, temp_plist)
    subprocess.run([f"{os.environ['PODS_ROOT']}/Fabric/upload-symbols", "--google-service-plist", temp_plist.name, "--build-phase", "--debug"], check=True)
导入子流程
导入临时文件
导入plistlib
导入路径库
firebase_应用程序_id:str=“”
使用tempfile.TemporaryDirectory()作为临时文件夹,打开(pathlib.Path(临时文件夹)/“GoogleService Info.plist”,“wb”)作为临时文件夹:
plistlib.dump({“GOOGLE_APP_ID”:firebase_APP_ID},temp_plist)
subprocess.run([f“{os.environ['PODS_ROOT']}/Fabric/upload symbols”,“--google service plist”,temp_plist.name,“--build phase”,“--debug”],check=True)
将此脚本作为构建阶段运行会生成以下错误:
无法读取路径/var/folders/4g/_p4pgc5d485gtcn_3dtys4y00000gn/T/tmp7m7r_0zj/GoogleService Info.plist处的GoogleService-Info.plist


我还尝试生成一个名为temporaryfile的普通
,但结果是相同的问题。没有在构建阶段模式下运行脚本并手动传递平台和符号文件导致了我在
GMP\u APP\u ID
中遇到的第一个错误。如何创建一个构建阶段来自动将调试符号上传到Crashlytics,而不必向项目中添加
GoogleService Info.plist

我制作了一个工具,可以将dSYM文件上传到Crashlytics,而不需要任何东西

用它来解决你的问题:

“dist”文件夹中,您可以根据您的操作系统找到正确的版本

  • 窗户
  • 马科斯
  • Linux

如何使用

fabric-upload-dsym --bundleid=[YOUR-APP-BUNDLE] --fabricapikey=[YOUR-FABRIC-API-KEY] --file=[ZIPPED-DSYM-FILE]
用您的信息替换in命令,例如:

[YOUR-APP-BUNDLE] = com.prsolucoes.myapp
[YOUR-FABRIC-API-KEY] = 12xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxbf
[ZIPPED-DSYM-FILE] = /tmp/yourapp/dsym.zip

谢谢。

我制作了一个工具,可以在没有任何东西的情况下将dSYM文件上传到Crashlytics

用它来解决你的问题:

“dist”文件夹中,您可以根据您的操作系统找到正确的版本

  • 窗户
  • 马科斯
  • Linux

如何使用

fabric-upload-dsym --bundleid=[YOUR-APP-BUNDLE] --fabricapikey=[YOUR-FABRIC-API-KEY] --file=[ZIPPED-DSYM-FILE]
用您的信息替换in命令,例如:

[YOUR-APP-BUNDLE] = com.prsolucoes.myapp
[YOUR-FABRIC-API-KEY] = 12xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxbf
[ZIPPED-DSYM-FILE] = /tmp/yourapp/dsym.zip
谢谢