Quote
Hi @all, how is your week ? are u ready for learn something ? In this session, we will go to next session of expo for building mobile application, but in release stuff like artifacts to App Store and Google Play. Now let digesting, and donβt turn around
But before we start, if you want to know what happen in previous session, take your time to check Build mobile with Expo (Part 1) - Article cover about expo
, way to build your application and get connection to authentication your host to expo.dev
About Mobile Artifact
Quote
Honestly, I donβt release as much application to these platforms, I just have little bit experience to hang out with
Google Play
andApp Store
for particular release toTestflight
for IOS andGoogle Play Internal
for Android, at least for internal testing. The story get your application to one of huge platform, ainβt gonna lie really hard in this time
IOS CI/CD (Created by: Bitrise)
Android CI/CD (Created by: Bitrise)
Info
In my perspective, this progress is try to describe step by step in the image with workflow, and give the illustration for understand more how to build artifact come, what file we get after that and where we head to release application.
Technically, expo
does same thing as bitrise
- Illustration of bitrise
attached, automation platform to build and distribute mobile applications. But I want to share the journey, and you can do to get the best result with expo
. But if you want to inspect more detail to build one of these artifact, I think fastlane
is one of thing you want to find, read my old article to understand more
As you can see, the artifact of each platform have different in someway, and method to hang out make different but with expo
anything else becoming easy more ever. Some reason, I will try to list in below about what thing you can do with expo
- Not need to implement build progress - if you read about previous session, you donβt need to hang out with implement step by step to build. Your application will sign with auto generated in
expo.dev
, but the sign itβs on you - Have place to help you store certificate - The big problem is using with
fastlane
about method to keep anything secure, especially certificates for IOS and Android Platform, and anything else resolve store that inexpo.dev
with automation generate and supply for your application - Artifact is stored inside
expo.dev
- You can retrieve your artifact insideexpo.dev
for 30 days, and be ready submit to any platform
Quote
I think if you want to try some easily,
expo
is one of thing recommendation for your first Android and IOS to build and distribute (NOTE: BareReact Native
is hard but you will learn a lot, donβt rush to useexpo
)
I think with helping from tutorial articles of relate topics that can help you to earning more little knowledge before we start with next part
- Medium - A comprehensive guide on CI/CD for Expo Projects
- Building a CI/CD pipeline for your Expo app using EAS
- Why youβll want to use Expo for your next React Native app
- Configure EAS Submit with eas.json
- Submit to the Google Play Store
- Submit to the Apple App Store
Try to release
As you can see, expo
takes care mostly thing for us when try to release to one of build to platforms, including Google Play Store
and App Store
with zero (0) effort and complexity.
EAS Submit bring us powerful feature to release your build previous session through eas.json
, again you need to take care itself inside profile, and submit it to help expo
imagine what keys and certificate to help your application go to right place.
With both, Android and IOS, they have different way to create that secrets one, but I think you can get this with step by step through tutorial of Apple (Ease to understand)
- Android: You need to handling create Google Service Account for yourself to help
expo
have permission to submit.aab
to your Google Play Console (NOTE: Pay 29$ to using it). Android Platform require you manually created for first time to automation after that, explore at First Submission of an Android App - IOS: With Apple you need create Apple Account for yourself, and ainβt gonna lie really expensive (NOTE: 99$ to using it). IOS makes some sort of different with Android through you must be submitted through Apple upload methodology and you canβt do this step manually in Apple Portal.
Quote
With
expo
, I donβt have opportunity to release applicationGoogle Play
, but withTestflight
I have something want to share, but let go toapp.json
, you need to take a look some information to help you prevent error when upload
App Version
First thing, you need to notice about App Version parameter in app.json
because Expo base on that value to assign value build for your both Android
and IOS
application, It means if you not make a change your next build wonβt upload successfully to both platform
Can't upload in Google Play
Can't upload in Apple Connect
Warning
Therefore reason,
app.json
is placing you need to concerning every time to build and release your application because when you make a mistake, you need to try again and cost money to build (NOTE: Sometime 30 build-free times are not enough for a month) π
Take the look with App Versions part in documentation, you will figure out what parameter inside app.json
need to replace
Property | Description |
---|---|
version | The user-facing version visible in stores. On Android, it representsΒ versionName Β name inΒ android/app/build.gradle. On iOS, it representsΒ CFBundleShortVersionString Β inΒ Info.plist. |
android.versionCode | The developer-facing build version for Android. It representsΒ versionCode Β inΒ android/app/build.gradle. |
ios.buildNumber | The developer-facing build version for iOS. It representsΒ CFBundleVersion Β inΒ Info.plist. |
Info
It means in one
version
- the big one, you need to specific unique or increment build version numberbuildNumber
orversionCode
to help your application to release successful corresponding to big version. When your application need to change new version - the big one, you can return to build version 1 for starting in new big version
But that action isnβt really need if you use expo version higher than 12.0, because in this version, Expo support user to use cli
with remote
mode instead of local
mode, and It means you can try retrieve the build number Expo Cloud instead of from app.json
. Read more at Remote version source and you can hang on through configuration
As you can see set cli
to remote
because default will take local
and in your profile build set autoIncrement
to help you auto increase your app build, and your work is enjoying and expo
will take care of all for you π.
But It has some warning from expo
, maybe you need to concern BTW
Warning
The remote version is initialized with the value from the local project. For example, if you haveΒ
android.versionCode
Β set toΒ1
Β in app config, when you create a new build using the remote version source, it will auto increment toΒ2
. However, if you do not have build versions set in your app config, the remote version will initialize withΒ1
Β when the first build is created.
One more thing, It will make sense your build from remotely, and you can safety removing your buildNumber
or versionCode
out of configuration inside app.json
In some other cases, you maybe need to concern to check out, really helpful with synchronize feature
Info
The big version -
vesion
wonβt take effect from this feature, you need to manually change it inside yourapp.json
Or if you want to take around with local
mode, the default option, come and take a look with Local version source but recommendation spend for remote
with good behavior
App Encryption Compliance
When I first time to come up with Testflight
, I wonder how the heck is this encryption because I donβt meet anything else with Android, actually this is not gonna App Signed, we will talk a bit on next part.
Therefore, try to google and you will figure out Complying with Encryption Export Regulations - A declaration the use of encryption in your app to streamline the app submission process.
Info
When you submit your app to TestFlight or the App Store, you upload your app to a server in the United States. If you distribute your app outside the U.S. or Canada, your app is subject to U.S. export laws, regardless of where your legal entity is based. If your app uses, accesses, contains, implements, or incorporates encryption, this is considered an export of encryption software, which means your app is subject to U.S. export compliance requirements, as well as the import compliance requirements of the countries where you distribute your app.
Every time you submit a new version of your app, App Store Connect asks you questions to guide you through a compliance review. You can bypass these questions and streamline the submission process by providing the required information in your appβsΒ Information Property ListΒ file.
For more information about export compliance, readΒ Export compliance overview.
It means you need to give documentation or doublecheck about encryption methodology because your application is outside the US. Maybe this article can give you best visualize about landscape problems
- Appstore submission: Does your app use encryption? How to determine if your app contain encryption?
- iOS App Security: Best Practices
- Overview of export compliance
In this case, after you release app to testflight
, It makes you costed little time to check the question of compliance, and that why expo
or apple
give us the methodology to reduce this step
- Bypassing Manual Encryption Check for iOS Apps
- Export Compliance in iOS App Submission
- ITSAppUsesNonExemptEncryption
Apple give us choose boolean for ITSAppUsesNonExemptEncryption
inside expo
configuration, to help you bypass this selection and reduce more time to access Apple Connect. Back to app.json
, if you notice about usesNonExemptEncryption
, It actually means for bypass encryption for application submission
Info
If donβt wanna set anything else about encryption, you just need to change that into
false
instead oftrue
by default. After submission successfully, your application can directly gain permit for internal user accessible to our application
App Store Connect API
The story in this situation will not need to talk but it makes me cost little bit time and diligent to figure out what happening in Expo
With Apple Store Connect, they separate to multiple role and permission. Usually, when you try to get one Apple Account for yourself, you will stand on highest permission with Account Holder, and you will gently create Apple Store Connect API with zero (0) effort with submit
command, and help you create a Apple Connect API Key right permission, and set to expo.dev
. You should check out articles and documentations to figure out what you need to
- How to grant API key access to Apple App Store Connect
- App Store Connect API
- Creating API Keys for App Store Connect API
- Creating an App Store Connect API Key
In my situation, I am only stand App Manager, It means I canβt not create Apple Store Connect API Key for myself, and I need to request Admin or Account Holder to provide my API Key. But you must clarify twice type of Apple Store Connect API Key
- Team Key - Required role:Β Account Holder orΒ Admin - this one actual thing you need to help
expo
connect to your Apple Store Connect, used across all the apps in your account, or you can assign them to only specific roles. (E.g - format: AuthKey_xxxxxxxx.p8) - Individual Key - Required role:Β Account Holder, Admin,Β App Manager,Β Customer Support, Developer, or Marketing - This one to help your application have permission to call API Service with only your account (E.g - format: AuthKey_xxxxxxxx.p8)
Therefore, you need to have Admin
Key or higher to help your expo
connect Apple Store Connect, and after that if your account not with Admin
or Account Holder
, please submit that key inside portal of expo.dev
in credential
of Application
Note
Remember
Issuer Identifier
can found in Admin or Admin Holder who one issue the ASC API Key for you, andKey Identifier
usually the number behind your key, it meanxxxxxxxx
onAuthKey-xxxxxxxx.p8
And now you can try to submit that with command
Info
Now you will copy
ID
of build, It usually have formatGUID
Submitting with command
Note
Your profile will not configure anything, so
expo
will ask you couple question like Apple ID and Password, providing it for your shell and anything step will be taken by Expo
After successfully notification in your shell, you can get the result in your apple account, inΒ testflight
Β tab. With tester, you can invite them through testflight
app in AppStore
Talk about automation story
Yeah I know you handle multiple step with expo
with manually, so how about automation
. When I try to relate you with some article about, letβs take the look again
- Medium - A comprehensive guide on CI/CD for Expo Projects
- Building a CI/CD pipeline for your Expo app using EAS
Expo write a guide to help you provide secrets information through eas.json
, and create a methodology to automation at all for your release. Read at Submitting your app using CI and following step
- Provide the archive source (
--latest
,Β--id
,Β--path
, orΒ--url
). Get this one for you
-
Make sure that the iOS Bundle Identifier is present in yourΒ app config file. Actually, you will always push this stuff to your repositories
-
Set the ASC App ID (
ascAppId
Β inΒ eas.json). The ASC App ID is required to skip the Apple Developer log-in process, which will likely not be possible on CI due to the 2FA prompt. You must set apple id with non 2FA methodology to use itself on pipeline -
Set up your App Store Connect API Key with EAS Servers. You can check the state of your credentials by runningΒ
eas credentials
Β or by runningΒeas submit -p ios
Β interactively.- App Store Connect API Key: Submitting in portal
expo.dev
, you donβt need configuration, unless you run expo in your local place
- App Specific Password:Β Provide yourΒ passwordΒ and Apple ID Username by passing them in with theΒ
EXPO_APPLE_APP_SPECIFIC_PASSWORD
Β environment variable andΒappleId
Β field inΒ eas.json, respectively.
- App Store Connect API Key: Submitting in portal
With Expo, EAS_CLI actually support you through method to handling both build
and submit
in same time through build
command
Fully CI/CD Pipeline write down in Github Action by Luca Zani, get the applause for him about useful and detailing pipeline π€
Conclusion
Success
That is @all for blog, hope you have time to take a look about artifact of Expo Build, and give you landscape to imagine step to help you distribute mobile application to Google Store and App Store. Expo is one great choice when I try to adapt pipeline, and automation with this platform, clear and make sense for all steps you need to completely. If you need your help, Expo is ready to listening and supporting inside their Github, Discord, X and Reddit
Quote
The week of mine come up with many thing, and I need to take care but yeah the weekend is time to stop, and try to write about the thing learn through journey. Therefore, stay safe, learn more and see yah on next weekend. Donβt forget check out new article Switch Role between AWS Accounts to hang out with AWS Cloud. Bye Bye π