How to install react native camera without ejecting - react-native

React camera requires us to do linking, which with react native says we must cd into the ios folder and run pod install but we dont have the ios folder without ejecting the app, so why won’t the previous method using ‘react-native link react-native-camera’ work? Is there a way to make it work?

if you are using expo , then i would suggest to use expo-camera as react-native-camera wont work coz it requires linking and expo projects doesnt provide linking.
expo-camera
And if you are using bare react native project , then yes you have to link react-native-camera if you are using RN versions <0.60 , and if higher , it will be automatically be linked.
hope it helps. feel free for doubts

please follow this step which available in below link and i m sure it's working:->
https://react-native-community.github.io/react-native-camera/docs/installation

Related

Expo / React Native Reading Device Info

is there no way to read serial number using expo. I should be able to read using external packages like react-native-device-info but I can’t do this without expo? because when i install this package i get this and similar errors. I tried react-native link solution but it didn't work. I need to use expo for other reasons so I can't eject it. There is no part in expo device and constants where I can read these properties.
react-native-device-info depends on platform-specific native modules which will not link and compiled with the Expo Go client.
Expo SDK provides a compatible alternative package to use with Expo Go Client - https://docs.expo.dev/versions/latest/sdk/device/

#react-native-community/geolocation:NativeModule.RNCGeolocation is null

I'm trying to use Geolocation on my React Native app (Ios, expo). I have installed react-native-community/geolocation, and when I import it I get this erro:
#react-native-community/geolocation:NativeModule.RNCGeolocation is null.
It asks me to run "react-native link #react-native-community/geolocation" in the project root, but when I do it it says: Calling react-native link [packageName] is deprecated in favor of autolinking.
I do not know what to do anymore. Can anyone help me with this? Please
If you are using Expo, you can use the Location from Expo.
But if you want to use the #react-native-community/geolocation, since react-native 0.60 or higher the autolinking should configure the library for you automatically. But if use react-native 0.59 or lower, you must make a manual installation for iOS and Android when the react-native link doesn't work.

How to get device Id in expo react native app

I am implementing API to connect app with server. I have to use deviceId there. As mentioned in here we can use third party library 'react-native-device-info'. But when I am using it I am getting errors as attached screenshots. As per error it's saying to do linking but as I am using react version 0.62, so autolinking is there. So What can be issue? It took too much time to search it but till now I didn't get a proper solution.
react-native-device-info library wont work in Expo , since it requires linking of native modules hence the error.It will only work in pure react native apps.
You can check this by expo itself : expo-device
hopeit helps.feel free for doubts
You can use react-native-device-info even in Expo projects. You need to replace Expo Go with a custom build that has react-native-device-info library baked in.
By default, Expo Go used on Android, iPhone Emulators implies managed workflow (aka only expo-* modules are being used). However, using any pure react-native-* libraries falls under bare workflow, so you cannot use Expo Go - the error you see is from Expo Go, not your app.
Build your custom Expo app with expo-dev-client, react-native-device-info libraries included, and install that on your emulators. This needs to be done once when you add a react-native-* library.
Now continue to add code to your project that uses features from react-native-device-info.
npx expo start --dev-client and choose your emulator. Your custom build will be launched and you can make live changes as always like in Expo Go.
Do check out the section on Development Builds from Expo. Needless to say, I have successfully used react-native-device-info on my Expo project, because expo-device cannot provide what I needed.

Using Exp development workflow with a pure react-native application

Might be a duplicate, didn't find one tho.
I started a new application with the react-native-cli.
I want to use expo for development purpose:
Running on devices through Expo.
Publishing through Expo.
Is such a thing possible?
Copy pasting your 2 questions in Google and the first result...
1.
https://docs.expo.io/versions/latest/guides/testing-on-devices/
2.
https://docs.expo.io/versions/latest/workflow/publishing/
any questions left???
No, its not possible, in the docs its explicitly mentioned you can choose either the expo path or bare react native path. And if you choose expo you can eject from it to pure react native but cant go vice versa because the expo wrapper cant be implemented on the bare app.
so you have to again build an app with expo-cli to use expo publishing facilities etc.
but if you want to use expo modules in bare react native app you can do by using react-native-unimodules .
rn-unimodules
hope it helps. feel free for doubts
If anyone is ever looking for the answer it is stated here:
https://docs.expo.io/versions/v35.0.0/introduction/managed-vs-bare/#bare-workflow
It clearly states that in "bare" workflow you cant use the build services of Expo.

Why is that we cannot install native libraries on Expo? (that requires linking)

I am a newbie and learned react-native expo. I am curious why we can't use any native library with Expo.
For example, if I want to use filesystem on expo I just cant use it, I know expo has it's own file system but I want to use another library but that library requires linking so it is not working in expo. Why is that?
I have tried everything.
This is the library that I want to use ==> https://github.com/itinance/react-native-fs
It requires command : react-native link react-native-fs
How do I do it?
You first have to understand the difference between react-native cli & expo
Please read this documentation to understand the difference
React Native expo uses their own servers to compile your javascript into java and return APK file as a complete APP, and that is the reason you do not need android SDKs or android studio environment on your PC when you are using expo
but when you are using react-native cli you do need the android studio environment such as SDKs, because when you are using cli , it compiles the code using that android studio sdk/environment that you made in your PC that is why you do not need a third party server like expo do.
and thats the reason you get android files right in your react-native project and due to which you can add native modules to it.
However you also have the option to use expo-eject, You can read more about expo-eject in this documentation
Thank You!, Have a great day & welcome to stackoverflow community!.