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
- Xcode 12+ with the XCFramework, Xcode 11+ with the static library
- 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
- 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
- Drag & Drop the downloaded
xxx_camdo.plist
file into the Supporting files
Initialising the SDK in your Source code
Objective C
-
Add the import header
#import "CAMDOReporter.h"
to your AppDelegate.m file -
Initialize the CAMobileAppAnalytics sdk in
didFinishLaunchingWithOptions:
method
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[CAMDOReporter initializeSDKWithOptions:SDKLogLevelVerbose completionHandler:nil];
return YES;
}
- Save and re-build your project
Swift
- Add a header file with the file name format as
<app_name>-Bridging-header.h
. - Add the import header
#import "CAMDOReporter.h"
to your<app_name>-Bridging-header.h
file. - 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
- 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
}
- 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.