Skip to content

Instantly share code, notes, and snippets.

@simform-solutions
Last active June 20, 2018 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simform-solutions/0877e1ebad13f568454f464faf404868 to your computer and use it in GitHub Desktop.
Save simform-solutions/0877e1ebad13f568454f464faf404868 to your computer and use it in GitHub Desktop.
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