Closed Sadmansamee closed 8 years ago
This is covered in the docs here.
Your object is not serializable by NSJSONSerialization, and arguments passed to Meteor.call must be serializable by NSJSONSerialization. See here for more info on NSJSONSerialization.
The short answer is, pass a dictionary of your CurrentDeliveryAddress instance properties, instead of the instance itself.
Now I'm using
let jsonDictionary = try NSJSONSerialization.JSONObjectWithData(self.currentDeliveryAddress, options: []) as! NSDictionary
And
class CurrentDeliveryAddress : NSData
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -bytes only defined for abstract class. Define -[UrbanChef.CurrentDeliveryAddress bytes]!'
also tried with SwiftyJson
let swiftyJson = JSON(data: self.currentDeliveryAddress)
Same error
I'm calling a function on server , call looks likes this
and Class is like this
and Function on server side is like
when ever I'm calling this i'm getting this error "Terminating app due to uncaught exception
What could be the issue?