Comments (13)
是不是Api签名不对?
from dsbridge-ios.
@wendux 不是哦,这个是偶发性的,而且这种崩溃是全部call都会出现,意思是js调用oc,都会崩溃!目前问题不知道在哪里~
from dsbridge-ios.
@ZJXAWC 你用的是3.x还是2.x ? 如果有这么大问题,那么多线上app也没人反馈, 崩溃时的栈能贴出来吗?
from dsbridge-ios.
from dsbridge-ios.
应该是方法返回参数不能是void
from dsbridge-ios.
遇到一个崩溃的情况:
#pragma mark --- 预约成功
- (void)appointSuccess:(id)arg callback:(JSCallback)callback{
[self pushSpecifiedVC:@"AppointSuccessVC" parameter:nil];
// 因为后台修改逻辑后,没有处理回调了,此处回调给后台后,导致push了2次,在305行处崩溃了。
// 去掉此行后,解决崩溃
callback(@"200",YES);
}
from dsbridge-ios.
@xjh093 没有看懂你的描述,能不能简单描述一下复现步骤,thanks!
from dsbridge-ios.
JS代码是这样的:
last () {
this.call('submitCarInfo', this.params, (res) =>) {
if (res == 200) {
this.call('appointSuccess',{},(res) => {})
}
}
}
JS 先调用方法:submitCarInfo
客户端回调一个:200
JS 再调用方法:appointSuccess
客户端处理页面跳转,最后回调一个:200
发现页面转跳,push了2次,导致崩溃了。
客户端处理是,最后不回调了,就OK!
from dsbridge-ios.
但是你只会在appointsuccess 中push,而这个函数你只调用了一次,怎么会push两次呢?
from dsbridge-ios.
appointsuccess 方法 JS 没有处理回调,我猜是这个方法又被调用了一次。
from dsbridge-ios.
不会!如果js调一次,原生方法执行两次那就是bug,这个是测试过的。 js不处理没关系的,你看看js中是否发起了多次调用。
from dsbridge-ios.
返回参数为 void,偶发崩溃,iOS 8.2
iOS11,则不会
from dsbridge-ios.
返回参数不为空,则OK
from dsbridge-ios.
Related Issues (20)
- 原生异步函数如何支持重载?
- 获取网络数据后给前端传值不显示
- 崩溃ret=action(JavascriptInterfaceObject,sel,arg); HOT 2
- 使用dsBridge.call("name", "msg") msg 内容超过一定长度会被截断问题
- 使用 UIWindowSceneDelegate 的情况下,会导致奔溃(crash)
- addJavascriptObject方法添加的函数异步执行问题。 HOT 1
- 我已经重新设计了新的交互库,10分钟就能完成接入,也许可以帮助你. HOT 1
- I have redesigned new libraries, It only takes ten minutes to complete . Maybe can help you.
- 通过dsbridge.call调用,iOS端接收到的信息不正确
- 请问 dsuiDelegate 与 requestMediaCapturePermissionFor 代理实现 HOT 2
- oc 调用 js 只能传数组么?
- [ios]When webview video on full screen, js call native dsbridge will exit the fullscreen
- 新版xcode namespace命名与系统关键字冲突了
- 求助 swift js 调原生,异步有传参和回调,点击报错[__NSCFString count] HOT 1
- completionHandler
- 高频调用时会丢包 HOT 1
- 加载网页资源loadrequest,添加javascript无法响应 HOT 5
- 你好,希望添加对 Swift packages 的支持
- Xcode 15 打包,dsbridge失效 HOT 1
- 老铁们,DSBridge-HarmonyOS 版本来了
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dsbridge-ios.