-
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
Integrating to C++ project #81
Comments
Hey @Noxalus, Thanks for taking the time to try and write in with your problems. Sorry that WVJB is not working out as easily for you as it should be. I have little experience working with cpp in objc projects, but let's start tackling this together and see where we get. Here are some clarifications and some questions.
Cheers, |
Thank you very much for your answer! For WVJB_WEBVIEW_TYPE, it's UIWebView for iOS but this type is defined in UIKit.h right ? You import WebKit.h OSX side, why don't you do the same thing for iOS ? For typeof and strongDelegate, it's not warnings but errors. Xcode says that they are undeclared. To answer to you, yes, I use Xcode 5 but the C++ project on which I work is a big framework that should compile on a lot of plateforms, including iOS. So I just can't create an Xcode project and import the C++ code into it. Thanks again. EDIT: Also, the iOS example available on the repository works pretty well, the problem really seems to be about the C++ integration. |
I post a new message to notice you that I think I resolved the problem. Finally, I start reading your code and I find out that all errors that I had were just after this section of the code: /* Platform specific internals: OSX
**********************************/
#elif defined WVJB_PLATFORM_IOS I've check if it was the same thing on the main branch, but it's not. It's WVJB_PLATFORM_OSX instead of WVJB_PLATFORM_IOS so I made the change and it compile well. This error is still into the 4.1.0 release. Thanks for your help and sorry to ask my question before to read the entire code. Have a nice day. |
Ok, sorry again, It seems that I checked a little bit to quick... There is already an So to return to the initial problem here are the errors that I encounter: Like I said before it's about typeof and strongDelegate but strongDelegate is a variable defined using typeof so I think that the problem is only related to typeof keyword. EDIT: I confirme that, if I replace all typeof by the type of _webViewDelegate (I put id), I can compile without error. But I don't know if it's the right way... |
Hey, I finally patched this up in 5f10f81. Please let me know if it didn't fix your problem. Cheers, and thanks again! |
hi, i have used unity3d 4.6.2 with Xcode 6.1.1 and she import your code in Xcode i have a error: webViewDidStartLoad you have any idea?
|
Hello,
First, I would like to say that I'm new to objective-C world so I'm sorry if my question is too lame...
I'm currently trying to integrate this bridge into my C++ project and I have some issues targeting an iOS device.
What I've done is simple, I've just put the WebViewJavascriptBridge.* files to my project and compiled it with -x and objective-c++ flags.
On WebViewJavascriptBridge.h, I have a lot of semantic issue with WVJB_WEBVIEW_TYPE but after a quick search I found that adding the import of UIKit is enough to remove these errors.
But know, I have 12 semantic issues into WebViewJavascriptBridge.m with typeof and strongDelegate and I don't know how to fix that.
Do you have any idea of what can be the origin of these issues ? Did I do something wrong ?
Thanks in advance for your answer.
The text was updated successfully, but these errors were encountered: