HomeDocumentationAPI Reference
Getting StartedAPI ReferenceBug ReportingCrash ReportingAPMHelp Center
These docs are for v8.1. Click to read the latest docs for v12.0.0.

User Data

User data is used to add chunks of information to a user so that it's sent to the dashboard with the reports. Each call to this API overwrites the previous data added. This method takes a string argument.

let profileDetails = user.allProfileDetails()
let profileDetailsString = "\(profileDetails)"
Instabug.userData = profileDetailsString
NSDictionary *profileDetails = [user allProfileDetails];
NSString *profileDetailsString = [NSString stringWithFormat:@"%@", profileDetails];
Instabug.userData = profileDetailsString;
Instabug.setUserData("User data");
Instabug.setUserData("User data sample");
//Set the user data 
cordova.plugins.instabug.setUserData(
    'user_data',
    function () {
        console.log('Success');
    },
    function (error) {
        console.log(error);
    }
);
//iOS
Instabug.SetUserData("user_data");

//Android 
Instabug.UserData = "User data";