Bit6Group Class Reference
| Inherits from | NSObject |
| Declared in | Bit6Group.h |
Tasks
-
+ groupWithAddress: -
+ groupWithConversation: -
+ createGroupWithMetadata:completion: -
+ createPublicGroupWithIdentifier:metadata:completion: -
+ joinGroupWithAddress:role:completion: -
– setMetadata:completion: -
– leaveGroupWithCompletion: -
addressproperty -
createdproperty -
updatedproperty -
metadataproperty -
membersproperty -
isAdminproperty -
hasLeftproperty -
isPublicproperty -
– loadMembersListWithCompletion: -
– inviteGroupMemberWithAddress:role:completion: -
– inviteGroupMembersWithAddresses:roles:completion: -
– kickGroupMember:completion:
Properties
address
The Bit6Address object associated with the sender.
@property (nonnull, nonatomic, readonly) Bit6Address *addressDeclared In
Bit6Group.hcreated
The creation timestamp of the sender.
@property (nonnull, nonatomic, copy, readonly) NSNumber *createdDeclared In
Bit6Group.hhasLeft
YES if the user has left the group.
@property (nonatomic, readonly) BOOL hasLeftDeclared In
Bit6Group.hisAdmin
YES if the user role in the group is Admin.
@property (nonatomic, readonly) BOOL isAdminDeclared In
Bit6Group.hisPublic
YES if the group is public.
@property (nonatomic, readonly) BOOL isPublicDeclared In
Bit6Group.hmembers
The Bit6GroupMember objects in the sender as a NSArray.
@property (nullable, nonatomic, copy, readonly) NSArray<Bit6GroupMember*> *membersDeclared In
Bit6Group.hClass Methods
createGroupWithMetadata:completion:
Creates an empty group.
+ (void)createGroupWithMetadata:(nullable NSDictionary<NSString*,id> *)metadata completion:(nullable void ( ^ ) ( Bit6Group *_Nullable group , NSError *_Nullable error ))completionParameters
- metadata
metadata for the new group. If provided it has to be able to be converted to JSON data (check by using +[NSJSONSerialization isValidJSONObject:])
- completion
block to be called when the operation is completed.
Declared In
Bit6Group.hcreatePublicGroupWithIdentifier:metadata:completion:
Creates an empty public group with the specified identifier.
+ (void)createPublicGroupWithIdentifier:(nonnull NSString *)identifier metadata:(nullable NSDictionary<NSString*,id> *)metadata completion:(nullable void ( ^ ) ( Bit6Group *_Nullable group , NSError *_Nullable error ))completionParameters
- identifier
unique identifier to use.
- metadata
metadata for the new group. If provided it has to be able to be converted to JSON data (check by using +[NSJSONSerialization isValidJSONObject:])
- completion
block to be called when the operation is completed.
Declared In
Bit6Group.hgroupWithAddress:
Returns a Bit6Group object based on the Bit6Address indicated.
+ (nullable Bit6Group *)groupWithAddress:(nonnull Bit6Address *)addressParameters
- address
Bit6Address of the group.
Return Value
a Bit6Group object for the Bit6Address indicated.
Declared In
Bit6Group.hgroupWithConversation:
Returns a Bit6Group object based on the Bit6Conversation indicated.
+ (nullable Bit6Group *)groupWithConversation:(nonnull Bit6Conversation *)conversationParameters
- conversation
Bit6Conversation linked to the group.
Return Value
a Bit6Group object for the Bit6Conversation indicated.
Declared In
Bit6Group.hjoinGroupWithAddress:role:completion:
Join a public group.
+ (void)joinGroupWithAddress:(nonnull Bit6Address *)address role:(nonnull NSString *)role completion:(nullable void ( ^ ) ( Bit6Group *_Nullable group , NSError *_Nullable error ))completionParameters
- address
Bit6Address of the group to join.
- role
requested role in the group. There are constants available to use: Bit6GroupMemberRole_Admin and Bit6GroupMemberRole_User.
- completion
block to be called when the operation is completed.
Discussion
Note: You can check if a group is public by using [Bit6Group isPublic]
Declared In
Bit6Group.hInstance Methods
inviteGroupMemberWithAddress:role:completion:
Invite an user to the group.
- (void)inviteGroupMemberWithAddress:(nonnull Bit6Address *)address role:(nonnull NSString *)role completion:(nullable void ( ^ ) ( NSArray<Bit6GroupMember*> *_Nullable members , NSError *_Nullable error ))completionParameters
- address
Bit6Address indicating the user to invite.
- role
requested role to assign to the user invited to the group. There are constants available to use: Bit6GroupMemberRole_Admin and Bit6GroupMemberRole_User.
- completion
block to be called when the operation is completed.
Declared In
Bit6Group.hinviteGroupMembersWithAddresses:roles:completion:
Invite users to the group.
- (void)inviteGroupMembersWithAddresses:(nonnull NSArray<Bit6Address*> *)addresses roles:(nonnull NSArray<NSString*> *)roles completion:(nullable void ( ^ ) ( NSArray<Bit6GroupMember*> *_Nullable members , NSError *_Nullable error ))completionParameters
- addresses
array of Bit6Address indicating the users to invite.
- roles
array of requested roles to assign to the users invited to the group. There are constants available to use: Bit6GroupMemberRole_Admin and Bit6GroupMemberRole_User.
- completion
block to be called when the operation is completed.
Declared In
Bit6Group.hkickGroupMember:completion:
Remove a member from the group.
- (void)kickGroupMember:(nonnull Bit6GroupMember *)member completion:(nullable void ( ^ ) ( NSArray<Bit6GroupMember*> *_Nullable members , NSError *_Nullable error ))completionParameters
- member
member to be removed from the group.
- completion
block to be called when the operation is completed.
Declared In
Bit6Group.hleaveGroupWithCompletion:
Abandon the sender. Updates related to the sender won’t be received anymore.
- (void)leaveGroupWithCompletion:(nullable void ( ^ ) ( NSError *_Nullable error ))completionParameters
- completion
block to be called when the operation is completed.
Declared In
Bit6Group.hloadMembersListWithCompletion:
Refreshes the members of the sender.
- (nullable NSArray<Bit6GroupMember*> *)loadMembersListWithCompletion:(nullable void ( ^ ) ( NSArray<Bit6GroupMember*> *_Nullable members , NSError *_Nullable error ))completionParameters
- completion
block to be called when the operation is completed.
Return Value
current members list of the sender.
Declared In
Bit6Group.hsetMetadata:completion:
Sets the metadata for the sender.
- (void)setMetadata:(nonnull NSDictionary<NSString*,id> *)metadata completion:(nullable void ( ^ ) ( NSError *_Nullable error ))completionParameters
- metadata
new metadata for the sender. If provided it has to be able to be converted to JSON data (check by using +[NSJSONSerialization isValidJSONObject:])
- completion
block to be called when the operation is completed.
Declared In
Bit6Group.h