I got some problems with Firebase Crash Report on iOS. 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.
I stop the app by press "command + ."
FIRApp.configure()
on didFinishLaunchingWithOptions
method of your appDelegate
file? Crash message uploaded
? also:
reset your OAuth credentials, run below command:
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.