Cannot decode object of class
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to send a "Class" to my Watchkit extension but I get this error. * Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: '* -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (MyApp.Person) Archiving and unarchiving works fine on the iOS App but not while communicating with the watchkit extension. What's wrong? InterfaceController.swift let userInfo = ["method":"getData"] WKInterfaceController.openParentApplication(userInfo, reply: { (userInfo:[NSObject : AnyObject]!, error