I have implemented an app that uses react-native-branch and #config-plugins/react-native-branch with the expo-managed workflow but upon building with EAS in iOS (Expo Application Services), its throwing this error:
The Swift pod `ExpoAdapterBranch` depends upon `react-native-branch`, which does not define modules.
To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries),
you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
Is there a way to do this in expo-managed workflow?
Other details of our project:
Expo SDK: v44
react-native-branch: v5.0.0
#config-plugins/react-native-branch: v1.0.2
I finally get it to build in iOS without errors by updating my react-native-branch version from 5.0.0 to 5.4.0 without any other changes to the plugin. However, expo is now giving off a warning saying that
Some dependencies are incompatible with the installed expo package version:
- react-native-branch - expected version: 5.0.0 - actual version installed: 5.4.0
If anyone has a better solution to this, I would gladly hear it. Thanks!
Related
I'm making a simple React Native library.
It has dependency on other library(react-native-device-info) that use native module.
And also i'm making a React Native project to test the library.
However, when this is executed, an error occurs saying there is no native module(react-native-device-info).
Of course i ran "pod install" in ios directory.
And if i install 'react-native-device-info' library in the project, it doesn't make the error.
So i consider to add 'react-native-device-info' library as peerDependencies, But I want developers who use my library to use it without any extra installation.
Do i need to do something on my library?
[Version]
react-native: 0.70.6
My library only has typescript files not ios and android folder.
I built the library only with tsc.
I don't think bringing RN 3rd dependencies with your library is a good idea because of possible conflicts. Imagine a situation when your lib user will previously have its own version of device-info? With peerDependencies you can control which versions are compatible with your library but with particular dependency, you have to force the user you use your version of device-info.
For example this library https://github.com/rodgomesc/vision-camera-code-scanner has a dependency to vision-camera but it doesn't bring it and only keeps it in devDependencies
Getting compilation errors with glog static library installed via pod. Using Xcode 12.3 and glog version is 0.3.5. Attaching a screenshot for the errors from Xcode build logs. [Xcode build error logs with new react native app]
Please provide solution for it.
you should try cleaning your build project in xcode then try to delete your podfile.lock then pod install, hope this helps.
I was checking latest react native blog in which they introduced doctor command for react native.
the only thing i can understand from there is do envoirnment stuff for you. ?
But i don't understand the purpose.
What is exactly purpose of doctor command in react native ?
The doctor command is available as a part of React Native 0.62.This command to help you out with getting started, troubleshooting and automatically fixing errors with your development environment. The doctor command is heavily inspired by Expo and Homebrew's own doctor command with a pinch of UI inspired by Jest.
Command
npx #react-native-community/cli doctor
This command checks your environment and displays a report of the status of react native installation. Check the output carefully for other software you might need to install. For example:-
What checks are currently supported
doctor currently supports the following checks:
Node.js (>= 8.3)
yarn (>= 1.10)
npm (>= 4)
Watchman (>= 4), used for watching changes in the filesystem when in
development mode.
Specific to the Android environment:
Android SDK (>= 26), the software runtime for Android.
Android NDK (>= 19), the native development toolkit for Android.
ANDROID_HOME, environment variable required by the Android SDK setup.
And to the iOS environment
Xcode (>= 10), IDE for developing, building and shipping iOS
applications.
CocoaPods, library dependency management tool for iOS applications.
ios-deploy (optional), library used internally by the CLI to install
applications on a physical iOS device.
Please check following link for more detail
https://facebook.github.io/react-native/blog/2019/11/18/react-native-doctor
It is similar to flutter doctor. React native doctor command will fix any issue related to react-native in your project or pc. For example if you have not installed android studio, its packages or xcode necessary for running project, it will either suggest or automatically fix issues which will save hours of headache.
I am trying to get the deviceid with react-native-device-info.
I started with an empty expo project which I ejected.
I imported the library, I also linked it.
But then I get gradle errors in android studio.
Have anyone managed to make it working. Can you tell which version you use?
Error from comments:
:ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[15.0. 1]", but isn't being resolved to that version.
Behavior exhibited by the library will be unknown.
Dependency failing: com.google.android.gms:play-services-flags:15.0.1 -> com.google.android.gms:play-services-basement#[ 15.0.1], but play-services-basement version was 16.2.0
I'm facing a issue after upgrading cordova android project to version 6.3.0 in using Camera and Geolocation plugin. These both plugin uses Permission helper class which requires cordova-plugin-compat. But with cordova android version 6.3.0 release cordova-plugin-compat is no longer supported (
https://cordova.apache.org/news/2017/09/22/plugins-release.html) as it is included in the core. But I'm getting error on resolving org.apache.cordova.PermissionHelper and in org.apache.cordova.BuildHelper . How to solve this issue.
Update cordova-plugin-compat to v1.2, which contains a restriction preventing the plugin files being deployed to cordova-android#6.3.0+:
cordova plugin rm cordova-plugin-compat --force
&& cordova plugin add cordova-plugin-compat#1.2