I have two arrays
var questions: [Question]!
var types: [[Type]]!
I am trying to convert those two arrays to NSData. I do like below
let typesData = NSKeyedArchiver.archivedDataWithRootObject(types)
let questionsData = NSKeyedArchiver.archivedDataWithRootObject(questions)
As soon as it hits typesData, the app crashes and throws an error like following:
*** NSForwarding: warning: object 0x15e5a4100 of class '(app Name).Type' does not implement methodSignatureForSelector: -- trouble ahead Unrecognized selector -[(app Name).Type replacementObjectForKeyedArchiver:]
I am assuming it's causing an error since those arrays has custom types. Is there any way I can convert those arrays to NSData? Any solutions for solving this problem will be appreciated.