how to get a `.ipa` file from create-react-native-app? - react-native

I use create-react-native-app, and I wonder how I can get a .ipa file to run in my iPhone from it? I see the command npm run eject, but I do not know what to do next. And for some reason, I cannot use exp in the command line.
Is there a detail instructions to solve my problem? thanks

npm run eject will not create a IPA file for you. It will just create project files for iOS and Android which you can run on their respective IDE's. i.e Xcode and Android Studio.
Here is a good document which you can use to build iOS without ejecting it : https://docs.expo.io/versions/latest/guides/building-standalone-apps.html
If you choose to eject then, open Xcode project from the iOS folder -> change the bundle id. and follow along this https://wiki.genexus.com/commwiki/servlet/wiki?34616,HowTo%3A+Create+an+.ipa+file+from+XCode,

I xcode:
Change scheme destination to generic ios device
Go to Product - Archive
Go to Window - Organizer
Select the archive you want, click export
There you should be able to choose method and destination.

Related

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

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.

compile apk on a folder "Android" already created previously in react-native

I'm new to react-native, I've seen tutorials but everyone uses expo. I downloaded this project where they don't use expo. I want to compile this application for android, to finally get an .apk
This application already has a folder called "Android" but inside it does not have its respective .apk. How can I generate it?
this is the repository:
https://github.com/zsajjad/BusinessCard
It would be great if you can attach screenshots of how I should do it
Note. I have the latest version of android studio and I don't see the option of "build"
commands like "gradlew" from the console, they don't work, it's as if I didn't have that command installed
Following instructions for build apk using android studio
Hope you installed node and react native on your machine. If not
please follow the link to install it.Install node and react native
open your command prompt or terminal and redirect to your download project - cd /Businesscard Master (change it according to your project location)
Now enter - npm install
Enter - react-native link
Follow the android related linking instructions on following link react native camera
Hope you know about android camera and storage permissions.
same thing for react native text detector. Because your downloaded project have that packages in package.json
Now open your project android folder in android studio using open existing android project.
Then select build your project from android studio build menu and run it also
Generate apk using build menu- same process you have to follow for native android project
You don't need to use the CLI, that's needlessly complicated and it obscures what Android Studio is actually doing. Here's all you need to do.
Open the whole /Android/ folder in Android Studio. This is your "project" similar to how you open a *.xed file in XCode. Except in Android Studio, you just open up the whole folder to get the build.
Android Studio will now prepare your project using Gradle. If there are any errors in the preparation it will tell you about them. Assuming your gradle and Android Studio versions are compatible and you got no errors, you're now ready to emulate, debug and create a production build. At this point the workflow is similar to using XCode. You'll see emulators under Tools -> AVD Manager.
In the file menus go to Build->Generate APK. You can choose between signed APKs, debug APKs and so on. You'll need the key file if you're signing the APK on your computer, otherwise there's also Google Play signing after you upload the APK.
TL;DR: Just open your /Android/ folder in Android Studio.
Side note: When Android Studio gives you popups to upgrade stuff don't do it. NEVER upgrade Gradle or Android Studio unless the RN / Expo team specifically ask you. This will break your whole project and you will need to rebuild the platform.

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

How to add an app icon to a react-native project without using any npm packages or 3rd party libraries? Is it even possible to do so?

I am trying to add an app icon to a react-native application and am not able to do so also could hardly find anything about this in the documentation or any other sources which I am able to implement successfully.
Got this one working by using react-native-icon Package but is there Something like a single command to get icons configured into the respective folders when they are created using react-native eject command.
The app icons are controlled from the native side of the project.
You can set them up from Xcode or Android Studio fairly easily.
Perhaps take a look at Xcode 9 - Add an App Store icon and Set icon for Android application
use android asset studio
drag and drop your icon and change filters if you like and then download it.
Unzip it and then replace your res icon folder with this one
indepth tut tutorial

does not create xcode project file in react-native

When I run create-react-native-app AwesomeProject, no XCode project gets generated.
Just this files created :
It's a normal result. create-react-native-app is not supposed to create ios and android folders. It is to be used with Expo client.
If you want to have Xcode files, use react-native-cli:
On the top of this page, click "Building Projects with Native Code" instead of "Quick Start".
run npm run eject at the root of your project folder, it will create ios and android folders.
This will start the process of "ejecting" from Create React Native App's build scripts. You'll be asked a couple of questions about how you'd like to build your project.