Crash logs record crashes of Apps. You can log in to the mPaaS console, and view crash reports in the Mobile Analysis Service > Performance Analysis page.
Supports log tracking based on the mPaaS framework and native projects.
Based on mPaaS framework
If you have accessed the framework (APMobileFramework
repository available in the project), the crash reporting module automatically obtains crash logs and uploads the logs to the server. You only need to ensure that the crash monitoring is enabled after integrating the SDK. To ensure that crash logs are reported in time, it is recommended that you call the API marked in red in the following figure by using the main
function.
Based on native project
If you haven't accessed the framework (APMobileFramework
repository unavailable in the project), you need to enable the crash monitoring when startup, and upload the crash logs after startup.
Disaster recovery switch
By default, disaster recovery processing will be triggered when 4 consecutive crashes occur, and the files in the Documents
directory will be cleared to avoid crashe problems caused by dirty data. In 10.1.60 and above, you can manually call the following interface to enable or disable disaster recovery processing.
#import <MPMasAdapter/MPAnalysisHelper.h>
/**
* Enable or disable disaster recovery processing, enabled by default.
*/
+ (void)enableDisasterRecovery:(BOOL)enable;
Attentions
Only crash logs of apps running on real devices will be captured and uploaded to the log server. If you need to debug crash monitoring, please disconnect Xcode and do not use the simulator.
To ensure that the version in the crash log is consistent with the product version, be sure to set the bundle version and product version to the same version number in the project's
info.plist
.