As of January 2022, Rehive no longer provides managed iOS and Android App Store submissions, however you can use this guide to get started managing your own builds and submissions for the iOS App Store and the Android Play Store.
- Enrollment into the Apple Developer Program as an Orginization (not an Individual). Visit this link to view the requirements and start the process
- A Google Play Developer account registered under your business name (not an individual account).
- An Expo Account which will be used build the app bundles
- The Rehive Mobile App source code which can be downloaded from the App Extension section in the Rehive Dashboard. For codebase access a Rehive Premium or Enterprise subscription is required.
- A Firebase account for setting up push notifications on Android.
- App icon in PNG format 1024 x 1024px
- App splash screen in PNG format 1242 x 2436px
- General branding info required by the app stores like App name and description
- Log in to your Apple Developer account, navigate to the Certificates, Identifiers & Profiles section and create a new unique bundle identifier for your app. Apple recommends using a reverse-domain name style string (i.e., com.domainname.app).
- Go to the Apps Section in Apple Developer account and create a new app. Choose the bundle identifier you created in step one and you can use a unique string that identifies your app as the SKU. Note down the bundle identifier.
- Navigate to the Google Play Console and create your App.
- On the All Projects page in Expo, create a new project. Note down the EAS project ID and the app slug.
- Download the Mobile app source code from the App Extension section in the Rehive Dashboard
- Create a
.env.productionfile with your app details. You can use .env.example in the root project directory as a template. We actually recommend creating two files,
.env.production. For the staging app you can create separate apps for testing which will be useful down the line. Note that this means you’ll need to repeat steps 2 to 4 above for your staging app. You can use the example file below as a template. The
appUpdatesUrlshould include your EAS project ID in the format shown in our example below.
- Create an eas.json file in the root directory. This is required for EAS builds. You can use the eas.json.example file in the root project directory as a template. Note that many of the values are duplicated accross your
.envfiles and the
eas.jsonfile. Unfortunately due to the way EAS was designed there is currently no way around this.
- Replace the
/assets/icons/splash.pngfiles with your own app icon and splash screen.
- Add your Rehive company details to the
Android push notification setup (optional)
- To create a Firebase project, go to the Firebase console and click on Add project.
- In the console, click the setting icon next to Project overview and open Project settings. Then, under Your apps, click the Android icon to open Add Firebase to your Android app and follow the steps. Make sure that the Android package name you enter is the same as the value of
android.packagefrom your app config.
- After registering the app, download the google-services.json file and place it in your project’s root directory.
Sentry setup for error reporting
- Sign up for Sentry and create a project in your Dashboard. Take note of your organization name, project name, and DSN. The organization name is available in your Organization settings tab, the project name is available in your project’s Settings > Projects tab (find it in the list) and the DSN is available in your project’s Settings > Projects > Project name > Client Keys (DSN) tab.
- Add the
sentryProjectvalues to your
- Go to the Sentry API section, and create an auth token. The token requires the scopes:
project:write. Save this for a step in the next setup.
Initial build environment setup
- Using the terminal, navigate to the project directory.
- Use nvm or similar node version manager to switch to node v16. i.e.
nvm use v16.
yarn global add [email protected]to install exp globally.
yarn installto install the project dependancies.
- Authenticate your expo account by running
expo loginand following the prompts.
- If you configured your Firebase and Sentry credentials, upload them as Expo secrets:
eas secret:create --name SENTRY_AUTH_TOKEN --scope=account --type=string --value=<auth key from sentry> eas secret:create --scope project --name GOOGLE_SERVICES_JSON --type file --value ./google-services.json
- Install direnv or similar library for managing environmental variables.
Building the app
- Load the app config from environmental variables:
cp .env.production .env && direnv allow .
- Update the version number in version.json. The android build number always needs to be higher than that of previous builds to be accepted by the Play Store. 3.Build the app bundles using Expo’s EAS build:
eas build -e production -p all
- Download the android and iOS bundles using the links outputted by the previous step or by logging or from the Expo dashboard.
- For submission to the iOS App Store, you will need to download and install the Transporter App and for the Android submission, you can create a release and upload the bundle directly in the Google Play Console.
- Publish the changes to a branch by running:
eas update --branch v4.0.11 --message v4.0.11(replace v4.0.11 with the correct version tag matching your version.json).
- Apply the update to production (or staging) by running
eas channel:edit production --branch v4.0.11