NativeBridge
NativeBridge copied to clipboard
On returning values from native code to be used in callback its going into infinite loop.
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:
- send a string as a argument to callback function (say "abcd").
- during the invocation of [_webviewMain stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"NativeBridge.resultForCallback(%d,%@);",callbackId,resultArrayString]]; resultArrayString has @"["abcd"]"
- 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.