[英]Firebase Crash Reporting not working on iOS real devices
I got some problems with Firebase Crash Report on iOS. 我在iOS上遇到了Firebase崩溃报告的一些问题。 When I run my testing app on the simulator, it works pretty fine. 当我在模拟器上运行我的测试应用程序时,它工作得很好。 But when I run it on a real device, nothing happen. 但是当我在真实设备上运行它时,没有任何事情发生。 Here is my sample code: 这是我的示例代码:
import UIKit
import FirebaseCrash
class ViewController: UIViewController {
@IBOutlet weak var btn: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
btn.addTarget(self, action: #selector(ViewController.btnClicked), forControlEvents: UIControlEvents.TouchUpInside)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
func btnClicked() {
FIRCrashMessage("Cause Crash button clicked")
fatalError()
}
}
Any suggestion to fix my problem? 有什么建议可以解决我的问题吗? Thank you. 谢谢。
Steps 脚步
I install app from Xcode to a real device. 我将应用程序从Xcode安装到真实设备。
I stop the app by press "command + ." 我按“命令+”停止应用程序。
FIRApp.configure()
on didFinishLaunchingWithOptions
method of your appDelegate
file? 你加FIRApp.configure()
在didFinishLaunchingWithOptions
你的方法appDelegate
文件? Crash message uploaded
? 当你重新启动应用程序(注释错误)时,你会在控制台中看到像Crash message uploaded
? also: 也:
reset your OAuth credentials, run below command: 重置您的OAuth凭据,运行以下命令:
rm $HOME/Library/Preferences/com.google.SymbolUpload*
create new service account and make sure it has editor permission Revise your script into below format: 创建新的服务帐户并确保其具有编辑权限将脚本修改为以下格式:
# 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"
Please make sure your app id and json file path are correct. 请确保您的应用ID和json文件路径正确无误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.