我逐行阅读了该文档。
https://firebase.google.com/docs/crash/ios

而且我成功地将崩溃报告为

但是当我将代码上传到git时为,其他用户在抱怨上载符号时崩溃。

因为doc说要添加以下内容来运行脚本:

# Replace this with the GOOGLE_APP_ID from your GoogleService-Info.plist file
GOOGLE_APP_ID=1:my:app:id

# Replace the /Path/To/ServiceAccount.json with the path to the key you just downloaded
"${PODS_ROOT}"/FirebaseCrash/upload-sym "/Path/To/ServiceAccount.json"

我猜该错误是由于我的私钥“ServiceAccount.json”的路径引起的

因为我拥有该私钥的自己的路径,但是另一个人将获得我通往私钥的路径,这是不可能的。

因此,任何人都可以告诉我应该将该私钥放在何处,以解决此错误。

最佳答案

ios - iOS-Firebase崩溃报告问题-LMLPHP将您的ServiceAccount.json放置到项目的根目录,

然后给出路径为

"${PODS_ROOT}"/FirebaseCrash/upload-sym "$SRCROOT/ServiceAccount.json"

这将对所有用户都有效。
尽管不建议与团队成员以外的其他用户共享ServiceAccount.json。

08-19 11:53