cordova - Weird bug with phonegap ios -
i writing iphone application using phonegap , ios. have weird problem. have nsstring
holds json string in objective c plugin class. , call callback function provided running phonegap.exec
, callback neither success or failure gets called. here code:
pluginresult* pluginresult = [pluginresult resultwithstatus: pgcommandstatus_ok messageasstring: jsonstring ]; [self writejavascript:[pluginresult tosuccesscallbackstring:self.callbackid]];
my success callback alerts argument passed. weird thing that, if pass in non jsonstring example replacing jsonstring
regular message, @"hello-word"
works, , success callback gets called , argument gets alerted. have idea going on?
the problem had literal quote in jsonstring, jsonstring hardcoded. instead of doing this, used messageasdictionary appropriate mapped values, , still interpret data recieved javascript json object.
Comments
Post a Comment