📦 2. Builds
Builds Requirements
To test your app with Sherlo, you need to prepare builds that:
- include Storybook (with completed setup)
- include bundled JavaScript
- are runnable on emulators (Android -
.apk
, iOS -.app
)
Preparing Builds
- React Native
- Expo
Build scripts
Add the following scripts to your package.json
:
build:android
- builds Androidbuild:ios
- builds iOS
package.json
{
"scripts": {
"build:android": "react-native run-android --mode Release",
"build:ios": "react-native run-ios --mode Release --buildFolder app",
// ...
},
// ...
}
Builds location
After running the scripts, builds can be found at:
- Android:
android/app/build/outputs/apk/release/app-release.apk
- iOS:
ios/app/Build/Products/Release-iphonesimulator/[YourProject].app
Build profile
Add the following EAS build profile (Expo documentation) to your eas.json
:
eas.json
{
"build": {
"testing": {
"android": { "buildType": "apk" },
"ios": { "simulator": true }
},
// ...
},
// ...
}
- Remote Builds
- Local Builds
Build scripts
Add the following scripts to your package.json
:
eas-build-on-complete
- enables Sherlo to process the buildsbuild:remote
- builds both platforms on Expo servers
package.json
{
"scripts": {
"eas-build-on-complete": "sherlo eas-build-on-complete --profile testing",
"build:remote": "eas build --platform all --profile testing",
// ...
},
// ...
}
eas-build-on-complete
The eas-build-on-complete
script is required for Sherlo to process remote builds.
Make sure it passes the same --profile
as the build script.
Build scripts
Add the following scripts to your package.json
:
build:android
- builds Android locallybuild:ios
- builds iOS locally
package.json
{
"scripts": {
"build:android": "eas build -p android -e testing --local --output builds/testing/android.apk",
"build:ios": "eas build -p ios -e testing --local --output builds/testing/ios.tar.gz",
// ...
},
// ...
}
Builds location
After running the scripts, builds can be found at:
- Android:
builds/testing/android.apk
- iOS:
builds/testing/ios.tar.gz
note
Expo compresses iOS builds (.app
) into .tar.gz
files.