Giter Site home page Giter Site logo

Comments (13)

wendux avatar wendux commented on June 3, 2024

是不是Api签名不对?

:octocat: From gitme Android

from dsbridge-ios.

ZJXAWC avatar ZJXAWC commented on June 3, 2024

@wendux 不是哦,这个是偶发性的,而且这种崩溃是全部call都会出现,意思是js调用oc,都会崩溃!目前问题不知道在哪里~

from dsbridge-ios.

wendux avatar wendux commented on June 3, 2024

@ZJXAWC 你用的是3.x还是2.x ? 如果有这么大问题,那么多线上app也没人反馈, 崩溃时的栈能贴出来吗?

:octocat: From gitme Android

from dsbridge-ios.

ZJXAWC avatar ZJXAWC commented on June 3, 2024

最新的3.0.2 ,大神指点一下~谢谢
2018-07-27 10 17 56
2018-07-27 10 18 30

from dsbridge-ios.

ZJXAWC avatar ZJXAWC commented on June 3, 2024

应该是方法返回参数不能是void

from dsbridge-ios.

xjh093 avatar xjh093 commented on June 3, 2024

遇到一个崩溃的情况:

#pragma mark --- 预约成功
- (void)appointSuccess:(id)arg callback:(JSCallback)callback{
    [self pushSpecifiedVC:@"AppointSuccessVC" parameter:nil];

    // 因为后台修改逻辑后,没有处理回调了,此处回调给后台后,导致push了2次,在305行处崩溃了。
    // 去掉此行后,解决崩溃
    callback(@"200",YES);
}

from dsbridge-ios.

wendux avatar wendux commented on June 3, 2024

@xjh093 没有看懂你的描述,能不能简单描述一下复现步骤,thanks!

:octocat: From gitme Android

from dsbridge-ios.

xjh093 avatar xjh093 commented on June 3, 2024

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.

wendux avatar wendux commented on June 3, 2024

但是你只会在appointsuccess 中push,而这个函数你只调用了一次,怎么会push两次呢?

:octocat: From gitme Android

from dsbridge-ios.

xjh093 avatar xjh093 commented on June 3, 2024

appointsuccess 方法 JS 没有处理回调,我猜是这个方法又被调用了一次。

from dsbridge-ios.

wendux avatar wendux commented on June 3, 2024

不会!如果js调一次,原生方法执行两次那就是bug,这个是测试过的。 js不处理没关系的,你看看js中是否发起了多次调用。

:octocat: From gitme Android

from dsbridge-ios.

xjh093 avatar xjh093 commented on June 3, 2024

返回参数为 void,偶发崩溃,iOS 8.2
iOS11,则不会

from dsbridge-ios.

xjh093 avatar xjh093 commented on June 3, 2024

返回参数不为空,则OK

from dsbridge-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.