Front End Deployment (App)
This project was bootstrapped with Create React Native App. This tutorial assumes basic knowledge of the React Native workflow for building apps. It is not intended as a tutorial. In case you need more information about React Native, the most recent version of this guide is available in the online documentation.
App Preview
Test versions are available for free download if you only want to preview the app. Reach out to us to get a demo account: info@informfully.ch
INFO
Theoretically, the mobile app should be compatible with devices running iOS 11.0. However, TestFlight (which was used for testing the beta version of the app) is only supported by devices with a minimum iOS 13.0. Therefore, we were unable to test whether the mobile app is actually compatible with iOS 11.0.
Environment Setup
To build a release of the app, this tutorial assumes that you have already completed the previous steps. If not, make sure to install everything listed in the Installation Instructions.
You should only need to update the global installation of create-react-native-app very rarely, ideally never. Upgrading to a new version of React Native requires updating the react-native, react, and expo package versions. Ensure that the upgraded package versions are compatible with each other.
As explained in Local Development, make sure to properly configure App.js in the frontend folder located here). Change the' SERVER' constant so that it connects to your local server. If you do not apply these changes, then the app front end will not know what server to connect to.
You can edit app.json to include in the configuration keys under the expo key. To change your app's display name, set the expo.name key in app.json to an appropriate string. To set an app icon, set the expo.icon key in app.json to be either a local path or a URL. It's recommended that you use a 512x512 PNG file with transparency.
Building Release
Create React Native App does a lot of work to make app setup and development simple and straightforward, but it is very difficult to do the same for deploying to Apple's App Store or Google's Play Store without relying on a hosted service. We therefore recommend publishing to Expo's React Native Community.
Expo provides free hosting for the JS-only apps created by CRNA, allowing you to share your app through the Expo client app. This requires registration for an Expo account. Install the exp command-line tool and run the publish command:
$ npm i -g exp
$ exp publishWhen it comes to building an Expo stand-alone app, you can also use a service like Expo's standalone builds if you want to get an IPA/APK for distribution without having to build the native code yourself.
And if you want to build and deploy your app yourself, you will need to eject from CRNA and use Xcode and Android Studio. This is usually as simple as running npm run eject in your project, which will guide you through the process. Make sure to install react-native-cliand follow thenative code getting started guide for React Native.
If you have made use of Expo APIs while working on your project, then those API calls will stop working if you eject to a regular React Native project. If you want to continue using those APIs, you can eject to "React Native + ExpoKit" which will still allow you to build your own native code and continue using the Expo APIs See the ejecting guide for more details about this option.
Once these steps have been completed, you are ready to create your first release. We have more detailed instructions for Android released and iOS releases.
Helper Scripts
If Yarn was installed when the project was initialized, then dependencies will have been installed via Yarn, and you should probably use it to run these commands as well. Unlike dependency installation, the command syntax for running commands is identical for Yarn and NPM at the time of this writing.
npm startRuns your app in development mode. Open it in the Expo app on your phone to view it. It will reload if you save edits to your files, and you will see build errors and logs in the terminal.
npm testRuns the jest test runner on your tests.
npm run iosLike npm start, but also attempts to open your app in the iOS Simulator if you're on a Mac and have it installed.
npm run androidLike npm start, but also attempts to open your app on a connected Android device or emulator. Requires an installation of Android build tools (see React Native Documentation for detailed setup).
npm run ejectThis will start the process of "ejecting" from Create React Native App's build scripts. You will be asked a couple of questions about how you'd like to build your project.
INFO
Running eject is a permanent action (aside from whatever version control system you use). An ejected app will require you to have an XCode and/or Android Studio environment) set up.
Deploy Website
Please see the other instruction page for Website Deployment. If you already have the website up and running, go ahead and start your first Use Experiment.