React Native and Mediapipe ios framework compatible - react-native

I created a MediaPipe ios framework
And I'm trying to integrate it into a React Native project
But the app crash in Mutex::Lock() without any information
I believe the reason is my framework and RN both use glog
How can I disable glog for one of them ? or any idea to fix it
Thanks for reading
Xcode Output

I ran into a similar situation, Mutex loc() is associated with Metro Bundler dependency. Try doing npx react-native start this will start the Metro Bundler before you do npx react-native run-ios

Related

React Native developing on Windows for Android and ios

i'm little bit confused about the installation of COCOAPODS and the installation gydes for react-native libaries.
If I developing on Windows for iOS and Android. Do I have installing the COCOAPODS?
And what about this: https://reactnavigation.org/docs/getting-started/
Do i have run the following command: npx pod-install ios
Or is this only if I developing on Mac?
Thanks for all replies.
Cocoapods is only needed when developing for iOS. You do not need to run npx pod-install ios when developing for Android. Android has its own methods for linking libraries.
While you can use Cocoapods on Windows (see here), again, it's only for when you are developing for iOS.

Metro Bundler not running: After upgrading react native version

I have upgraded my app from React Native version 0.57 to 0.60.0 but after executing react-native run-android, the configurations in gradle executes successfully, but metro bundler isn't launched. And app crashes immediately after that.
You should try to use:
react-native upgrade --legacy=true
Beware that it will ask if you want to replace current android/ios files for new ones and then it will rebuild them.
Also, you need to check if your old dependencies are available on autolink, and if not you can try to link them.

i successfully done my app and testing in expo. now how to install in real physical device?

i have successfully made and tested the application in expo. but i don't know how to install in physical device and i want to deploy it also. please help me.
while using react-native run-android showing this error.👇👇👇
Android project not found. Maybe run react-native android first?
If you are using expo, you should not have to make the build as a react native project. You can check in the following link the documentation in expo about how to build in Andrdoid/ios and get the apk/ipa:
https://docs.expo.io/versions/latest/distribution/building-standalone-apps/
In a summary, if you have the app.json correctly configured, you just have to run:
expo build:android
Hope it helps

What are the difference between these React Native start commands?

I have been using react native for a couple months now. However, I really don't know the difference between the starting commands. Currently, I use npm on my project. However, I know yarn can be used. These are the commands I really don't understand the difference with:
exp start, exp ios, exp android
react-native run-ios, react-native run-android
npm start, npm ios, npm android
Which ones are better in what cases and why? Currently, I am using exp but others use react-native run-ios. I used to use npm ios.
Thank you in advance.
It might help to have an overview of the React Native architecture.
In react native, when you write, say, <View/>, it gets sent across the bridge to the native code and dynamically translated into UIView on iOS or android.view.View on Android. Every basic component in the react-native package has been implemented this way. If you want additional native functionality on both platforms, say a library which uses native map components, you will end up having to include the native libraries separately into your Android build.gradle and your iOS .xcodeproj.
The exp CLI is used to start apps built with the Expo SDK. Expo is essentially a prebuilt app with a certain set of native components already included for convenience; all you supply is your JSX; thus the recommendation to "eject" to a regular react native app if you need to use any other libraries.
react-native run-ios and run-android builds the native .app or .apk using the iOS or Android toolchains, starts the Metro Bundler, which minifies and serves the JSX and other assets such as images over to your device in debug mode (You might see something like Loading from localhost:8081).
On Android, it starts the adb server to push the APK with all the native libraries included onto your device, if you have USB debugging enabled. run-ios does the same with the .app; if you install to a simulator it has automatically configured AppDelegate.m to communicate with localhost:8081, whereas live reload over USB has to be configured manually on a physical device.
react-native start simply starts the Metro bundler, which is useful if you already have the app installed.
Commands that begin with npm are defined as scripts in your package.json file. As of RN 0.57, npm start simply calls node node_modules/react-native/local-cli/cli.js start; which is the same as running react-native start; according to the docs react-native-cli installed separately will call the locally installed version of the CLI in node_modules.

Can we user razorpay plugin with reactnative and expo

In plugin they mentioned that the razorpay is not going to work with expo. i want to acces razorpay plugin in my react native app. is there any way..? i am using expo. please help me
if the react native library you want requires a linking step, then you can detach and use ExpoKit directly.
https://docs.expo.io/versions/latest/guides/detach.html
EAS builds officially released in Expo SDK 42 makes it possible to run native modules on expo projects.
In order to make sure Razorpay wrapper works correctly:
Create a dev build of your expo app by following the instructions mentioned here.
run your project by running the following command
For ios
expo run:ios
For android
expo run:android