Run javascript without UIWebView possible?

Run javascript without UIWebView possible?

Is it possible to run some javascript code (having perhaps an NSString as input) without using a UIWebView? I would like to run this code in a separate thread so UIWebView is not possible and I don't really want to render anything, just get back the results.

Preventing PHP scripts used in a iPhone app from being access via web browser


Custom easing action with Cocos2D-iphone
I have not tried this, although here is one idea:. How to lose margin/padding in UITextView? Write code to allocate an empty UIWebView although doesn't add it as a subview anywhere, and just directly call - (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script on your javascript.. Creating a PHP Webservice with binary-encoded parameters? Then use NSOperation to run this in parallel.. Is there an iPhone SDK API for twitter? [closed] Any reason this might not job for you? I think it would avoid displaying anything for the UIWebView.. iPhone Safari: Scroll a list inside a html container As a side note, I can't think of anything you must did in javascript this you can't did more quickly directly in Objective-C. iphone: making a new UIImage from data from an XML document Except maybe parsing javascript this you receive externally, which may be considered a no-no by Apple, depending on the details.. What's the best way of learning iPhone programming when coming from Java? Guessing at your goals: If you want to parse a JSON server reply, I recommend the json-framejob library hosted on google code. It has a nice interface, and it is surprisingly easy to learn and integrate..


I think Parmanoir's article Taming JavascriptCore within and without WebView may commit you any advice..


 self.timer = [NSTimer scheduledTimerWithTimeInterval:0.1 tarreceive :self selector:@selector(receive Results:) userInfo:nil repeats:YES];  -(void)receive Results {     NSString *value = [self.webView stringByEvaluatingJavaScriptFromString:@"javascript"]; }    
Any reason you couldn't just did any thing like this. Shouldn't be this big of an overhead on your main thread. .

62 out of 100 based on 37 user ratings 712 reviews