🎉 UserExperior is now part of DevRev  |  Learn more

Note:

  • UserExperior supports os versions from iOS 12 and above!
  • You can install the UserExperior iOS SDK through CocoaPods (Install if you don't already have it) OR manually.
  • We do not recommend testing on Emulators/Simulators, conduct testing on real devices.

Via Cocoapods

1.Add to the pod file

For Swift 5.2 or above

pod 'UserExperior', '6.0.7'

2. Install Pod

In the terminal, type

pod repo update

After the repo update, perform the below command to install the pod

pod install

3. In your app delegate, include:

3.a For Objective-C

@import UserExperiorSDK;      

3.b. For Swift

import UserExperiorSDK  

4. Add this call as the first line of your application: didFinishLaunchingWithOptions: method.

4.a. For Objective-C

[UserExperior startRecordingWithVersionKey:@"VERSION_KEY"];

Note

Now the integration is completed, build the ONLY on REAL iOS DEVICES since framework support device architecture. After performing activities minimize the app. UserExperior will upload the data, which could be seen within 2-3 minutes on the UserExperior portal.

4.b. For Swift

UserExperior.startRecording("VERSION_KEY")

Note

Now the integration is completed, build the ONLY on REAL iOS DEVICES since framework support device architecture. After performing activities minimize the app. UserExperior will upload the data, which could be seen within 2-3 minutes on the UserExperior portal.

Customizing UserExperior with Key APIs:

1. Set User Identifier & additional properties

a. Set User Identifier

UserExperior SDK by default takes the device id as a user identifier. However, you can specify any unique user identifier of your choice (eg. Email Id, Phone Number, etc.) as a custom user identifier. This identifier will show up in the UserExperior portal.

  • For Objective-C
  [UserExperior setUserIdentifier:@"pass-your-user-id-here"];

Eg.

   [UserExperior setUserIdentifier:@"abc@xyz.com"];
  • For Swift
 UserExperior.setUserIdentifier("pass-your-user-id-here")

Eg.

   [UserExperior setUserIdentifier:"abc@xyz.com"];

b. Send additional user information

  • For Objective-C
   [UserExperior setUserProperties:@{@"key1":@value1,
                                     @"key2":@value2, ...}];

Eg.

  [UserExperior setUserProperties:@{@"start_date":@"2020/11/25", // Date Format YYYY/MM/DD
                                     @"plan_subscribed":@trial];    

Note: Please send the Date in "YYYY/MM/DD" format.

  • For Swift
UserExperior.setUserProperties(["key1:"value1",
                                   "key2:"value2", ...])

Eg.

  UserExperior.setUserProperties(["start_date": "2020/12/31", // Date-Format: YYYY/MM/DD
                                    "plan_subscribed": "trial"])
  • Note: Please send the date property in "YYYY/MM/DD" format only, if any.

2. Log Event

UserExperior SDK lets you log user events based on the scenario. An event is the indication of Progress in the user's session. LogEvent() can be used as follows

a. Log event with the name

  • For Objective-C
[UserExperior logEventWithName:@"YOUR_EVENT"];        

Eg.

   [UserExperior logEventWithName:@"Onboarding successful!"];        
  • For Swift
UserExperior.logEvent("YOUR_EVENT")

Eg.

   UserExperior.logEvent("Onboarding successful!")
  • Note: Max eventName limit is 250 chars only.

b. Log event with name and properties

  • For Objective-C
[UserExperior logEventWithName:@"YOUR_EVENT" properties:@{@"key1":@value1,
                                                     @"key2":@value2, ...}];        

Eg.

   [UserExperior logEventWithName:@"Health Profile created" properties:@{@"age":@35,
                                                                 @"weight":@70.5}];        
  • For Swift
   UserExperior.logEvent("YOUR_EVENT", properties:["key1:"value1",
                                                   "key2:"value2", ...])

Eg.

UserExperior.logEvent("Health Profile created", properties:["age":35,
                                                               "weight":70.5])

Note

  • Max eventName limit is 250 chars only.
  • Send the date property in "YYYY/MM/DD" format only, if any.
  • Send primitive data types only in the property value e.g. String, integer, boolean

3. Mask/ Unmask Sensitive Views

UserExperior SDK complies with GDPR policy and masks all the user input fields i.e. UITextField and UITextView automatically.

a. Manual Masking/ Un-Masking:

1. Manual masking of views:

If you wish to explicitly mask any UI element in your app,  you can mask it by using:

  • For Objective-C
[UserExperior markSensitiveViewsWithViewToSecure:@[VIEWS_TO_SECURE]];        

Eg.

   [UserExperior markSensitiveViewsWithViewToSecure:@[phoneLabel, userInfoView]];        
  • For Swift
UserExperior.markSensitiveViews([VIEWS_TO_SECURE])

Eg.

UserExperior.markSensitiveViews([phoneLabel, userInfoView])
2. Manual un-masking of views:

If you wish to explicitly un-mask any manually masked UI element, you can un-mask it by using:

  • For Objective-C
[UserExperior unmarkSensitiveViewsWithViewToUnBlock:@[VIEWS_TO_UNBLOCK]];        

Eg.

   [UserExperior unmarkSensitiveViewsWithViewToUnBlock:@[phoneLabel, userInfoView]];        
  • For Swift
UserExperior.unmarkSensitiveViews([VIEWS_TO_UNBLOCK])

Eg.

UserExperior.unmarkSensitiveViews([phoneLabel, userInfoView])
  • Note: It will work only on the manually masked UI element.
3. Manual Un-Masking of all views:

If you wish to explicitly un-mask all the manually masked UI elements in a particular view, you can un-mask it by using:

  • For Objective-C
[UserExperior unmarkAllSensitives];          
  • For Swift
UserExperior.unmarkAllSensitives()
  • Note: It will work only on the manually masked UI element.

b. Un-Maske auto masked views:

If you wish to explicitly un-mask the automatically masked UI element, you can do un-mask it by using:

  • For Objective-C
[UserExperior exposeSensitiveViewsWithViewsToExpose:@[VIEWS_TO_EXPOSE]];        

Eg.

   [UserExperior exposeSensitiveViewsWithViewsToExpose:@[cityTextField, countryTextField]];        
  • For Swift
UserExperior.exposeSensitiveViews([VIEWS_TO_EXPOSE])

Eg.

UserExperior.exposeSensitiveViews([cityTextField, countryTextField])
  • Note: It will work only on the automatically masked UI element.

4. Mask/ Unmask Web-View Element

UserExperior SDK complies with GDPR policy and masks all the user input fields (Eg. name, password, email, etc.)  automatically in the Webview.

a. Manual Mask: 

If you wish to mask any WebView element on a Web page explicitly,  you can mask it by using class 'ue-mask'
Eg.

<label class="ue-mask">OTP: 12345</label>

b. Manual Unmask:

If you wish to explicitly un-mask any manually masked WebView element, you can un-mask it by using class 'ue-unmask'
Eg.

<input type="text" placeholder="Enter Username" name="username" required class="ue-unmask">

5. Identify Screens

UserExperior SDK automatically detects ViewController and defines them as screens. However, If you have used subviews added in the existing ViewController, then we recommend to use the startScreen() method. This API allows you to manually define subviews that will be missed during auto-capturing.

  • For Objective-C
[UserExperior startScreenWithName:@"SCREEN_NAME"];

Eg.

[UserExperior startScreenWithName:@"OTPViewController"];
  • For Swift
UserExperior.startScreen("SCREEN_NAME")

Eg.

UserExperior.startScreen("OTPViewController")

Note: Max screenName limit is 250 chars only

6. Track Response Time of Methods/API Calls

UserExperior SDK allows you to track the load/ response time of the components in your app using a method called startTimer and endTimer. You can call startTimer method at any event on the app from which you want to track the load/ response time and call a endTimer method at the event completion. This method will calculate the complete response time. You can also pass timer properties while tracking response time.

Eg: Suppose, you have a TableView on your screen which gets loaded with data you receive from the server. You can call startTimer method when the view resumes to the user and call endTimer method when data gets successfully shown in TableView. Now, you can know how much time it takes to load data after the screen is visible to the user. Similarly, you can use startTimer at any method call and endTimer on method response.

a. Start and End Timer with Properties

  • For Objective-C
[UserExperior startTimerWithName:@"TIMER_NAME" properties:@{@"key1":@value1, @"key2":@value2, ...}];
.
.
[UserExperior endTimerWithName:@"TIMER_NAME" properties:@{@"key1":@value1, @"key2":@value2, ...}];

 

  • For Swift
UserExperior.startTimer("TIMER_NAME", properties:["key1:"value1", "key2:"value2", ...])
UserExperior.endTimer("TIMER_NAME", properties:["key1:"value1", "key2:"value2", ...])

      Note: 

  • The startTimer and endTimer properties will be merged 
  • If you don’t want to send any properties, just send it as an empty object
  • Timer name has to be same for both start and end timer
  • Send primitive data types only in the property value e.g. String, integer, boolean

We have provision for some predefined property parameters for startTimer and endTimer as follows

startTimer property parameter:

Property parameter Description Example
ue_process Functionality Module e.g. Onboarding, Credit Card etc… Onboarding, Credit Card etc.. are business processes.
ue_sub_process Functionality Sub Module e.g View Card Details, OTP Sent etc… OTP Sent, View Card Details etc… are part of the business functions. Multiple sub functions make up a business process.

endTimer property parameter:

Property parameter Description Example
ue_api_status API status Success or Failure
ue_response_code Response status code for the API response 2XX, 3XX, 4XX, 5XX or any other custom code received as the response to the API
ue_response_code_desc Status code description Description of the status code e.g. Unauthorized request

Code Examples for iOS

Objective-C

// While sending request
[UserExperior startTimerWithName:@"User Login API call"           properties:@{@"ue_process":@"Login Module",
            @"ue_sub_process":@"User Authentication"}];
.
.
.
//  While getting response
[UserExperior endTimerWithName:@"User Login API call" properties:@{@"ue_api_status":@"Success",
            @"ue_response_code":@"201",
            @"ue_response_code_desc":@"Valid User"}];

Swift

// While sending request
UserExperior.startTimer("User Login API call",
                         properties:["ue_process”:Login Module",
                                  "ue_sub_process":"User Authentication"])
.
.
.
//  While getting response
UserExperior.endTimer("User Login API call",
                  properties:["ue_api_status":"Success",      
                              "ue_response_code":"201",
                              "ue_response_code_desc":"Valid User"])

7. Control Recording

UserExperior SDK has the following APIs which can be used to control the recording. The APIs stopRecording, pauseRecording, resumeRecording are optional and they should be only called when you explicitly want to override the default behavior. Basically, you can use pauseRecording and resumeRecording to bypass any user flow which you don't want UserExperior to capture

Stop Recording: By default, the recording stops automatically once the app goes to the background. However, you can stop at the desired point by calling this API.

  • For Objective-C
[UserExperior stopRecording];
  • For Swift
UserExperior.stopRecording()

Pause Recording: This API pauses the recording, you can use resumeRecording API to resume.

  • For Objective-C
[UserExperior pauseRecording];
  • For Swift
UserExperior.pauseRecording()

Resume Recording: This API resumes the recording if it is paused.

  • For Objective-C
[UserExperior resumeRecording];
  • For Swift
UserExperior.resumeRecording()

isRecording() method returns the status of the SDK recording whether the SDK is active mode or in-active mode. The boolean value `true` indicates that the SDK is active and `false` indicates that the SDK is in-active.

  • For Objective-C
[UserExperior isRecording];
  • For Swift
UserExperior.isRecording()

8. Opt-In/Opt-Out

UserExperior SDK by default opts-in users for session recording on app installs. If the user was disabled for session recording by using the optOut() method, you can use this method to enable recording at runtime.

  • For Objective-C
[UserExperior consentOptIn];
  • For Swift
UserExperior.consentOptIn()

This method returns the status of the user whether the user is currently opted-in or opted-out. The boolean value true indicates that the user is opted-out and false indicates that the user is opted-in.

  • For Objective-C
[UserExperior getOptOutStatus];
  • For Swift
UserExperior.getOptOutStatus()

What is NSAllowsArbitraryLoads?

A Boolean value used to disable App Transport Security for any domains not listed in the NSExceptionDomains dictionary. Listed domains use the settings specified for that domain. The default value of NO requires the default App Transport Security behavior for all connections.

UserExperior Technologies LLC
2033 Gateway Place, 5th Floor
San Jose, CA 95110
Compliances
UserExperior has successfully completed a System and Organization Controls (SOC) 2 Type 2 audit, performed by Sensiba San Filippo, LLP (SSF).
Information Security Management System of UserExperior Pvt Ltd has been assessed and found to conform to the requirements of ISO/IEC 27001:2013.

Privacy & Security | Terms & Conditions | GDPR