0

I am transferring data from my iOS app to its Watch extension via the application context. I want to send a custom object I've created (named WeatherReport).

let context = ["report" : WeatherReport]
WCSession.defaultSession().updateApplicationContext(context)

However, I get the following error:

Value of type WeatherReport does not conform toe expected dictionary value type 'AnyObject'

I am wondering why I am unable to set my custom object as a value in the dictionary I am trying to pass as the applicationContext.

4

1 に答える 1