Closed cflorion closed 10 years ago
Hmm... I just noticed my pull request failed. It says "Not all contributors have signed the Contributor License Agreement". I just agreed, but this message still appears. Do I have to do another pull request ?
No, I got it. I'm reworking it a little before adding to the master.
Another try. All the MultipeerConnectivity code is now in MyMultipeerImplementation file which is not part of Ensembles (the developers will have their own implementation).
CDEMultipeerCloudFileSystem now has 3 public methods:
- (BOOL)synchronizeFilesViaMultipeerSession:(MCSession *)session withSpecificPeers:(NSArray *)specificPeers;
-> it just sends other peers what it has locally. In my implentation is send data at each saves, but it be called on a UI action or a timer.- (void)handleMessageData:(NSData *)data fromPeer:(MCPeerID *)peerID inSession:(MCSession *)session;
-> MyMultipeerImplementation calls this method when it receives data (a message, not the actual files)- (void)importArchiveAtURL:(NSURL *)archiveURL archiveName:(NSString *)archiveName;
-> -> MyMultipeerImplementation calls this method when it receives a file (the archive with the actual files)