Once installation is complete, apply the changes from the following diffs to configure expo-updates in your project. This is expected to take about five minutes, and you may need to adapt it slightly depending on how customized your project is.
We need to modify index.js to import expo-asset early in your app, in order to be able to update assets over-the-air. We'll also need to update metro.config.js for the same reason. And we'll need to add some Expo-specific configuration to app.json.
💡 What is the SDK version field for?
Currently, all apps published to Expo's servers must be configured with a valid SDK version. We use the SDK version to determine which app binaries a particular update is compatible with. If your app has the expo package installed in package.json, your SDK version should match the major version number of this package. Otherwise, you can just use the latest Expo SDK version number (at least 38.0.0).
💡 How do I customize which assets are included in an update bundle?
If you have assets (such as images or other media) that are imported in your application code, and you would like these to be downloaded atomically as part of an update, add the assetBundlePatterns field under the expo key in your project's app.json. This field should be an array of file glob strings which point to the assets you want bundled. For example: "assetBundlePatterns": ["**/*"]
💡 Migrating from an ExpoKit project?
If you're migrating from an ExpoKit project to the bare workflow with expo-updates, remove the ios.publishBundlePath, ios.publishManifestPath, android.publishBundlePath, and android.publishManifestPath keys from your app.json.
Configuration for iOS
Final steps to perform in Xcode
Once you have applied the changes from the above diff, the following additional changes are required:
Add the "Supporting" directory containing "Expo.plist" to your project in Xcode.
In Xcode, under the Build Phases tab of your main project, expand the phase entitled "Bundle React Native code and images." Add the following to a new line at the bottom of the script: ../node_modules/expo-updates/scripts/create-manifest-ios.sh
💡 What is the create-manifest-ios script for?
This provides expo-updates with some essential metadata about the update and assets that are embedded in your IPA.
💡 Are you using expo-splash-screen in your app?
If you have expo-splash-screen installed in your bare workflow project, you'll need to make the following additional change to AppDelegate.m: