Crash module of StreetHawk SDK collects crash reports and report the same to StreetHawk server.
- Add pod to Application's Podfile
In pod file of your Application, add one line:
- Install Pod
In the OS X command line terminal, enter the following command (making sure that you’re in the directory containing your project and Podfile).
First time to install StreetHawk framework:
Next to check and upgrade to latest StreetHawk framework:
You should see output similar to the following.
Analysing dependencies Downloading dependencies Installing streethawk/Core (1.7.0) Installing streethawk/Crash (1.7.0) Generating Pods project Integrating client project
This will automatically add StreetHawk/Core and StreetHawk/Crash open source code into your pod project, and configure everything ready for use.
Note: there is a bug in Cocoapods, which may cause error "No such file or directory". Solution: delete Pods folder and Podfile.lock file, run "pod install" again.
Crash report depends on PLCrashReport to generate Apple standard crash report. It does not support Bitcode so far. Disable App project's bitcode to make compile pass.
Crash report is enabled and works automatically when registerInstallForApp. If you would like to disable crash report function and not load PLCrashReport immediately in registerInstallForApp, set property:
StreetHawk.isEnableCrashReport = NO; [StreetHawk registerInstallForApp:<app_key> withDebugMode:YES/NO]; //later when ready to enable crash report StreetHawk.isEnableCrashReport = YES;
SHApp.sharedInstance().isEnableCrashReport = false SHApp.sharedInstance().registerInstall(forApp: <app_key>, withDebugMode: true) //later when ready to enable crash report SHApp.sharedInstance().isEnableCrashReport = true
Check here for API document.