Latest 0.0.1
Homepage https://github.com/jpsim/MPCMultipeerClient
License MIT
Platforms ios 7.0, requires ARC
Frameworks MultipeerConnectivity
Authors

Wrapper around MultipeerConnectivity to simplify common use cases.

VERY EARLY WORK IN PROGRESS, USE AT YOUR OWN PERIL.

Usage

See the remotecam demo project for more usage examples.

Advertise and respond to connect/disconnect/events

[MPCMultipeerClient advertiseWithServiceType:@"myservice"];
[MPCMultipeerClient onConnect:^(MCPeerID *peerID) {
    // Connected :)
}];
[MPCMultipeerClient onDisconnect:^(MCPeerID *peerID) {
    // Disconnected :(
}];
[MPCMultipeerClient onEvent:@"doTheThing" runBlock:^(MCPeerID *peerID, id object) {
    // Do the thing
}];

Browse and send events

[MPCMultipeerClient advertiseWithServiceType:@"myservice"];
[MPCMultipeerClient onConnect:^(MCPeerID *peerID) {
    [MPCMultipeerClient sendEvent:@"doTheThing" withObject:nil];
}];

TODO

  • Integrate NSStreams
  • Allow MCSessionSendDataUnreliable
  • Allow setting encryptionPreference
  • Master election
  • Use better unique peer ID than their displayName

License

MIT Licensed.

Latest podspec

{
    "name": "MPCMultipeerClient",
    "version": "0.0.1",
    "platforms": {
        "ios": "7.0"
    },
    "license": "MIT",
    "summary": "Wrapper around MultipeerConnectivity to simplify common use cases",
    "homepage": "https://github.com/jpsim/MPCMultipeerClient",
    "authors": {
        "JP Simard": "[email protected]"
    },
    "source": {
        "git": "https://github.com/jpsim/MPCMultipeerClient.git",
        "tag": "0.0.1"
    },
    "description": "Wrapper around MultipeerConnectivity to simplify common use cases. Very early work in progress, use at your own peril.",
    "source_files": "MPCMultipeerClient/*.{h,m}",
    "frameworks": "MultipeerConnectivity",
    "requires_arc": true
}

Pin It on Pinterest

Share This