User
@objc
public class User : NSObject, APIModel, PersistableObject
A User model.
-
User identifier. This could either be an email address or a mobile phone number.
Declaration
Swift
@objc public var userId: String
-
First name.
Declaration
Swift
@objc public var firstName: String
-
Last name.
Declaration
Swift
@objc public var lastName: String
-
Email Address.
Declaration
Swift
@objc public var email: String
-
Mobile phone number. It is optional.
Declaration
Swift
@objc public var mobileNumber: String?
-
Unique ID generated by Server.
Declaration
Swift
@objc public var uid: String
-
User’s address. It is optional.
Declaration
Swift
@objc public var address: Address?
-
A boolean value indicating whether the user’s email address has been verified.
Declaration
Swift
@objc public var emailVerified: Bool
-
A boolean value indicating whether the user’s mobile number has been verified.
Declaration
Swift
@objc public var mobileVerified: Bool
-
User’s Settings.
Declaration
Swift
@objc public var settings: UserSettings
-
A dictionary that can hold JSON representable values for the user object. This is just a storage container for arbitrary information that can be set from the app side. The information will be retrieved from the server as is and provided in the user object. Neither the sdk nor the server reads into the actual values stored in this object.
Declaration
Swift
@objc public var additionalInfo: [String : Any] { get set }
-
Additional User properties.
Declaration
Swift
public var additionalProperties: [String : Any?]?
-
Initializer.
Declaration
Swift
@objc public init(userId: String, firstName: String, lastName: String, email: String, mobileNumber: String? = nil, photo: Data?, address: Address?)
-
Initializer with decoder for user model.
Declaration
Swift
public required init(from decoder: Decoder) throws
Parameters
decoder
Decoder parameter.
-
Encoder for User model.
Declaration
Swift
public func encode(to encoder: Encoder) throws
Parameters
encoder
Encoder parameter.