I have a Swift object that I'm exposing to JavaScriptCore like this:
@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 Javascript context I can happily get and set the 'name' property of a MyObject instance, but can only get, not set, the 'dict' dictionary items.
What am I missing, or is this a bug?
NSMutableDictionary
as a replacement. – GendarmerieNSMutableDictionary
instead makes no difference – Patrinapatriot