崩溃ret=action(JavascriptInterfaceObject,sel,arg);
gwb123456 opened this issue · comments
gwb123456 commented
ret=action(JavascriptInterfaceObject,sel,arg);
ret会返回NSAtom
这回导致后面的if (![NSJSONSerialization isValidJSONObject:dic]) 崩溃
请问怎么处理
xiaomin.liu commented
你是模拟器吧
Geor9eLau commented
OC API 必须符合如下签名:
同步API.
(id) handler:(id) msg
参数可以是任何类型, 但是返回值类型不能为 void。 如果不需要参数,也必须声明,声明后不使用就行。
如果同步API返回值类型为void,调用时则会导致Crash,请务必遵守签名规范。