Mac Developer Library

Developer

Collaboration Framework Reference CBGroupIdentity Class Reference

Options
Deployment Target:

On This Page
Language:

CBGroupIdentity

An object of the CBGroupIdentity class represents a group identity and is used for viewing the attributes of group identities from an identity authority. The principal attributes of a CBGroupIdentity object are a POSIX group identifier (GID) and a list of members.

Inheritance


Conforms To


Import Statement


Swift

import Collaboration

Objective-C

@import Collaboration;

Availability


Available in OS X v10.5 and later.
  • Returns the group identity with the given POSIX GID in the specified identity authority.

    Declaration

    Swift

    init!(posixGID gid: gid_t, authority authority: CBIdentityAuthority!) -> CBGroupIdentity

    Objective-C

    + (CBGroupIdentity *)groupIdentityWithPosixGID:(gid_t)gid authority:(CBIdentityAuthority *)authority

    Parameters

    gid

    The GID of the group identity you are searching for.

    authority

    An identity authority in which to search for the group identity.

    Return Value

    The group identity object with the given GID in the specified identity authority, or nil if no identity exists with the specified GID.

    Import Statement

    Objective-C

    @import Collaboration;

    Swift

    import Collaboration

    Availability

    Available in OS X v10.5 and later.

  • Returns the POSIX GID of the identity.

    Declaration

    Swift

    func posixGID() -> gid_t

    Objective-C

    - (gid_t)posixGID

    Return Value

    The POSIX GID of the group identity.

    Discussion

    The POSIX GID is an integer that can identify a group within an identity authority. GIDs are not guaranteed to be unique within an identity authority.

    Import Statement

    Objective-C

    @import Collaboration;

    Swift

    import Collaboration

    Availability

    Available in OS X v10.5 and later.

  • Returns the members of the group.

    Declaration

    Swift

    func members() -> [AnyObject]!

    Objective-C

    - (NSArray *)members

    Return Value

    An array of CBIdentity objects each representing a member of the group identity.

    Discussion

    This method only returns direct members of a group, it does not return members of members. Both user and group identities can be members of a group, but a group cannot be a member of itself. You also cannot have “circular” membership, i.e. a group be a member of another group that is a member of the first group.

    Import Statement

    Objective-C

    @import Collaboration;

    Swift

    import Collaboration

    Availability

    Available in OS X v10.5 and later.