Group
@objc(VTEGroup)
open class Group : NSObject
Class representing Group
-
Range of valid participants count
Declaration
Swift
@available(*, deprecated, renamed: "ValidParticipantsCountRange") public static let ValidParticipatnsCountRange: ClosedRange<Int> -
Range of valid participants count
Declaration
Swift
public static let ValidParticipantsCountRange: ClosedRange<Int> -
Initiator
Declaration
Swift
@objc public let initiator: String -
Participants
Declaration
Swift
@objc public internal(set) var participants: Set<String> { get }
-
Signs and encrypts data for group
Throws
corresponding errorImportant
Requires private key in local storageDeclaration
Swift
@objc open func encrypt(data: Data) throws -> DataParameters
datadata to encrypt
Return Value
encrypted data
-
Decrypts and verifies data from group participant
Throws
corresponding errorDeclaration
Swift
@objc open func decrypt(data: Data, from senderCard: Card, date: Date? = nil) throws -> DataParameters
dataencrypted data
senderCardsender Card to verify with
datedate of message. Use it to prevent verifying new messages with old card
Return Value
decrypted data
-
Signs then encrypts string for group
Throws
corresponding errorImportant
Requires private key in local storageDeclaration
Swift
@objc open func encrypt(text: String) throws -> StringParameters
textString to encrypt
Return Value
encrypted base64String
-
Decrypts and verifies base64 string from group participant
Throws
corresponding errorDeclaration
Swift
@objc open func decrypt(text: String, from senderCard: Card, date: Date? = nil) throws -> StringParameters
textencryted String
senderCardsender Card to verify with
datedate of message. Use it to prevent verifying new messages with old card
Return Value
decrypted String
-
Updates group
Declaration
Swift
public func update() -> GenericOperation<Void>Return Value
CallbackOperation
-
Adds new participants to group
Note
New participant will be able to decrypt all historyDeclaration
Swift
public func add(participants: FindUsersResult) -> GenericOperation<Void>Parameters
participantsCards of users to add. Result of findUsers call
Return Value
CallbackOperation
-
Share group access and history on new Card of existing participant
Declaration
Swift
public func reAdd(participant: Card) -> GenericOperation<Void>Parameters
participantparticipant Card
Return Value
CallbackOperation
-
Removes participants from group
Note
Removed participant will not be able to decrypt previous history again after group updateDeclaration
Swift
public func remove(participants: FindUsersResult) -> GenericOperation<Void>Parameters
participantsCards of users to remove. Result of findUsers call
Return Value
CallbackOperation
-
Adds new participant to group
Note
New participant will be able to decrypt all historyDeclaration
Swift
public func add(participant card: Card) -> GenericOperation<Void>Parameters
cardCard of user to add
Return Value
CallbackOperation
-
Removes participant from group
Declaration
Swift
public func remove(participant card: Card) -> GenericOperation<Void>Parameters
cardCard of user to remove
Return Value
CallbackOperation
-
Adds new participants to group
Note
New participant will be able to decrypt all historyDeclaration
Swift
public func add(participants: [String]) -> GenericOperation<Void>Parameters
participantsIdentities of users to add
Return Value
CallbackOperation
-
Adds new participant to group
Note
New participant will be able to decrypt all historyDeclaration
Swift
public func add(participant: String) -> GenericOperation<Void>Parameters
cardUser to add
Return Value
CallbackOperation
-
Share group access and history on new Card of existing participant
Declaration
Swift
public func reAdd(participant: String) -> GenericOperation<Void>Parameters
participantparticipant to re add
Return Value
CallbackOperation
-
Removes participants from group
Note
Removed participant will not be able to decrypt previous history again after group updateDeclaration
Swift
public func remove(participants: [String]) -> GenericOperation<Void>Parameters
participantsUsers to remove
Return Value
CallbackOperation
-
Removes participant from group
Declaration
Swift
public func remove(participant: String) -> GenericOperation<Void>Parameters
participantUser to remove
Return Value
CallbackOperation
-
Updates group
Declaration
Swift
@objc open func update(completion: @escaping (_ error: Error?) -> Void)Parameters
completioncompletion handler
errorcorresponding error
-
Adds new participants to group
Note
New participant will be able to decrypt all historyDeclaration
Swift
@objc open func add( participants: FindUsersResult, completion: @escaping (_ error: Error?) -> Void )Parameters
participantsCards of users to add. Result of findUsers call
completioncompletion handler
errorcorresponding error
-
Adds new participants to group
Note
New participant will be able to decrypt all historyDeclaration
Swift
public func add( participants: [String], completion: @escaping (_ error: Error?) -> Void )Parameters
participantsIdentities of users to add
completioncompletion handler
errorcorresponding error
-
Adds new participant to group
Note
New participant will be able to decrypt all historyDeclaration
Swift
@objc open func add( participant: Card, completion: @escaping (_ error: Error?) -> Void )Parameters
participantCard of user to add
completioncompletion handler
errorcorresponding error
-
Adds new participant to group
Note
New participant will be able to decrypt all historyDeclaration
Swift
public func add( participant: String, completion: @escaping (_ error: Error?) -> Void )Parameters
participantNew participant will be able to decrypt all history
completioncompletion handler
errorcorresponding error
-
Share group access and history on new Card of existing participant
Declaration
Swift
@objc open func reAdd(participant: Card, completion: @escaping (_ error: Error?) -> Void)Parameters
participantparticipant Card
completioncompletion handler
errorcorresponding error
-
Share group access and history on new Card of existing participant
Declaration
Swift
public func reAdd(participant: String, completion: @escaping (_ error: Error?) -> Void)Parameters
participantparticipant to re add
completioncompletion handler
errorcorresponding error
-
Removes participants from group
Note
Removed participant will not be able to decrypt previous history again after group updateDeclaration
Swift
@objc open func remove( participants: FindUsersResult, completion: @escaping (_ error: Error?) -> Void )Parameters
participantsCards of users to remove. Result of findUsers call
completioncompletion handler
errorcorresponding error
-
Removes participants from group
Note
Removed participant will not be able to decrypt previous history again after group updateDeclaration
Swift
public func remove( participants: [String], completion: @escaping (_ error: Error?) -> Void )Parameters
participantsUsers to remove
completioncompletion handler
errorcorresponding error
-
Removes participant from group
Declaration
Swift
@objc open func remove( participant: Card, completion: @escaping (_ error: Error?) -> Void )Parameters
participantCard of user to remove
completioncompletion handler
errorcorresponding error
-
Removes participant from group
Declaration
Swift
public func remove( participant: String, completion: @escaping (_ error: Error?) -> Void )Parameters
participantUser to remove
completioncompletion handler
errorcorresponding error
Group Class Reference