Skip to content

求助 swift js 调原生,异步有传参和回调,点击报错[__NSCFString count] #152

@wenjuan5

Description

@wenjuan5

*shareText - 分享到第三方app,调起分享弹窗。
输入参数:
{
shareText: "分享的文案内容" ,
shareUrl: "分享的url",
}

 返回值
 {
     "code":"0:成功,-1:失败",
     "msg":"msg"
 }

typealias JSCallback = (String, Bool)->Void
var feedbankHandler : JSCallback?
@objc func shareText( _ args:Dictionary<String, Any>){
let dic = [
"shareText": "分享的文案内容" ,
"shareUrl": "分享的url",
]

   feedbankHandler!(convertDictionaryToString(dict: dic),true)
    //convertDictionaryToString字典转json字符串
}

这种写法一直报错 shareText is not invoked ,since there is not a implementation for it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions