iPhone同士や、iPhoneとMacの間でアドホックなP2Pネットワークを作り、通信を可能にするフレームワーク。
Publish Subscribeコマンド

一斉送信ができるっぽい。
Pulbisher側のコード例
#import "threeMF.h" self.tmf = [TMFConnector new]; // Provide self.kvCmd = [TMFKeyValueCommand new];[self.tmf publishCommand:self.kvCmd]; // Execute TMFKeyValueCommandArguments *kvArguments = [TMFKeyValueCommandArguments new]; kvArguments.key = @"msg"; kvArguments.value = @"Hello World!"; [self.kvCmd sendWithArguments:kvArguments];
Subscribe側のコード例
#import "threeMF.h" self.tmf = [TMFConnector new]; // Discover [self.tmf startDiscoveryWithCapabilities:@[ [TMFKeyValueCommand name] ] delegate:self]; // Subscribe - (void)threeMF:(TMFConnector *)tmf didChangeDiscoveringPeer:(TMFPeer *)peer forChangeType:(TMFPeerChangeType)type { if(type == TMFPeerChangeFound) { [self.tmf subscribe:[TMFKeyValueCommand name] peer:peer receive:^(TMFKeyValueCommandArguments *arguments){ // do awesome things NSLog(@"%@: %@", arguments.key, arguments.value); } completion:^(NSError *error){ if(error) { // handle error NSLog(@"%@", error); } }]; } }
Respons Request コマンド

いわゆるRPC的な使い方。
CADAnnounceCommandArguments *args = [CADAnnounceCommandArguments new]; args.name = self.nameLabel.text; args.color = _color; [self.tmf sendCommand:[CADAnnounceCommand class] arguments:args destination:peer response:^(id response, NSError *error){ // handle response or error }];
付属のサンプルプログラムをiPhone5とMacBookProでそれぞれ実行するとMacのスクリーンショットがiPhoneに転送された。
iPhoneの画面

Macの画面

- - - -
高機能にもかかわらず使い勝手が良さそう。