Ionic agent
Prerequisites
Cordova 10, Capacitor 5
Android
- Android 8.0 or higher - min SDK 21
- Android Gradle Plugin - 4.2.0+
- Gradle version - 6.7.1+
IOS
- Mac OS 10.15.7 and above
- iOS 12 and above
- Download Install X-Code 12.2 and above
- Install cocoa pods in system
Adding SixthSense Ionic dependency (Common for iOS & Android)
Run the following commands to set the appropriate registry, authenticate, and download SixthSense Ionic dependency.
SixthSense Ionic dependency will download in the node modules folder.
- Open the main.ts file and do the following changes:
a. Add the following code in the main.ts file.
- Create a new global-error-handler.ts file inside the Project/src/app folder and add the following code in the file.
(OPTIONAL - need to implement if global error handler not there(specific to angular)):
- Save all changes and perform
ionic build
.
IOS:
To implement SixthSenseMobileSDK.
a. Open the xcworkspace file in X-Code.
b. Open the Podfile inside the Pods folder and add pod 'SixthSenseMobileSDK'.
c. Open the Project in terminal and run pod update command. It will download the SixthSenseMobileSDK file in the Sample app.
d. Go to AppDelegate class and import SixthSenseMobileSDK. Initialise SDK in didDinishLaunching function with the following code.
SixthSenseMobile.shared.initSixthSenseMobileSDK()
e. Open the Info.plist file and add the "AccessToken" key as a string and also add the value for the same.
f. Open the Info.plist file and add "EndPointName" key as a string and also add the value "https://http-collector-observability.sixthsense.rakuten.com/poc-mobile/"
Testing the build
You are now in an Xcode workspace for building, debugging, and testing the Mobile Monitoring capability.
- For force crash, import SixthSenseMobileSDK in any View Controller class and call fatalError().
- Run the application in simulator/device and try to make the application crash. After crashing, relaunch the application in simulator/device.
- Open the Mobile Monitoring dashboard and go to the Mobile Monitoring tab and check the crash logs and other matrices.