Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

崩溃ret=action(JavascriptInterfaceObject,sel,arg); #137

Open
gwb123456 opened this issue Aug 20, 2021 · 2 comments
Open

崩溃ret=action(JavascriptInterfaceObject,sel,arg); #137

gwb123456 opened this issue Aug 20, 2021 · 2 comments

Comments

@gwb123456
Copy link

ret=action(JavascriptInterfaceObject,sel,arg);
ret会返回NSAtom
这回导致后面的if (![NSJSONSerialization isValidJSONObject:dic]) 崩溃
请问怎么处理

@foxman2
Copy link

foxman2 commented Dec 23, 2021

你是模拟器吧

@Geor9eLau
Copy link

OC API 必须符合如下签名:

同步API.

(id) handler:(id) msg

参数可以是任何类型, 但是返回值类型不能为 void。 如果不需要参数,也必须声明,声明后不使用就行。

如果同步API返回值类型为void,调用时则会导致Crash,请务必遵守签名规范。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants