Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bridge prevents phonegap from loading app #25

Closed
stefankendall opened this issue Oct 7, 2012 · 4 comments
Closed

Bridge prevents phonegap from loading app #25

stefankendall opened this issue Oct 7, 2012 · 4 comments

Comments

@stefankendall
Copy link

I'm trying to add a WebViewJavascriptBridge to my existing phonegap application, but when I try to add the bridge to the webview, my application never loads past the splash screen.

I have this in didFinishLaunchingWithOptions:

WebViewJavascriptBridge* javascriptBridge = [WebViewJavascriptBridge javascriptBridgeForWebView:self.viewController.webView handler:^(id data, WVJBResponseCallback callback) {
    NSLog(@"Received message from javascript: %@", data);
}];

I see that the events get fired, but my app doesn't load. Is this is an issue, or is there something I'm missing that's breaking startup?

@marcuswestin
Copy link
Owner

I'm not sure wwjb is compatible with phone gap. If you're using phone gap already, why not use their messaging bridge?

-- while mobile

On Oct 6, 2012, at 5:37 PM, Stefan Kendall notifications@github.com wrote:

I'm trying to add a WebViewJavascriptBridge to my existing phonegap application, but when I try to add the bridge to the webview, my application never loads past the splash screen.

I have this in didFinishLaunchingWithOptions:

WebViewJavascriptBridge* javascriptBridge = [WebViewJavascriptBridge javascriptBridgeForWebView:self.viewController.webView handler:^(id data, WVJBResponseCallback callback) {
NSLog(@"Received message from javascript: %@", data);
}];
I see that the events get fired, but my app doesn't load. Is this is an issue, or is there something I'm missing that's breaking startup?


Reply to this email directly or view it on GitHub.

@stefankendall
Copy link
Author

Fair enough.

My first attempt to write an iOS plugin ended in failure, but I had some cordova settings screwed up at the time.

I'll go back to writing an iOS plugin and make things more kosher.

@marcuswestin
Copy link
Owner

Didn't mean to sound dismissive - apologies if a did.

I'm not a huge fan of phone gap. It's abstractions are too thick and extensive. All I want it a uiwebview and a way to easily pass messages bak and forth. That's what wvjb gives you.

If you need help creating a UIWebView that fills the entire viewport and loads a local HTML file, let me know.

Also, you should check out WebViewPrpxy which I built this past week. It solves an important part of iOS webview apps that even phone gap doesn't do for you well.

Cheers!

-- while mobile

On Oct 6, 2012, at 6:03 PM, Stefan Kendall notifications@github.com wrote:

Fair enough.

My first attempt to write an iOS plugin ended in failure, but I had some cordova settings screwed up at the time.

I'll go back to writing an iOS plugin and make things more kosher.


Reply to this email directly or view it on GitHub.

@marcuswestin
Copy link
Owner

@stefankendall fyi, WebViewProxy is now pretty much done: https://github.com/marcuswestin/WebViewProxy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants