-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[RN 0.40] Update iOS header imports and JS SyntheticEvent import for RN 0.40 #923
Conversation
"react-native": "^0.35.0", | ||
"react-native-maps": "../" | ||
"react": "~15.4.1", | ||
"react-native": "^0.40.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.40 hasn't been published yet so this doesn't actually work yet but it will soon (I tested with github:facebook/react-native#0.40-stable
)
f47a8f6
to
ce1bf8b
Compare
Any plans to merge this one soon? |
"react-native-maps": "../" | ||
"react": "~15.4.1", | ||
"react-native": "^0.40.0", | ||
"react-native-maps": "path:../" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you using a version of npm that supports this syntax? I get this error:
npm ERR! Unsupported URL Type: path:../
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I switched this to "file:", verified this works with npm 3 and 4
I'd like to @jpgarcia ... were you able to get the example app to compile? I'm having two problems, see my comments above. |
didn't try it yet, maybe @ide can give us some insights |
There might be a problem with the upstream podspec, I'm getting compiler errors inside of RN's source code. |
…RN 0.40 React Native 0.40 (coming soon) changes the way its iOS headers should be imported. The headers are now under a directory called "React" that is in the compiler's include path, hence the new import style. On the JS side, RN 0.40 now peer-depends on React 15.4.x which moved SyntheticEvent from `react/lib` to deep inside `react-native`, so update that import as well. Test Plan: Follow the setup instructions (https://github.com/airbnb/react-native-maps/blob/master/docs/examples-setup.md) and run the explorer app (notably verify that it compiles).
The problem is that the React podspec doesn't support frameworks. I'll push a working frameworkless Podfile in a separate commit so you can try it out. |
Tested it with Google Maps support.
I pushed a new Podfile and verified the example project works with CocoaPods 1.1.1 and Xcode 8.2. When you run |
Are you running in a clean checkout? I'd try git clean -dfx, also run watchman watch-del-all to remove more possible cruft. |
Same thing :-/ ... @spikebrehm wanna give it a go? |
Maybe you need to clear the RN packager cache too with git clean -dfx
cd example
yarn # npm install should be fine too though
pod install # see a bunch of yellow warnings, but the workspace gets set up fine
watchman watch-del-all
npm start -- --reset-cache # just to be sure the packager cache isn't bad
open AirMapsExplorer.xcworkspace
# run iOS app on iPhone 7 simulator |
I tested locally and it works great 👍 |
+1 Tested locally and it's now working. Currently, the latest release version of react-native-maps doesn't work with the latest version of react-native despite the project page saying "Due to the rapid changes being made in the React Native ecosystem, we are not officially going to support this module on anything but the latest version of React Native." Suggesting approving this PR or amending the project page for the time being if that's quicker. |
@codesidekick This PR has been merged, npm installing from |
Released as v0.13.0 |
Related issue (in publishing version): |
React Native 0.40 (coming soon) changes the way its iOS headers should be imported. The headers are now under a directory called "React" that is in the compiler's include path, hence the new import style.
On the JS side, RN 0.40 now peer-depends on React 15.4.x which moved SyntheticEvent from
react/lib
to deep insidereact-native
, so update that import as well.Test Plan: Follow the setup instructions (https://github.com/airbnb/react-native-maps/blob/master/docs/examples-setup.md) and run the iOS explorer app (notably verify that it compiles). Here it is running, nothing special, it just works as expected: