React Native, build for iOS - react-native

I have an app made with React Native that is already working on for Android.
I'm working on Debian 10.
For Android I build my app-release.aab file with this command:
bash android/gradlew --project-dir android --project-prop MYAPP_UPLOAD_STORE_FILE=my-key.keystore --project-prop MYAPP_UPLOAD_KEY_ALIAS=my-key --project-prop MYAPP_UPLOAD_STORE_PASSWORD=mypassword --project-prop MYAPP_UPLOAD_KEY_PASSWORD=mypassword clean bundleRelease
I've been creating this bundle for like a year with no problems, but now I have a task that is "now we want the iOS version"
What do I need to create this iOS version? I'm pretty lost, I have never created nothing for iOS, I just have this React Native app that works ok on Android.
I've been reading some mediums, youtube videos, and some questions here in Stackoverflow but they talk about that it's possible to create the app for both Android and iOS but I can't find a source of clear information about what I need for.
Do I need a Mac?
How should I create the bundle for iOS?

First, if you want to publish to the iOS app store, you need to buy a paid Apple Developer Program, regardless if you have a Mac or not.
Okay, if you have a Mac there is a good amount of documentation: https://reactnative.dev/docs/next/publishing-to-app-store and more. The below is if you do not have a Mac, or do not want to develop on it.
No Mac
You cannot build macOS apps locally without a Mac.
That being said, you could look at CI/CD, for example, Github Actions or Travis CI, as running macOS on them is possible. If you are already pushing your code to Github, I recommend Github Actions. If you do not want to use CI/CD, you can use Expo. With Expo, you can build your app on their servers, and all you need is a paid Apple Developer Program (no Mac).

With vanilla react-native for local development/builds you will need a Mac as Xcode (free) is required for iOS builds. It's propriety software to macOS. You will also need an Apple Developer account to setup development/distribution certificates for deployments.
You can then use Xcode and the iOS certificates/provisions to generate a bundle for iOS.

Related

React Native CLI Setup for both IOS and android

I am trying to start a react native project using the React Native CLI method (https://reactnative.dev/docs/environment-setup). My first question is, if I have a mac and my friend has a windows computer can we both work on the same app? Also, how do I configure one single code base for both ios and android? Do I just follow the installation instructions for both in a single project? Thanks!
Yes, you can work separately on windows and mac for the same app and you don't have to configure any kind of codebase as react native is hybrid app development technology, you just have to write a single code for both the android and ios platforms.
To install react native CLI just follow the official document on your specific platforms because both of them have a slight difference in the installation process, after successful installation, I would suggest you to use some kind of VCS(Version controlling system) like git or svn.
I am also working in the same process as you have described I am developing in windows and my friend is working on the mac.
feel free to contact me I will help you if you have any kind of queries

How to build .IPA file for testing in react-native?

I have build a project in react-native, for now I am testing the android app by using Expo Client App. I am using Visual Code in Ubuntu 18.04.
So the problem is, now I want to test the project for IOS, but unfortunately i can't test the app, because I don't have MAC OS.
Can anyone tell me the alternative solution of testing react-native project on IOS?
And if somehow there is a solution of creating IPA,then can I use that IPA in IOS without uploading it in AppStore?
You can use snack :
Snack lets you run complete react native project in a web browser,you can set it up on your local machine directly use it from snack.io which also let's you test for android and ios as well

Develop with react native under debian 9

I'd like to know how I can develop using linux (for example debian 9) and use my iPhone to see what I am developing.
I don't want to use macOS to do this and the best would be to see the result under Android and iOS without simulator, directly on phones.
Thanks for help !
If you want to stuck with Linux OS. You can test you app on android variant only (on both emulator or physical device)
In order to test your app on iOS you need to have a mac machine to generate / build the project.
If you don't have a mac system you can go with Expo SDK.
Expo is a free and open source toolchain built around React Native to help you build native iOS and Android projects using JavaScript and React.
You can easily get started here

Is Expo able to build a production-ready iOS app without needing a Mac?

I'm about to start developing a React Native app. However, for iOS, my company is unable to provide me a physical Mac device for building/publishing the app.
So I'm planning to use Expo. But can Expo replace a physical Mac for building the app (I mean, getting the app ready for the App Store) ? Or is Expo only used to test the app on an iPhone (by flashing the QR code) ? I'm a bit confused.
Short answer: Yes, with a curve.
Long answer:
Before your app is released, react native needs to transpile your javascript to exo-native code (not sure of the real term for that). And this process may not run unless you 'eject' your code. This produces the android and ios folders that would be almost production ready except that you now have to build to generate apk in the case of Android or app in the case of iOS.
Now if you have added third party plugins, that have native codes, that expo does not already have a unimodule for, these won't work in expo because they need to really be compiled into native codes before being bundled into your app.
Edit:
Expos has evolved during these years and the former short answer I gave as No, no longer is as valid. You can now build without a Mac; expo does that for you.

How to run iOS .app package within Simulator?

Dev guys from other company, sent me iOS app package that is build with Xcode, but I don't have its Xcode project, just built app package file. How to run that on simulator or on iphone?
UDPATE: I'v tried Simulator launcher but the solution is not working when using Xcode 4.2.1.
UPDATE2: Also tried to use this solution but with no luck (getting black simulator screen and errors shown in terminal after launch). IMHO these problems might be related to iOS 5
UPDATE3: Also, unsuccessfully, tried to use this solution
normally you should be able to install it with itunes, a detailed step-by step guide can be found here: http://www.wikihow.com/Install-Ad-hoc-iPhone-OS-Apps
If it is built for device, you can install it to your device using iTunes or Xcode Organizer. However, you cannot run it on any device. They should also give you a provisioning profile for letting you install that app on your device.
Found the solution. I'v asked the guys to send me "ipa" package instead of raw .app package. Then added it to my iPhone device.