Inherits from NSObject
Declared in SCGroup.h

Overview

SCGroup class provides access to a specified group and allows to modify and save it.

Properties

groupName

The group name

@property (nonatomic, strong) NSString *groupName

Declared In

SCGroup.h

groupOwner

The userid of the group owner

@property (nonatomic, readonly) NSString *groupOwner

Declared In

SCGroup.h

groupid

The groupid of the group

@property (nonatomic, readonly) NSString *groupid

Declared In

SCGroup.h

Instance Methods

addGroupMember:

Add a member to the group

- (void)addGroupMember:(id)member

Parameters

member
  • Userid of the new group member

Declared In

SCGroup.h

emailForGroupMember:

Return the email address of a group member

- (NSString *)emailForGroupMember:(id)member

Parameters

member
  • userid of the group member

Return Value

email address of the group member

Discussion

A group member might not be in the friend list as the group member is not yet connected to the user. In this case addition information on a member cannot be retrieved via friendlist. Therefore firstname lastname and email address on each member is available via group meta info.

Declared In

SCGroup.h

firstnameForGroupMember:

Return the firstname of a group member

- (NSString *)firstnameForGroupMember:(id)member

Parameters

member
  • userid of the group member

Return Value

Firstname of the group member if available

Discussion

A group member might not be in the friend list as the group member is not yet connected to the user. In this case addition information on a member cannot be retrieved via friendlist. Therefore firstname lastname and email address on each member is available via group meta info.

Declared In

SCGroup.h

groupImage

Returns the group image if available

- (UIImage *)groupImage

Return Value

The group image

Declared In

SCGroup.h

groupMembers

List of userids of group members

- (NSArray *)groupMembers

Return Value

Array of group members

Declared In

SCGroup.h

groupdataForKey:

Access meta data from the group object

- (NSString *)groupdataForKey:(id)key

Parameters

key
  • The access key

Return Value

The actual meta data

Declared In

SCGroup.h

initWithGroupid:

Instantiate the group with groupid

- (id)initWithGroupid:(id)groupid

Parameters

groupid
  • Groupid of the group

Return Value

SCGroup object

Declared In

SCGroup.h

joinGroup

Join this group

- (BOOL)joinGroup

Return Value

YES - The user is now member of this group

Discussion

The group must be a public group

Declared In

SCGroup.h

makePublic:

Make this group public to allow other users to joind this group

- (void)makePublic:(id)publicGroup

Parameters

public
  • YES the group will be public, NO - the group will be private

Discussion

A public group can be joind by every user and don’t need to be added by the group owner

Declared In

SCGroup.h

nameForGroupMember:

Return the name of a group member

- (NSString *)nameForGroupMember:(id)member

Parameters

member
  • userid of the group member

Return Value

Lastname of the group member if available

Discussion

A group member might not be in the friend list as the group member is not yet connected to the user. In this case addition information on a member cannot be retrieved via friendlist. Therefore firstname lastname and email address on each member is available via group meta info.

Declared In

SCGroup.h

removeGroupdataForKey:

Remove a group data specified by key

- (void)removeGroupdataForKey:(id)key

Parameters

key
  • The access key

Declared In

SCGroup.h

removeMember:

Remove a group member

- (void)removeMember:(id)member

Parameters

member
  • Userid of the group member to be removed

Declared In

SCGroup.h

saveGroup

Saves changes to the server.

- (void)saveGroup

Declared In

SCGroup.h

saveGroupWithCompletionHandler:

Saves changes to the server.

- (void)saveGroupWithCompletionHandler:(id)handler

Parameters

handler
  • Completion handler

Declared In

SCGroup.h

setGroupImage:withCompletionHandler:

Change the group image and upload the image to the server

- (void)setGroupImage:(id)groupImage withCompletionHandler:(id)completionHandler

Parameters

groupImage
  • The new profile image
completionHandler
  • completion handler to be called on completion

Discussion

The completion handler will be called when the transfer has been completed and the group profile has been updated

Declared In

SCGroup.h

setGroupdata:forKey:public:

Set additional meta data for the group

- (void)setGroupdata:(id)data forKey:(id)key public:(id)isPublic

Parameters

data
  • The actual metadata
key
  • The access key, must be unique
isPublic
  • Allow access this data by members

Discussion

This method adds any kind of meta data to the group. Declaring this meta data as public will allow to see this data by any member added to this group. MOC2CallUser.userdata property will allo access to this data from the friend list. Any changes to the user data requires to call saveGroup or saveUserGroupWithCompletionHandler in order to make the changes permanent.

Declared In

SCGroup.h