iOS agent
Prerequisites
- Mac OS 10.15.7 and above
- iOS 11 and above
- Download and install X-Code 12.2 and above
- Install cocoa pods in your system
Developing Native iOS agent using cocoa pods
- Install cocoa pods in your system.
- Create a sample mobile application using X-Code in swift.
- Open the project in a terminal and add pod using pod init command.
- Close the X-Code project.
- Open the SampleApp.xcworkspace file in X-Code.
- Open Podfile inside the Pods folder and add pod 'SixthSenseMobileSDK'.
- Open the project in a terminal and run pod update command. It will download the SixthSenseMobileSDK in the sample application.
- Go to AppDelegate class and import SixthSenseMobileSDK and Initialise SDK in the didFinishLaunching function with the following code:
SixthSenseMobile.shared.initSixthSenseMobileSDK()
- Open the Info.plist file and add the following:
- AccessToken key as a string and also add value for same.
- Add EndPointName key as a string and also add the value: (https://http-collector-observability.sixthsense.rakuten.com/poc-mobile/)
For OneCloud Platform, use (https://sixthsense-backend.jpe2-caas1-prod1.caas.jpe2b.r-local.net/mobile)
Using swift package manager
- Create a Sample Mobile Application using Xcode in Swift: Create a new iOS project in Xcode using Swift.
- Add SixthSenseMobileSDK as a Swift Package: Go to X-Code File -> Add Package Dependencies -> search for SixthSenseMobileSDK with the following git URL: https://artifacts-observability.sixthsense.rakuten.com/sixthsense/sixthsense-mobile-monitoring-ios-swift.git
- Click Add Package and it will open Git Lab authentication window in X-Code. Please use Git Lab token for the authentication. (Token will be shared by SixthSense DevOps team during installation)
- Go to AppDelegate class and import SixthSenseMobileSDK and Initialise SDK in the didFinishLaunching function with the following code:
SixthSenseMobile.shared.initSixthSenseMobileSDK()
- Configure Info.plist: Open your Info.plist file and add the necessary keys and values.
- AccessToken: Your access token value.
- EndPointName: https://http-collector-observability.sixthsense.rakuten.com/poc-mobile/
Testing the agent
- You are now in an Xcode workspace for building, debugging, and testing the Mobile Monitoring feature.
- For force crash, import SixthSenseMobileSDK in any View Controller class and call fatalError()
- Run the application in a simulator and try to make the application crash.
- After crashing, relaunch the application in a simulator/device.
- Open the Mobile Monitoring dashboard.
- Go to the Mobile Monitoring tab and check the crash logs and other matrices.