1
votes

Explanation

I just started playing around with React Native and Firebase and I was wondering how to publish my app and the whole process. I understand so far that I have the opportunity to deploy my app to Firebase Hosting, and I did. But when I did, it created a HTML file named index.html and does not even include the app. I know that this is normal when talking about hosting websites, but the React Native app is built around JS files.

I ended up with this screen instead, https://pointtravels-1520169473363.firebaseapp.com/

The App

I simply downloaded and did the steps for the React Native Firebase Starter and then just did the Firebase initialization and deployment right afterwards with these instructions, https://firebase.google.com/docs/hosting/quickstart

You can find the app structure here, https://github.com/invertase/react-native-firebase-starter

The Firebase initialization created the following files,

  • firebase.json

    { "hosting": { "public": "public", "ignore": [ "firebase.json", "/.*", "/node_modules/**" ] } }

  • ./public/index.html

  • ./public/404.html

Question

How can I deploy my app and make it downloadable without publishing on the Google Play Store or the App Store?

Why

I would like to show my friends and family what I am working on.

I am still new in the app development community, so I hope that a nice soul wanna help me out with a brief explanation on how to do this.

Thanks in advance!

2
Could you edit your question to show 1) the exact steps you took, 2) the file structures you created for a very basic app, and 3) what happened that was not what you expected?Doug Stevenson
Sorry, I forgot to include that :-) It's added nowJens Kvist
You haven't really said where your web app files live within the project structure that firebase init created for you. Note that you have to follow its conventions for static content placement, or manually reconfigure it.Doug Stevenson
Sorry, I figured that the /public/ folder was the case for every initialization. But I have updated the question with the files created during the initialization.Jens Kvist
So you did firebase init after you created your RN project? Seems you did it backwards. All your files to deploy have to live in the public directory. In there, index.html has to be the landing page for your app. Anything else requires reconfiguration of the project.Doug Stevenson

2 Answers

1
votes

First of all, please consider editing the question title. Your question actually has nothing to do with the problem. You actually want a Beta Distribution service for your RN app.

For that you have some:

Beta from Fabric: https://fabric.io/features/distribution App Center by Microsoft: https://appcenter.ms (Previously HockeyApp)

We have used both and now we are using the second one since it is more integrated with our tools and Crashlytics/Fabric has been adquired by Google and they are still in the migration process so I have no idea how the service will look in the end.

Cheers

0
votes

Okay, so I realized that Firebase Hosting is focused on web-based applications only and not anything native. I found out that Google Cloud Platform actually have something called App Engine, which says it all. So I guess I learned something new today, hurray!

An app with Firebase integration this is the clearly the best choice.