iOS Firebase 崩溃报告设置时崩溃

标签 ios xcode firebase firebase-crash-reporting

我已经浏览了几篇 SO 帖子并遵循了 Firebase 教程,但我似乎没有任何运气来设置崩溃。

我添加了 Pod,并执行了这些步骤

# 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"

第二部分让我感到困惑,因为说 FirebaseCrash/upload-sym 的部分...upload-sym 不是文件夹而是文件...因此我如何才能继续向下层次结构?

所以我删除了那部分,我把下载的文件作为“未知”,我将它重命名为 ServiceAccount.json 并将它放在 FirebaseCrash 文件夹中......所以最后一行对我来说看起来像

"${PODS_ROOT}"/FirebaseCrash/"ServiceAccount.json"

清理和构建时出现 1 个错误。

错误很长,但我可以从中得到的是

....line 6: ...... /Pods/FirebaseCrash/ServiceAccount.json: Permission
denied

我在一些 SO 帖子中读到我需要转到一个名为 permissions 的页面并在那里做一些事情。

如果有人能清楚地说出我到目前为止所做的是否正确,以及它是否是我需要做的布局,我会很高兴,因为很多帖子都是相互冲突的

最佳答案

首先我安装了pod 'Firebase/Crash', 然后我生成了一个 key 让我们像你一样命名它 ServiceAccount.json 在 App 中创建了一个文件夹,比如 MyApp,在 MyApp 中创建了 MyApp.xcodeproj 和 MyApp.xcworkspace,在那里我创建了 CrashReportingKey 文件夹并在其中添加了 ServiceAccount.json。 创建了一个运行脚本,一切都已设置。 在脚本中添加:

GOOGLE_APP_ID=1:xxxxxx:ios:xxxxxxx

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

关于iOS Firebase 崩溃报告设置时崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42126078/

相关文章:

ios - 在iOS中使用swift播放mp3时没有声音

ios - 在 Storyboard 中使用自定义 UIView 捕获 View 什么都不返回?

ios - 如何使用 Swift 将数据从 IOS 应用程序 POST 到 MySQL 表?

javascript - 如何为静态托管网站设置 Cloud Firestore

ios - Firebase 是否仍支持 Mac OS X - 2016 年 7 月

ios - 旋转 UIKit 元素而不弄乱框架

ios - 执行 segue 时隐藏键盘转换

ios - 在所有 Swift 项目中使用 Swift 静态库,构建并运行正常,编辑器认为 "no such module"

ios - nil 不是合法的 NSManagedObjectContext 参数搜索实体名称 'DPickup' '

Java 代码未运行到下一个 Intent ,但在调试时有效