Publishing Step 2: Creating Your App Build

Important Note 1

While going through these Publishing articles and following the steps to upload your app, please note that the order of operations matters. So  DO NOT skip ahead. Only advance to the next step once you've completed all the previous requirements in these articles.

If you haven't completed all the requirements of Step 1, do so before starting Step 2.

Publishing Step 1: Creating Your Developer Accounts

Important Note 2:

You MUST have uploaded your Splash Screen & App Icon before publishing to IOS and Android, as well as named your app & set your home-page.

1. Setting Your App Icon

2. Setting Your Splash Screen

3. Setting Your App Name, Fonts and Colors

4. Setting Your Home-Page


Once your app is ready to publish to Apple’s App Store and the Google Play Store, save your app, and click the publish button in the top UI of any app screen in your app.

From here, a window titled "Publish Your App" will pop up. Here is what it'll look like:

Publish Your App

The following are the steps you must take to ensure your app gets uploaded correctly:

1. Ensure that your Expo credentials are correct.

Click "Edit" to view and enter your Expo credentials if necessary.

2. Enter your Apple Developer Account details.

Note – Apple will send a two-factor authentication code during the build process. This code expires within a few minutes and must be submitted to 22apps as soon as possible after clicking Publish. The code is sent to the Apple devices linked with your Apple Developer Account.

3. Set up and insert your Google Services Key, Google Services JSON, and Firebase Server Key.

These are three pieces you have to set up and retrieve from your Google Developer account in order to be able to create your Android build in 22apps.

The following will be split into sections. Click to scroll to section:

Google Services Key

Google Services JSON

Firebase Server Key

Starting Your App Build

Downloading Your App Files


GOOGLE SERVICES KEY

First, you must get your Google Services Key.

This section was modified from this post, check out the original here: https://github.com/expo/fyi/blob/master/creating-google-service-account.md

Creating Google Service Account

1. Open Google Play Console and go to the Settings tab and click the dropdown for Developer account.

2. Choose  API access from the sidebar. On this page, select Choose a project to link, agree to the terms, then select Create new project and then click the Link project button at the bottom.

3. Click  create new service account and follow the Google Cloud Platform link in the dialog.

4. Select your recent project. By default, it will be named "Google Play Console Developer". 

  • NOTE - this may take a few minutes to load. Refresh the page until the project appears. 
    • If you find that it still isn't appearing, click SELECT PROJECT and search "Google Play Console Developer", and it should appear.

After selecting your project, click another  CREATE SERVICE ACCOUNT button.

5. Enter the name of this service account in the field titled "Service account name". Use the name of your app. Optionally, add a description of your choice. Click the  CREATE button.

6. Click  Select a role and choose Service Accounts > Service Account User. Click DONE.

7. Click the 3 dots beneath Actions, and click  Manage keys from the options of your newly created Service Account.

8. Click the dropdown ADD KEY, and select Create new key. choose JSON and then the CREATE button. Download the .json file and store it in a safe place.

Note – this file will most likely be titled: “pc-api-“ with a long string of numbers and text following.

8. Return to the  API access page on the Google Play Console and ensure it shows your new service account. Click on Grant access for the newly added service account.

9. Select Admin (all permissions), then click Invite user in the bottom right corner.

10. Now you can upload the Google Services Key file to 22apps.

You can do this by going back into 22apps, clicking “Publish”, tick the box under "Submit to Google Play Console" and scroll to where it says “Google Services Key”. Click “Browse” and upload the correct file into 22apps.


Google Services JSON

Go to https://console.firebase.google.com/

  • Ensure that you are logged into the same Google account you used to create your Google Developer Account.

Click “Add Project”.

Give your project the same name as your app in 22apps, and click "Continue".

Optionally, you can choose to set up Google Analytics. (You can always add this later)

Once complete, click “Create project”.

Click the gear icon in the top left, then select project settings.

On the project settings page, you’ll see a section with the headline “Your Apps”. Click on the Android icon.

Now on this new page, enter your Android package name. You can find this by going back into 22apps, clicking “Publish”, tick the box under "Submit to Google Play Console" and scroll to copy the text under "Package".

It should look like this: com.maplespace.ttapps_app_*number*

Copy and paste your own specific Android Package into Firebase.

Optionally nickname your app, and click “Register app”.

Now you must download the Google Services JSON. You will need to upload this file to 22apps.

Click “Download google-services.json” button, and save the file to your computer and store it in a safe place. Then, click Next.

  • Note – this file will be named: “google-services.json” .

Skip the "Add Firebase to your Android app" step. Scroll down and click “Next”.

Lastly, click “Continue to console”.

Now you can upload the Google Services JSON file to 22apps.

You can do this by going back into 22apps, clicking “Publish”, tick the box under "Submit to Google Play Console" and scroll to where it says “Google Services JSON”. Click “Browse” and upload the correct file into 22apps.


Firebase Server Key

Go to https://console.firebase.google.com/

  • Ensure that you are logged into the same Google account you used to create your Google Developer Account.

Click the gear icon in the top left, then select project settings.

Click the tab at the top named “Cloud Messaging”.

Within this tab, an auto generated server key will appear. The server key will be a very long string of text. (We suggest saving this key in a word document or a text document to your computer so you can easily access it at any time).

Copy this key text directly from here to within your 22apps account.

Copy your server key and paste it into 22apps.

You can do this by going back into 22apps, clicking “Publish”, tick the box under "Submit to Google Play Console" and scroll to where it says “Firebase Server Key”. Paste your server key in to the adjacent textbox.


Starting Your App Build

Now that you have everything in place, go to the “Publish Your App” window by clicking "Publish" in the top UI of any screen.

Since this is your first upload, you will be submitting to Apple and Google. tick the boxes under "Submit to Apple Store Connect" and "Submit to Google Play Console". Several input areas will appear.

Input and ensure that your Expo and Apple account details are correct, and that you have uploaded the correct files and server key under the Android settings.

NOTE ON FILE TYPES:

  • File 1 (Google Services Key) should be named: “pc-api-“ with a long string of numbers and text following.
  • File 2 (Google Services JSON) should be named: “google-services.json” .
  • File 3 (Firebase Server Key) should be a VERY long string of text that looks similar to this: 245vv45qwrtw4etvw4tj89bwwerut89ewthwerthwtuerhth3245vv45qwrtw4etvw4tj89bwwerut89ewthwerthw

Also, have your Apple device ready to access, as a 2 Factor Authentication code will send shortly after you click to publish.

(Note - If you’re working with a client or doing this process for someone else, please message them and ensure that they’re ready to send the 2FA code BEFORE you click Publish, otherwise you will be holding up the queue.)

Once everything is good to go, click Publish.

Once you’ve clicked publish, three builds will appear:

  • 1)      Expo
  • 2)      iOS
  • 3)      Android

First, your Expo build will generate. This will typically take a couple minutes.

Be ready to receive a 2 Factor Authentication code to your Apple devices linked with your Apple Developer Account. After a short wait, the code will be sent.

Once the code is sent to your Apple device, the following window will pop up:

Enter the code you received on your Apple device into the input area below “Apple 2FA Code”.

Click Submit Token.

  • Note – be aware of the timer in the bottom right of the window, and ensure that you submit the code as fast as possible so as to not get timed out.

After submitting your 2 Factor Authentication Code, you’ll see the same window pop back up.

Now, you will notice that the iOS and Android builds are underway. This means that:

1) Your 22apps build is being coded for the Apple iOS upload

2) Your 22apps build is being coded for the Google Android upload

Note – this may take some time to complete. Generally, you should expect it to take around an hour the first time. However, the build time is affected by the Expo Queue which you can view here: https://expo.io/turtle-status

While you can’t see where you are exactly in the queue, it still gives you an idea of how long it might take.

  • Note - You may close the 22apps page if you wish, as it will still render both apps in the background.

While you can’t see where you are exactly in the queue, it still gives you an idea of how long it might take.

  • Note - You may close the 22apps page if you wish, as it will still render both apps in the background.

Publish Failed?

There are 2 important things to know if your publish fails.

1) If you select to publish to both Apple AND Android, and Apple fails, then android will fail too.
In other words, just because Apple fails doesn't always mean your android credentials are incorrect. Please try publishing to each platform separately to diagnose the issue.

2) Please be sure to login to your Apple Developer & Google Play Developer Accounts and confirm your payment information is up-to-date and that any outstanding agreements have been reviewed & signed. (See RED BANNER image below for example)


Downloading Your App Files

Once your app builds are ready, you will see two links appear in the Publish Your App window.

>> IMPORTANT NOTE - Google has changed the required file for uploading to Android from a  .APK file to a .AAB file. Keep in mind that the AAB file is what will be generated for your Android build, and is the file you will use in the next step to upload your app.

The iOS link for the IPA and the Android link for the AAB are both your Apple and Android app files.

Click each link, and download both files.

  • Note – For ease of access, DO NOT click “Clear” until you have downloaded AND fully published your app. You may close the window by clicking X. just don’t click “Clear”.
  • If you accidentally cleared the files, then log in to your Expo account on your computer, and you’ll be able to download them: https://expo.io/login
  • Navigate to your recent builds, and click the Android and iOS builds separately. From there, you can click “Download” to download the app files.

Once all these steps are complete, you will now be able to upload your app to Apple’s App Store and the Google Play Store.

Click Here to go to Publishing Step 3: Uploading to Apple and Google

If you have any questions about this article, feel free to reach out to our support team! We're happy to help.