ios - Multipeer Connectivity: connectedPeer is not connected? -


i want send resource multipeer connectivity framework, see below. strange thing log says:

[self.mysession connectedpeers]: (     "<mcpeerid: 0x10fc9d60 displayname = ipad>" )  error: peer not connected 

so peer connected, , in next line says not connected. how, why? delegate methods implemented on client side.

dispatch_async(dispatch_get_main_queue(), ^{         nslog(@"[self.mysession connectedpeers]: %@", [self.mysession connectedpeers]);         [self.mysession sendresourceaturl:u withname:@"apple" topeer:[self.mysession connectedpeers] withcompletionhandler:^(nserror *error) {             if (error) {                 nslog(@"error: %@", [error localizeddescription]);             }              else{                 uialertview *alert = [[uialertview alloc] initwithtitle:@"mcdemo"                                                                 message:@"file sent."                                                                delegate:self                                                       cancelbuttontitle:nil                                                       otherbuttontitles:@"great!", nil];                  [alert performselectoronmainthread:@selector(show) withobject:nil waituntildone:no];              }         }];     }); 


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -