Incompatible with React Native Autolinking (React Native v0.60)
See original GitHub issueGoals
Use the Realm.js with React Native Autolinking correctly.
Expected Results
Don’t show warning information.
Let the CocoaPods don’t show warning after executing pod install
.
Actual Results
After the pod install
, it shows the following warning:
[!] use_native_modules! skipped the react-native dependency 'realm'. No podspec file was found.
- Check to see if there is an updated version that contains the necessary podspec file
- Contact the library maintainers or send them a PR to add a podspec. The react-native-webview podspec is a good example of a package.json driven podspec. See
https://github.com/react-native-community/react-native-webview/blob/master/react-native-webview.podspec
- If necessary, you can disable autolinking for the dependency and link it manually. See
https://github.com/react-native-community/cli/blob/master/docs/autolinking.md#how-can-i-disable-autolinking-for-unsupported-library
Steps to Reproduce
cd ${REACT_NATIVE_PROJECT_ROOT_PATH}
npm install --save realm
cd ios && pod install & cd ..
Version of Realm and Tooling
- Realm JS SDK Version:
realm-js 2.29.1
- Node or React Native:
React Native v0.60.3
- Client OS & Version:
iOS 12.2
- Which debugger for React Native:
None
Issue Analytics
- State:
- Created 4 years ago
- Reactions:35
- Comments:40 (9 by maintainers)
Top Results From Across the Web
Not compatible with RN 0.60 autolinking - react native
error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually: ...
Read more >Blog - React Native
Today we are sharing an experimental cross-platform pointer API for React Native. We'll go over motivations, how it works, and its benefits to...
Read more >react-native-community/datetimepicker - npm
React Native date & time picker component for iOS, Android and Windows. ... Autolinking is not yet implemented on Windows, ...
Read more >React native upgrade to v0.61.2 - Emad Dehnavi - Medium
Add androidx suppport; Support RN60 AutoLinking; Using CocoaPods. Release page for react-native-fs.
Read more >react-native | Yarn - Package Manager
React Native brings React's declarative UI framework to iOS and Android. ... v0.69.1. Changed. iOS specific. Make all Yoga headers public and add...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey everyone. There are already plans to fix this soon.
I’ve tried the solutions posted here, and manual linking works.
react-native.config.js
config file in the root of the project with this content:That will skip autolinking for Realm for iOS.
Add the project
RealmReact.xcodeproj
fromnode_modules
into your project as a subprojectBe sure to include
libRealmReact.a
in theLink Binary With Libraries
step of your targetBuild Phases
. Important: I’ve spent a lot of time chasing theCannot read property 'debugHosts' of undefined
bug because I was linking tolibRealm.a
and notlibRealmReact.a
, I’m sure that may happen to someone else.