build archive fails but build from react-native run-ios works - react-native

my react-native project builds and run from npx react-native run-ios and also it runs from xcode. now i am almost done with what i want to do and wanted to publish a version for test flight on app store but i cant archive the product which is how i used to do before. it fails right away with some swift error. in this work i added a dummy swift file and xcode also added bridge file as part of it. here is the error i get:

Been there,
make sure all the three pod, project and target have the same IOS Deployment Target.

Related

Not going to release apk after expo eject

I created a new project at Expo, after which I was already building it using expo buildbut over time I needed to move away from Expo a little and execute an expo eject, and then continue development on regular React Native.
I ran into the following situation: I am trying to build an apk file with the ./gradlew assembleRelease command, but I get a debug build instead of release, I don’t understand why this is happening, I tried to follow the build instructions specifically for the release version - unsuccessfully.
I also tried to create a new project without using Expo - the whole scenario described above worked correctly and I got a release build of my application, and with all that, I compared the android/app/build.gradle files in these two projects and they are almost identical in terms of their configuration.
My main task and problem is to build the release version of the apk file and understand why, with different attempts to build, I only get the debug apk.

RNTMap was not found in the UIManager

I am following along the official documentation, copy and pasting the code provided there:
https://facebook.github.io/react-native/docs/0.56/native-components-ios
But I am still running into this error
does anyone know what the docs are missing to get this working?
This is happens because native module not compiled yet, simply execute react-native run-ios in terminal while in project directory.
Note: For latest node version use: npx react-native run-ios
RNTMapManager.m must be created within the XCode project, the docs do not specify that. Open the XCode project and click File -> New -> File and create a new Cocoa Touch Class called "RNTMapManager". Then place the objective-c code within RNTMapManager.m. Rebuild the application and it should work!
To be able to use native components make sure your project was ejected (expo eject)
Once ejected open for example iOS project with XCode and create/add file from Xcode. This way it will update all the dependencies.
Rebuild the project

Integrate viro-react into react-native project

Anyone here managed to integrate viro-react into react-native project? I followed the instruction in
the documentation
After that, I executed the project but not able to run.
This is the error that I got
Even though I run with gradlew installOvrDebug, still it failed.
If your configurations are correct then try running with any of these variants
ArDebug, GvrDebug or OvrDebug
Example running apllication with Augmented Reality:
Android
react-native run-android --variant=ArDebug
iOS
react-native run-ios --variant=ArDebug
I solved this problem with the following method:
Go to the Navigate to the node_modules/react-native/local-cli/runAndroid/runAndroid.js file and edit the lines that include installDebug change it to installArDebug
Go to the terminal and npm start
Open another terminal and react-native run-android
*Make sure that your device is plugged in and that you have android studio sdk paths in your environment variables. This should do the trick!

Do we need to merge node module folder in production environment for react-native app?

Do we need to merge node module folder when code goes to production Do we need to merge node module folder in production for react-native app for react-native app.
If yes then why we need this folder and if no how can we ignore the folder.
No need to manually merge something (e.g. node_modules) to the final app.
You can, of course, use Android Studio or XCode to build the release version, but using below commands to package the apps will be much more handy:
//Build release version
react-native run-android --variant=release
react-native run-ios --configuration Release
Reference:
https://facebook.github.io/react-native/docs/running-on-device.html

In react-native, run minified code with debugging

I have an odd issue where I get the desired behavior when running a dev build but not a release one. I want to debug the code, but as far as I know I can't do that when running --configuration Release. I want to check if the issue has to do with minifying the js or something else. Is there a way to run
react-native run-ios --minify
or something? (The above command doesn't work. error: unknown option '--minify')
I've seen that you can run react-native bundle --minify, but I don't know how to then get the bundle onto the iOS Simulator, nor if bundle is the correct way to do things in React Native v0.42, as all the bundle solutions I've seen online have been v0.15ish.