I have a Swift object that I exposed JavaScriptCore as follows:
@objc(MyObjectExport) protocol MyObjectExport:JSExport { var name:String {get set} var dict:[String:String] {get set} } class MyObject:NSObject,MyObjectExport { var name:String="Name" var dict:[String:String]=["test":"TEST"] }
In the context of Javascript, I can happily get and set the "name" property of an instance of MyObject, but only the dict dictionary can be entered for it.
What am I missing or is this a mistake?
source share