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

WebViewExManager.NavigationType error when starting project #6

Closed
KevinGrandon opened this issue Jun 30, 2015 · 9 comments
Closed

WebViewExManager.NavigationType error when starting project #6

KevinGrandon opened this issue Jun 30, 2015 · 9 comments

Comments

@KevinGrandon
Copy link
Contributor

Hi @alinz - I'm seeing some errors when trying to use this project, and I was wondering if you had any ideas.

2015-06-30 14:19:56.194 [error][tid:com.facebook.React.JavaScript] "Error: undefined is not an object (evaluating 'WebViewExManager.NavigationType')
stack:
index.ios.bundle:43155
require index.ios.bundle:244
index.ios.bundle:42219
require index.ios.bundle:244
index.ios.bundle:1110
require index.ios.bundle:244
applyWithGuard index.ios.bundle:880
require index.ios.bundle:195
index.ios.bundle:43383
URL: http://localhost:8081/index.ios.bundle
line: 43155

message: undefined is not an object (evaluating 'WebViewExManager.NavigationType')"
2015-06-30 14:19:56.245 [info][tid:com.facebook.React.JavaScript] "Running application "MyApp" with appParams: {"rootTag":1,"initialProps":{}}. DEV === true, development-level warning are ON, performance optimizations are OFF"

@alinz
Copy link
Owner

alinz commented Jun 30, 2015

couple of things,

  • Have you added objecttiv-c folder into the project as instructed in readme file?
  • if you are sending a message from webview to react-native, as soon as you get a message you have to register your callback again similar to issue [React native webView bridge] -  #3
  • would you provide react-native version and node version that you are using?
  • how would I replicate this issue. Right now I'm using this library at one of my project and so far I have no issue with that.

Let me know

@KevinGrandon
Copy link
Contributor Author

Have you added objecttiv-c folder into the project as instructed in readme file?

Yes.

if you are sending a message from webview to react-native, as soon as you get a message you have to register your callback again similar to issue #3

I don't think this is the issue, a I get this issue only from including react-native-webview-bridge (without sending messages yet). I am doing so by running common js modules in babel.

import WebViewBridge from 'react-native-webview-bridge';

would you provide react-native version and node version that you are using?

node: 0.12.4
react-native: 0.6.0

@KevinGrandon
Copy link
Contributor Author

As an update: it seems adding all of the individual files (instead of folder) seems to get me a bit further. I recommend updating the documentation, or probably packaging these files into a bundle?

@alinz
Copy link
Owner

alinz commented Jul 2, 2015

Thanks for helping me out. I've been busy with stuff. By tomorrow I should be ready to read everything and get back to github.
Again thank you,

@AlexJWayne
Copy link

Getting this too. Not sure why but it apears that var require('NativeModules') does not return the WebViewExManager key. So React Native isn't finding the module for export somehow?

@AlexJWayne
Copy link

Yeah so I'm not enough of an XCode wizard to know what's really going on, but I did get it to work if I manually added all the WebViewEx*.m files to the "Compile Sources" in "Build Phases". though it's a bit weird as those files are now double referenced in my project tree.

@alinz
Copy link
Owner

alinz commented Jul 4, 2015

I think I need to make it as a bundle project. I will get back to you. But for now, keep working with this hack solution until I get everything sorted.

btw, thanks for reporting.

@alinz
Copy link
Owner

alinz commented Jul 8, 2015

Ok, I push new version and I cleaned up some part of the code. It should be good for version 0.6 and above.

I have also changed the version number matched with react-native. In this way it would be a lot easier for everyone to load only specific version.

@alinz
Copy link
Owner

alinz commented Jul 14, 2015

@Squeegy as of 0.6, you should not use require('NativeModules') directly. You have to use:

var React = require('react-native');
var {
  NativeModules: {
    WebViewExManager
  }
} = React

I have also made new version with a new technique which can mostly solve all these problem. Take a look at it and let me know if you still have that problem.

@alinz alinz closed this as completed Jul 14, 2015
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

3 participants