This document is intended for Expo Snack maintainers. It contains references to code and resources accessible only to Expo team members.
- Add new SDK version (and ship Snack with preliminary support for the new SDK version)
- Testing
- Pre-release snack-sdk
- Release Snack with official SDK version support
- Update appetize.io
Update the Snack runtime (managed Expo app), snack-sdk and website to the latest Expo SDK. After these steps have been completed, the Snack website can be deployed and contains "preliminary" support for the new SDK.
- Run
yarn add expo@^...
to upgrade Expo. - Run
yarn expo install --fix
to upgrade all dependencies of Expo. - Update the patched packages in
./patches
. - Update any default project files to match the template in
expo/templates/expo-template-blank
. - Update the files in
./web
to match the latest expo-cli defaults (expo customize:web
). - Run
yarn tsc
andyarn lint
and fix any errors - Deploy the native runtime to staging using
yarn deploy:staging
- Deploy the webplayer to staging using
yarn deploy:web:staging
- Deploy the native runtime to production using
yarn deploy:prod
(useful for testing react-native examples agains the new runtime) - Deploy the webplayer to production using
yarn deploy:web:prod
(useful for testing react-native examples agains the new runtime)
- Add new SDK version to
snack/packages/snack-content/src/sdks/types.ts
- Update
snack/packages/snack-content/src/sdks/index.ts
and use the same dependency versions as used by the runtime (these are used for resolving type information) - Update
snack/packages/snack-sdk/src/__fixtures__/bundledNativeModules.json
and add the new SDK version - Run
yarn test
and fix any failing tests - Update CHANGELOG.md
- Add new SDK version to
snack/website/src/client/configs/sdk.tsx
(versions) - Add new Appetize (app) instance to
snack/website/src/client/configs/constants.tsx
(appetize) - Set the value to
false
to deploy the website with preliminary support for the new SDK (seesdk.tsx
) - Run
yarn test
and fix any failing tests
Testing Snack should be done for all platforms: iOS, Android and Web!
- Start the runtime web-player locally
expo start:web
(insnack/runtime
) - Run the Snack website locally and select "localhost" in the SDK versions picker
- Verify that the logs panel does not contain any runtime errors or warnings
- Open the web-player full-screen and use Ctrl+I to inspect the console logs
- Verify the basic example works and then move on to the other tests
- Install the new Expo Go app on your test device
- Run the Snack website locally and select the new SDK version from the SDK versions picker
- Go to "My Device" and scan the QR-code with your device
- Verify the basic example works and then move on to the other tests
The Expo documentation contains excellent examples for verifying Snack. The easiest way to use these examples is to Start the Expo documentation dev-server and have it use the local Snack website.
- Edit
expo/docs/common/snack.ts
and set the URL tohttp://snack.expo.test
- Start the Expo documentation dev-server
- In the docs, select the new SDK version or "Unversioned" (if not already selected)
- Select a page and open the Snack example using "Try this example on Snack"
- Good examples to verify:
- Custom fonts
- Linear gradient
- Audio
- Video
- This should open the Snack in your locally running Snack web-app at
http://snack.expo.test
- Verify that the correct SDK version is selected in the bottom status-bar
- Test the Snack on Web, Android and iOS
- Test snack.expo.dev (with no id!)
- Open unsaved snack in app, make some changes, then hit save
- Test existing snack.expo.dev/ID (https://snack.expo.dev/r1Xun_7eb)
- Open that in the app, make some changes, save, and reload
- Test existing permanent snack snack.expo.dev/@username/project
- Open that in the app, make some changes, save, and reload
- Open snack directly on phone without website open (https://expo.dev/@snack/r1Xun_7eb)
- Open permanent snack directly on phone without website open (https://expo.dev/@username/project)
- Open
website/snack-embed.html
to test embeds
To enable partners to use the new Expo SDK, snack-sdk can be released to the next
channel.
- Update the version in
package.json
. Ex. "3.2.1-rc.0" yarn build
npm publish --tag next
When the new Expo Go app has been shipped, Snack should be updated to support the new Expo Go app and its supported SDK versions. This includes removing deprecated versions and setting the new default SDK version. A PR should be made in advance which includes the following changes, so it's ready to be merged on the day of the release.
Update the runtime to the official Expo SDK. Follow these steps.
- Remove deprecated SDK version from
snack/packages/snack-content/src/sdks/types.ts
- Remove version from
snack/packages/snack-content/src/sdks/index.ts
- Remove version from
snack/packages/snack-sdk/src/__fixtures__/bundledNativeModules.json
- Update default version in
snack/packages/snack-content/src/defaults.ts
(sdkVersion) - Run
yarn test
and fix any failing tests - Update CHANGELOG.md
- Remove SDK version from
snack/website/src/client/configs/sdk.tsx
(versions) - Update
DEFAULT_SDK_VERSION
. - Update
TEST_SDK_VERSION
when needed. It's best to upgrade it the latest official version, so the tests don't require upgrading everytime. - Run
yarn test
and fix any failing tests
Release an official version of the snack-content and snack-sdk.
- Update the version in
package.json
with a minor bump. yarn build
npm publish
- Update CHANGELOG.md and commit your changes
Appetize.io is used for running the Expo Go app in the cloud, in your browser. When a new Expo Go app has been released, it should be updated in appetize.io as well.
- Download iOS build from https://exp.host/--/api/v2/versions
- Extract the iOS
tar.gz
file - Rename the extracted folder to "Exponent.app" (you should now see the Expo icon)
- Now compress "Exponent.app" into another zip-file (this is the file that you'll need to upload)
- Download Android APK using https://exp.host/--/api/v2/versions
- The downloaded
.apk
file is the one that should be uploaded
- Upload to Appetize main Queue (Use credentials from 1password - Appetize Main Queue)
- Android is at https://appetize.io/manage/private_rjkpqzbv9e7q53dw4uukutxb4g
- iOS is at https://appetize.io/manage/private_vy2kckqpv3wc4cccdgv1yhxppg
- Upload to Appetize Embedded Queue (Use credentials from 1password - Appetize Embedded Queue)
- Android is at https://appetize.io/manage/private_cg1109cch61mzkhyq7cx67qprg
- iOS is at https://appetize.io/manage/private_wpak1hhfkbv8czpx4k48gz5664
- Check that they are working! (Android emulator will only work from staging-snack.expo.dev, not through ngrok)