Skip to content

On returning values from native code to be used in callback its going into infinite loop. #2

@ggthedev

Description

@ggthedev

Hi,
First of all thanks a lot for this library or set of files. It just eases a lot of implementation. Now coming to the issue, which i am facing, is particularly in regards to when i want to pass on the result of a native method execution to javascript callback. In principle, i assume a string of the json object is send back which is then used in the returnForCallback method of NativeBridge, but i am still facing issues cause it goes into a loop and my callback is never implemented. sample code is as follows:

  1. send a string as a argument to callback function (say "abcd").
  2. during the invocation of
    [_webviewMain stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"NativeBridge.resultForCallback(%d,%@);",callbackId,resultArrayString]]; resultArrayString has @"["abcd"]"
  3. when the callback needs to be executed in which i have to update the label in html with this string, it goes for a toss.
    Can u please help.

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