-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Trouble getting this to work in a UIViewController #65
Comments
Can anyone please offer some advice on getting this to work with UIViewController? |
Could you please provide some more context about this issue so that we can |
I'm having trouble thinking of what else I can offer as far as context. I would definitely explain more if I knew what else to provide. Is it possible for you to try and use Marcus' instructions from the README inside a UIViewController. https://github.com/marcuswestin/WebViewJavascriptBridge#setup--examples-ios--osx maybe I can post some code. MyViewController.h MyViewController.m @interface MyViewController()
@implementation MyViewController
|
Hi @Theorian, I updated the repo's example iOS app to use a UIViewController. That should give you a working example to build off of. Cheers! |
Thank you so much :) |
BTW the error seems to be the way you instantiate the bridge. You're doing this, which requires a delegate and your class to implement it:
Instead, you should use the other form of instantiation that does not use a delegate, like detailed in the instruction by Marcus:
Cheers! Valerio |
I tried this from what I read in some other issues. But there seems to be no protocol defined.
@interface MyViewController : UIViewController
So I tried:
@interface MyViewController : UIViewController
this still doesn't do anything. Following your instruction worked fine from my appdelegate. but whenever I bring it over to a viewcontroller it doesn't even log any output
The text was updated successfully, but these errors were encountered: