PlanetKitUserId
public class PlanetKitUserId : NSObject
A class representing a PlanetKit user ID.
-
The ID of the user.
Declaration
Swift
@objc public let id: String
-
The service ID associated with the user.
Declaration
Swift
@objc public let serviceId: String
-
The country of the user.
Declaration
Swift
@objc public let country: String?
-
The unique ID of the user in the format “
@ ”. Declaration
Swift
@objc public let uniqueId: String
-
Initializes a new instance of
PlanetKitUserId
.Declaration
Swift
@objc public init(id: String, serviceId: String)
Parameters
id
The ID of the user.
serviceId
The service ID associated with the user.
-
Initializes a new instance of
PlanetKitUserId
.Note
If the country code is invalid, the initialization will fail and returnnil
.Declaration
Swift
@objc public init?(id: String, serviceId: String, country: String?)
Parameters
id
The ID of the user.
serviceId
The service ID associated with the user.
country
The country code of the user. The country code must be a two-letter code.
-
Initializes a new instance of
PlanetKitUserId
from a string.Note
If the string is invalid, the initialization will fail and returnnil
.Declaration
Swift
@objc public init?(string: String?)
Parameters
string
The string representation of the user ID in the format “
@ + ”. -
Checks if the current user ID is equal to another user ID.
Declaration
Swift
public override func isEqual(_ object: Any?) -> Bool
Parameters
object
The object to compare.
Return Value
true
if the user IDs are equal, otherwisefalse
. -
Checks if the current user ID is not equal to another user ID.
-
Checks if the current user ID is greater than another user ID.
-
Checks if the current user ID is greater than or equal to another user ID.
-
Checks if the current user ID is less than another user ID.
-
Checks if the current user ID is less than or equal to another user ID.
-
A string representation of the user ID.
Declaration
Swift
public override var description: String { get }