Crash Reporting

You need to do a minimum configuration to get started with Apptics crashes. Before you begin, make sure that your app is already registered and configured in Zoho Apptics.

Installation (available by default)

Copiedsource 'https://github.com/CocoaPods/Specs.git'
target '[TARGET NAME]' do
  pod 'AppticsCrashKit'
end
  • Add the below mentioned system frameworks and libraries to your project.
    • libc++.dylib (libc++.tbd for newer versions)
    • libz.dylib (llbz.tbd for newer versions)
    • SystemConfiguration.framework
  • Add the flag "-ObjC" to the Other Linker Flags in your build settings.

Crashes are automatically tracked in Apptics using the (init) method when you have done the initialization for Analytics. Use enableAutomaticCrashTracking of AppticsConfig class to turn off automatic crash tracking, since it is enabled by default.

CopiedAppticsConfig.defaultConfig.enableAutomaticCrashTracking=false;
CopiedAppticsConfig.default.enableAutomaticCrashTracking=false;

Custom Properties

Custom properties allow you to get the specific state of your app that led to a crash.

  • To add custom properties in the crashes, call setCrashCustomProperty( info) as NSDictionary object with a parameter to set custom properties for crash reporting in Apptics.
Copied- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary<UIApplicationLaunchOptionsKey,id> *)launchOptions
    [Apptics initializeWithVerbose:<#(BOOL)#>];
    [Apptics setCrashCustomProperty:<#(nonnull NSDictionary *)#>];
    return true;
}
Copiedfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {  
    Apptics.initialize(withVerbose: <#T##Bool#>)
    Apptics.setCrashCustomProperty(<#T##object: [AnyHashable : Any]##[AnyHashable : Any]#>)
    return true
}

To symbolicate the crashes, make sure that your build settings are set to the following configurations.

  • Strip build symbols during copy - NO
  • Strip linked product - NO
  • Strip style - Debugging symbols
  • Debug information format - Dwarf with dSYM file

Upload dSYM

 

  • Apptics script will automatically upload the dSYM files to the web console.
  • You can verify whether the dSYM files are uploaded to the web console under Quality > dSYM.
  • If the dSYM file is not available for the version (in web console), you can upload the dSYM file manually, refer to the Symbolication of the crashes user guide.​
Copiedsource 'https://github.com/CocoaPods/Specs.git' 
target 'TARGET NAME' do 
pod 'AppticsCrashKit' 

    #Post build script will upload dSYM file to the server and add apptics specific information to the main info.plist which will be used by the SDK.
script_phase :name => 'Apptics post build', :script => 'bash "./Pods/Apptics-SDK/scripts/run" --upload-symbols=true --release-configurations="CONFIGURATIONS COMMA SEPARATED STRING" --app-group-identifier="APP GROUP IDENTIFIER"', :execution_position => :after_compile
end