PyzeIdentity

@interface PyzeIdentity : NSObject

PyzeIdentity You can use this class to send the user’s traits to Pyze. You can identify a user using setUserIdentity method and reset the user’s identity using resetUserIdentity method

Since

v3.2.3
  • Use this to identify users. Examples include: username, userid, email address, phone number, or a hashedId. Call this when a user logs in, registers or signs up

    Since

    v3.2.3

    Declaration

    Objective-C

    + (void)setUserIdentifer:(nonnull NSString *)uniqueID;

    Swift

    class func setUserIdentifer(_ uniqueID: String)

    Parameters

    uniqueID

    An app specific user identifer

  • Resets App specific User Identifer. Call this when a user logs off.

    Since

    v3.2.3

    Declaration

    Objective-C

    + (void)resetUserIdentifer;

    Swift

    class func resetUserIdentifer()
  • Post the user traits to Pyze. Send user traits as a map/dictionary. Here are some example traits you can use.

    Send user traits as a map/dictionary. For example

      -(void) postIdentityTraits
      {
          NSMutableDictionary *attributes = [NSMutableDictionary dictionary];
          attributes[@"address"] = @"585 Broadway Street, Redwood City, California 94063";
          attributes[@"age"] = @"25";
          attributes[@"avatar"] =  @"https://mark.com";
          attributes[@"birthday"] =  @"01-04-1986";
          attributes[@"createdAt"] = @"Date String";
          attributes[@"description"] = @"Web Hosting Specialist";
          attributes[@"email"] =  @"myEmail@gmail.com";
          attributes[@"firstName"] =  @"Mark";
          attributes[@"gender"] = @"male";
          attributes[@"lastName"] =  @"Hive";
          attributes[@"name"] =  @"Mark Hive";
          attributes[@"phoneNumber"] = @"415 555 1212";
          attributes[@"title"] = @"Web Hosting Specialist";
          attributes[@"username"] =  @"markh";
          attributes[@"website"] =  @"https://pyze.com";
          attributes[@"facebookId"] = @"USER_facebookId";
          attributes[@"twitterUsername"] = @"USER_twitterId";
          attributes[@"snapchatUsername"] =  @"USER_snapchatId";
          attributes[@"linkedInProfileId"] =  @"USER_linkedinId";
          attributes[@"instagramUserId"] =  @"USER_instagramId";
    
          [PyzeIdentity postTraits:attributes];
      }
    

    Since

    v3.2.3

    Declaration

    Objective-C

    + (void)postTraits:(nonnull NSDictionary *)dictionary;

    Swift

    class func postTraits(_ dictionary: [AnyHashable : Any])