CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

CAMobileAppAnalytics 2023.9.3

CAMobileAppAnalytics 2023.9.3

Maintained by Aruna-Yarra, ca-apm.



  • By
  • CA Technologies (A Broadcom Company)

CAMobileAppAnalytics

CAMobileAppAnalytics is an iOS SDK for App Experience Analytics that provides deep insights into the performance, user experience, crash, and log analytics of apps.

Get Started

Check out our documentation for more information about the features that the App Experience Analytics SDK collects from your app.

Requirements

  1. Xcode 12+ with the XCFramework, Xcode 11+ with the static library
  2. iOS 9.0 or higher
Note: Update Cocoapods to latest version in your mac `sudo gem install cocoapods`

Integration

Follow these steps to integrate the CAMobileAppAnalytics SDK in your Xcode project using CocoaPods

  1. Specify pod CAMobileAppAnalytics on a single line inside your target block in a Podfile to use CAMobileAppAnalytics static library
target 'YourApp' do
    pod 'CAMobileAppAnalytics'
end

If you want to use the CAMobileAppAnalytics XCFramework, specify pod CAMobileAppAnalytics/xcframework in your Podfile

target 'YourApp' do
    pod 'CAMobileAppAnalytics/xcframework'
end

Then, run the following command using the command prompt from the folder of your project

$ pod install
  1. Drag & Drop the downloaded xxx_camdo.plist file into the Supporting files

Initialising the SDK in your Source code

Objective C

  1. Add the import header #import "CAMDOReporter.h" to your AppDelegate.m file

  2. Initialize the CAMobileAppAnalytics sdk in didFinishLaunchingWithOptions: method

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [CAMDOReporter initializeSDKWithOptions:SDKLogLevelVerbose  completionHandler:nil];
    return YES;
}
  1. Save and re-build your project

Swift

  1. Add a header file with the file name format as <app_name>-Bridging-header.h.
  2. Add the import header #import "CAMDOReporter.h" to your <app_name>-Bridging-header.h file.
  3. Add the <app_name>-Bridging-header.h file to Swift Compiler - Code Generation section in the Build Settings. <name of the project>/<app_name>-Bridging-header.h
  4. Initialize the CAMobileAppAnalytics sdk in didFinishLaunchingWithOptions method
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    //Initialize CA App Experience Analytics SDK
    CAMDOReporter.initializeSDK(options: SDKOptions.SDKLogLevelVerbose) { (completed, error) in
        
    }
    return true
}
  1. Save and re-build your project
Note

For more information about the SDK options, see the Initialize SDK Options section. Single Option - Usage Example

CAMDOReporter.initializeSDK(options: SDKOptions.SDKLogLevelVerbose) { (completed, error) in
    
}

Multiple Options - Usage Example

CAMDOReporter.initializeSDK(options: SDKOptions.SDKLogLevelVerbose.union
(SDKOptions.SDKUIWebViewDelegate)) { (completed, error) in
    
}

Documentation

For more documentation and API references, go to our main website

License

Copyright (c) 2020 Broadcom. All Rights Reserved. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.

This software may be modified and distributed under the terms of the MIT license. See the LICENSE file for details.