SimpleUser

@interface SimpleUser : NSObject

SimpleUser is a simplified, mutable version of User that is used as part of registration or when a full User is not required.

  • The email address of the SimpleUser.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) NSString *_Nonnull email;

    Swift

    var email: String { get set }
  • The first name of the SimpleUser.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSString *firstName;

    Swift

    var firstName: String? { get set }
  • The last name of the SimpleUser.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSString *lastName;

    Swift

    var lastName: String? { get set }
  • A profile picture for a SimpleUser.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSString *profileImageUrl;

    Swift

    var profileImageUrl: String? { get set }
  • A birthday for the SimpleUser in the format mm/dd/yyyy.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSString *birthday;

    Swift

    var birthday: String? { get set }
  • Default initializer for SimpleUser.

    Declaration

    Objective-C

    + (nonnull instancetype)simpleUserWithFirstName:(nullable NSString *)firstName
                                           lastName:(nullable NSString *)lastName
                                              email:(nonnull NSString *)email
                                    profileImageUrl:
                                        (nullable NSString *)profileImageUrl
                                           birthday:(nullable NSString *)birthday;

    Swift

    convenience init(firstName: String?, lastName: String?, email: String, profileImageUrl: String?, birthday: String?)

    Parameters

    firstName

    - firstName for the SimpleUser.

    lastName

    - lastName for the SimpleUser.

    email

    - email for the SimpleUser.

    profileImageUrl

    - profile picture for the SimpleUser.

    Return Value

    Instance of SimpleUser.

  • Converts a SimpleUser to an NSDictionary that can be used for caching or sending to the server.

    Declaration

    Objective-C

    - (nonnull NSDictionary *)dictionaryRepresentation;

    Swift

    func dictionaryRepresentation() -> [AnyHashable : Any]

    Return Value

    dictionary - Dictionary form of a SimpleUser.