2

I am sending a file using multipeer connectivity in ios7 in this way:

[browser invitePeer:key
                              toSession:session
                            withContext:myData
                                timeout:interval];

and the other user receives it in this way:

- (void) advertiser:(MCNearbyServiceAdvertiser *)advertiser
didReceiveInvitationFromPeer:(MCPeerID *)peerID
    withContext:(NSData *)context
 invitationHandler:(void(^)(BOOL accept,
                          MCSession *session))invitationHandler{

The problem is that some files are big e.g. 30mb and take a while. I would like to have some kind of progress tracking. Is this possible?

4

1 回答 1

1

NSProgress 与委托方法一起传递

– session:didStartReceivingResourceWithName:fromPeer:withProgress:

可用于跟踪进度,直到

– session:didFinishReceivingResourceWithName:fromPeer:atURL:withError:

叫做

于 2013-10-05T02:58:19.063 回答