Wrapper around MultipeerConnectivity to simplify common use cases
MIT License
Wrapper around MultipeerConnectivity
to simplify common use cases.
VERY EARLY WORK IN PROGRESS, USE AT YOUR OWN PERIL.
See the remotecam
demo project for more usage examples.
[MPCMultipeerClient advertiseWithServiceType:@"myservice"];
[MPCMultipeerClient onConnect:^(MCPeerID *peerID) {
// Connected :)
}];
[MPCMultipeerClient onDisconnect:^(MCPeerID *peerID) {
// Disconnected :(
}];
[MPCMultipeerClient onEvent:@"doTheThing" runBlock:^(MCPeerID *peerID, id object) {
// Do the thing
}];
[MPCMultipeerClient advertiseWithServiceType:@"myservice"];
[MPCMultipeerClient onConnect:^(MCPeerID *peerID) {
[MPCMultipeerClient sendEvent:@"doTheThing" withObject:nil];
}];
MIT Licensed.