Go To Dashboard

SDK Documentation: Super Users

  • Why Send User Data?

    Sending user data to us will annotate your users’ sessions, giving you more insight into who is using your app (Super Users) and who is seeing which in-app UI flows (Release Notes, Onboarding, etc.).

    You can add as little or as much information as you’d like. We recommend you at least provide a userId (something that you, or your server provides you, that identifies your user). For your convenience, you may add the user’s name and/or email address, if that makes it easier for you to visualize the data.

  • When A User Logs In

    Add this code when the user logs in, or when a logged-in user starts the app. This will associate your user&rsqou;s information with their session here.

    #import <AppToolkit/AppToolkit.h>
    
    ...
    
    // When the user finishes logging in, or is already logged in on start
    [[AppToolkit sharedInstance] setUserIdentifier:@"qxb49bd"
                                             email:@"bob@loblaw.org"
                                              name:@"Bob Loblaw"];
    ...
    
    import AppToolkit
    
    ...
    
    // When the user finishes logging in, or is already logged in on start
    AppToolkit.sharedInstance().setUserIdentifier("qxb49bd",
                                                  email: "bob@loblaw.org",
                                                  name: "Bob Loblaw")
    
    ...
    
  • When A User Logs Out

    In order to clear the AppToolkit session of the user’s information, add this code when the user logs out.

    #import <AppToolkit/AppToolkit.h>
    
    ...
    
    [[AppToolkit sharedInstance] setUserIdentifier:nil email:nil name:nil];
    
    import AppToolkit
    
    ...
    
    AppToolkit.sharedInstance().setUserIdentifier(nil, email: nil, name: nil)
    
  • Accessing Super Status

    Once you have configured Super Users in your Dashboard, you can check inside the app whether the current user qualifies as super or not.

    if (ATKAppUserIsSuper()) {
       // User is a Super User, so you can perform different tasks for that user.
       [self enableAwesomeFeature];
    }
    if (ATKAppUserIsSuper()) {
       // User is a Super User, so you can perform different tasks for that user.
       enableAwesomeFeature();
    }