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

  1. Install cocoa pods in your system.
  2. Create a sample mobile application using X-Code in swift.
  3. Open the project in a terminal and add pod using pod init command.
  4. Close the X-Code project.
  5. Open the SampleApp.xcworkspace file in X-Code.
  6. Open Podfile inside the Pods folder and add pod 'SixthSenseMobileSDK'.
  7. Open the project in a terminal and run pod update command. It will download the SixthSenseMobileSDK in the sample application.
  8. Go to AppDelegate class and import SixthSenseMobileSDK and Initialise SDK in the didFinishLaunching function with the following code:
SixthSenseMobile.shared.initSixthSenseMobileSDK()
  1. Open the Info.plist file and add the following:

For OneCloud Platform, use (https://sixthsense-backend.jpe2-caas1-prod1.caas.jpe2b.r-local.net/mobile)

Using swift package manager

  1. Create a Sample Mobile Application using Xcode in Swift: Create a new iOS project in Xcode using Swift.
  2. 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
  3. 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)
  4. Go to AppDelegate class and import SixthSenseMobileSDK and Initialise SDK in the didFinishLaunching function with the following code:
SixthSenseMobile.shared.initSixthSenseMobileSDK()
  1. Configure Info.plist: Open your Info.plist file and add the necessary keys and values.
  2. AccessToken: Your access token value.
  3. EndPointName: https://http-collector-observability.sixthsense.rakuten.com/poc-mobile/

Testing the agent

  1. You are now in an Xcode workspace for building, debugging, and testing the Mobile Monitoring feature.
  2. For force crash, import SixthSenseMobileSDK in any View Controller class and call fatalError()
  3. Run the application in a simulator and try to make the application crash.
  4. After crashing, relaunch the application in a simulator/device.
  5. Open the Mobile Monitoring dashboard.
  6. Go to the Mobile Monitoring tab and check the crash logs and other matrices.