React native - creating an APK - react-native

I want to create an APK from my react native application.
To do so, I use expo, being based on this web page.
I created two apps (app A that is completely empty and app B that is full of code), because I want to figure out in which file inside APK my code is stored (this code that I wrote in the app B).
But the problem is that even when I will add a few thousand lines of code the size of APK will be still the same and basically everything is the same in both APKs.
Any ideas what might be wrong? In my opinion the APK of app B should be much bigger, but it doesn't.

Related

React Native Expo app shows white screen on TestFlight

I have been building an app in React Native with Expo for the last few months.
I just got accepted as a Apple Developer so now I am trying to publish my app to TestFlight.
Everything seemed to go perfect, the building process passed and I uploaded my app through the Transporter app. Now I have my app installed on my phone but every time I open the app it shows a very short Splash image and then goes to a white screen forever. I've searched every possible solution but can't seem to find anything and I am running out of options.
I checken my app.config.js and my eas.json file and it all seems valid to me. So please, if someone experienced this and knows how to solve this, it would be very helpful!
I was expecting to see my app just like I saw it before, while testing it in the Xcode simulator. I have tried changing my config files but it all seems correct to me.

How does Expo work during and after building a package?

I'm a bit skeptical after doing a build apk on expo with a user account. The case is as follows: I must make two similar applications (A and B) for 2 companies, each one with characteristics specific to each company. When I have done "expo build apk" of the first application (A) in Expo, everything has gone well and I have been able to test the apk on a real device (not emulator). Then I build application B in expo with the same user account and everything ends well too, I have obtained an APK file. The problem I get is that when I opened app A on the real device, it was the interface of app B that started. It seemed that by using the same expo account to build, I had overwritten app B over app A. The only solution I did is to create another expo account to build the second app.
So I have two questions:
Can anyone tell me if my reasoning is correct? Does Expo only support one app per account?
When you upload the application (.APK or .AAB) to Google Play. Will the application still depend on Expo? I thought that Expo only build .apk and now it is independent file.
I really appreciate your comments and responses.

Expo: Remove iPad support on non published app

I'm completely new to React Native, Expo and App development in general.
I'm building a React Native app solely for iOS using Expo. I've finally managed to finish a version I'm happy with, tested with users etc. I've now been spending time adding all the required screenshots, text, info etc to App Store Connect in order to submit the app. While doing that, I learned that iPad app screenshots was mandatory, which I found weird.
I later found that I had "supportsTablet: true" in my App.json file, so it makes sense that it's expecting iPad pictures. After changing this and making a new build and submitting that, it's still a requirement.
After Google a bit I can see that it has been impossible to change this:
Removing iPad support from app
iOS App Submission : remove iPad support
iOS App Submission want to remove iPad support
This led me down the road of trying to upload the app as a new submission. I can't get this to work though. According to this documentation:
https://developer.apple.com/library/archive/qa/qa1623/_index.html
I should change bundle identifier and upload again. Changing this in app.json under expo.ios.bundleIdentifier doesn't work though, as I just get an error that I've already uploaded this app previously.
What are the steps I should do to reupload the app as a new submission, so that I can not support iPad?
In order to upload a new version, you must increase the version and the build number. You can find this if you open the project in Xcode under the General tab and the Identity section. In the same tab, you will see the Deployment Info section where you can untick the iPad. Check the picture attached.

React Native - Multiple iOS builds per project

Scenario
I have two apps that are identical except for some minor textual differences. Currently I have 2x projects and would like to condense them into one.
eg.
React Native Project
/ \
Xcode build 1 Xcode build 2
Another important caveat: App Signatures
I assume the App Stores recognize app uploads by some sort of archive/compilation signature, not by app name. This is why I'm wanting to do 2 separate xcode builds rather than 1 xcode build.
Question
Can a React Native project maintain 2 separate Xcode builds?
Running multiple builds off of the same application is a pretty common paradigm in iOS development, and this holds true for React Native as well.
The instructions here should get you well on the way to configuring multiple builds, with unique bundleIds (what the app store will use to recognize it as a unique application).
To test them out on your machine after configuring everything, you can use the following command as an example.
react-native run-ios --simulator 'iPhone X' --scheme 'YOUR_SCHEME' --configuration 'YOUR_NEW_CONFIGURATION'
I would start by just duplicating your Release config and renaming it, just to make sure that it runs fine on your machine before you start playing around with the configuration.

React native init project is very large in size

Here is the versions I am using
The problem is the project I created using react-native init AddisMereja is of size 20MB.
It does not have anything.
I believe you are talking about the size of the apk file that is generated. If so you can try using app bundle and submit the app bundle to google play store which will handle it according to users device as the apk that is generated by default contains apps for different architectures but you will end up using only one of them.
This blog post by Krzysztof Magiera explains the process better.
Your app size is descries after make a release apk Or sign apk.