Important facts about commercial licenses

  • Licenses are perpetual. They do not expire and do not need to be renewed.
  • Licenses can be upgraded. You can upgrade to a more expensive license later paying only the difference in cost.
  • Pay attention to the distribution type - Hosted (sites / servers), binary (applications) or source (includes all the others). Choose according to your needs (more below).
  • All licenses allow commercial use unless otherwise indicated.
  • Read the full license by clicking on the icon.
  • Read more about licenses in our handy license guide.
Free

BSD license

The BSD license is an
open-source license.
You need to log-in or create an account
  • Create an account
  • Log-in
  • Please use your real name.
  • Account activation link will be sent to this address.
  • Minimum 8 characters

Clicking this button confirms you read and agreed to the terms of use and privacy policy.

(3 ratings)

Javascript to Cocoa bridge for iOS

Javascript to Cocoa bridge for iOS
Developed by ChaoShen, Released Jul 5, 2012

A lightweight javascript bridge to cocoa

Objective-C

Tags: bridge , javascript , native , phonegap

TGJSBridge is a lightweight javascript bridge to cocoa. TGJSBridge is iOS4 and iPad compatible.

Github

https://github.com/ohsc/TGJSBridge

Usage in objective-c

Init jsBridge

TGJSBridge *jsBridge = [TGJSBridge jsBridgeWithDelegate: webViewDelegate];
webView.delegate = jsBridge;

Send notification to javascript

postNotificationName:userInfo:toWebView:

Listen notification from javascript

- (void)jsBridge:(TGJSBridge *)bridge didReceivedNotificationName:(NSString *)name userInfo:(NSDictionary *)userInfo fromWebView:(UIWebView *)webview

Usage in webview

Send notification to cocoa

jsBridge.postNotification(msgName,userInfo);

Listen notification from cocoa

jsBridge.bind(msgName, function(userInfo){
    ...
});

Cancel listening notification from cocoa

jsBridge.unbind('test',callbackHandler);
View all 1 reviews »

User Reviews

  • 1 of 1 people found this review helpful M Profiet 10 months ago
    Very nice, it helps that it is FREE :)
    Flag
    Was this helpful? Yes No
Read all 4 comments »

Questions & Comments


Or enter your name and Email
You must be logged-in to vote. Log-in to your account or register now.