CanIOSharedSpaceManager
Class Overview
Properties
@property (nonatomic, assign) id <CanIOSharedSpaceManagerDelegate> delegate;
CanIOSharedSpaceManager's delegate, conforming to the CanIOSharedSpaceManagerDelegate protocol. This protocol is used to notify your app about the result of the local peer's attempts to join other spaces, and about other peers sending, accepting and rejecting invitation to join spaces.
@property (nonatomic) NSMutableDictionary *sharedSpaces;
This dictionary contains a reference to all spaces the local peer has created or joined. The key for each space is its UUID, so any space can be accessed using its UUID:
CanIOSharedSpace *mySpace = [CanIOSharedSpaceManager sharedManager].sharedSpaces[UUID];
Methods
- (CanIOSharedSpace *)createSpaceWithName:(NSString *)name;
Use this method to create a new shared space. The new space object will be initiated and added to the sharedSpaces dictionary, and returned to you from this method, at which point it is ready to use.
- (void)joinSpaceWithUUID:(NSString *)UUID ownedByPeer:(CanIOPeer *)peer;
Use this method to join a space owned by a peer, using the space's UUID and the peer's CanIOPeer object. If joining the space is successful, the didJoinSpace: delegate method will be called, providing you with the newly joined space, or the failedToJoinSpaceWithUUID: will be called, indicating joining the space failed.