bare workflow docs for expo-updates are confusing

Also this section seems completely wrong, as in other places it says that the assetBundlePatterns is ignored in the bare workflow:

And the complete sections Configuration for IOS / Android, are they handled by expo eject / prebuild, or do I still have to do any manual changes?

that section is accurate. expo-updates uses assetBundlePatterns as described. it has no impact, however, on the assets that are included in the binary when you run a build. in bare apps and managed apps built with eas build we bundle any asset that is imported in your code, whereas with expo build we only bundle assets according to what is specified in assetBundlePatterns. in both cases, we only consider an over-the-air-update to be downloaded and ready to launch when we’ve downloaded the js bundle and all assets that match this pattern

you don’t need to do anything to configure expo updates after running prebuild

what you are seeing in the expo-updates installation instructions is mainly for projects that aren’t created with expo-cli. everything with expo-cli automatically configures expo-updates. the instructions in that doc are intended for react native projects created through some other mechanism, eg: npx react-native init.

so, things like:

  • sdk version is automatically determined based on expo package version, which is installed in all projects created with expo-cli but not otherwise. it’s not strictly necessary to use expo-updates, so we advise to set sdk version manually
  • expo-asset import is done by expo’s registerRootComponent, which is set up automatically in projects initialized with expo-cli

and so on

i’ll update the docs page to clarify that this is the case so other folks don’t run into a similar confusion

1 Like

you don’t need to do anything to configure expo updates after running prebuild

great, i was getting scared there

that section is accurate. expo-updates uses assetBundlePatterns as described

assets in bare workflow are still confusing me, but i’ll ask a separate question about that

i updated the comment with more information

And thanks a lot for the other clarifications! So to confirm:

When I start out with expo init and then eject / prebuild:

  • sdkVersion is not needed in app.json
  • import 'expo-asset' is not needed in index.js

right. sdkVersion is determined automatically by the expo package version. expo-asset is in index.js as part of import { registerRootComponent } from 'expo';

perfect, thanks!

PS, in Updating your App Over-the-Air have this tip, which would probably fit the Installing expo-updates section as well:

1 Like

I also suffered from the same docs problem and filed a Github issue: [expo-updates][bare][docs] · Issue #13093 · expo/expo · GitHub

The biggest problem however is that I have not gotten it working anymore after upgrade to SDK41, followed with Expo eject (was working with SDK40, managed workflow). Any tips for debugging it would be great, Forums post: [expo-updates][sdk41]