I can't figure out why the below code is not working :
import Foundation
import SpriteKit
var TestVector: CGVector = CGVector(dx: 1, dy: 1)
var Data: Dictionary<String, Any> = ["abc":CGPoint(x: 0, y: 0), "def":1, "ghi":"Try", "jkl":TestVector]
let DataConverted: Data = NSKeyedArchiver.archivedData(withRootObject: Data)
let DataReceived: Dictionary = (NSKeyedUnarchiver.unarchiveObject(with: DataConverted) as! [String : Any])
Error throws is : error: Execution was interrupted, reason: signal SIGABRT. The process has been left at the point where it was interrupted, use "thread return -x" to return to the state before expression evaluation.
Everything is working fine for a lot of different types of data (String, Int, Double,...) but it is not working for vectors
Are there limitations in the type of data that can be archived via NSKeyedArchiver ?
Thx
J.
Additional info : this is to be used in a MultipeerConnectivy data transfer