Open wenjuan5 opened 1 year ago
知道为何了,必须是 @objc func shareText( _ arg:String,completedHandler:JSCallback){ let dic = ["shareText": "112","shareUrl": "https://www.baidu.com"]
completedHandler(convertDictionaryToString(dict: dic),true)
}
arg的参数就是string,不能改为其他的
*shareText - 分享到第三方app,调起分享弹窗。 输入参数: { shareText: "分享的文案内容" , shareUrl: "分享的url", }
typealias JSCallback = (String, Bool)->Void var feedbankHandler : JSCallback? @objc func shareText( _ args:Dictionary<String, Any>){ let dic = [ "shareText": "分享的文案内容" , "shareUrl": "分享的url", ]
这种写法一直报错 shareText is not invoked ,since there is not a implementation for it