Post

Replies

Boosts

Views

Activity

Comment on Fragment large size data sent and received using NSKeyedArchiver.archivedData in GameCenter
Just tried to use JSONSerialization: func sendData(dictionaryWithData dictionary: Dictionary<String, Any>, toPeer targetPeers: [MCPeerID]) { do { let dataToSend = try JSONSerialization.data(withJSONObject: dictionary) try session.send(dataToSend, toPeers: targetPeers, with: MCSessionSendDataMode.reliable) } catch { } } Getting an error: 'Invalid type in JSON write (MCPeerID)'
Jul ’24