Last active
June 20, 2018 09:31
-
-
Save simform-solutions/0877e1ebad13f568454f464faf404868 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sceneView.session.getCurrentWorldMap { worldMap, error in | |
guard let map = worldMap | |
else { print("Error: \(error!.localizedDescription)"); return } | |
guard let data = try? NSKeyedArchiver.archivedData(withRootObject: map, requiringSecureCoding: true) | |
else { fatalError("can't encode map") } | |
self.multipeerSession.sendToAllPeers(data) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment