packages/expo-updates/guides/general.md
Last updated: 2022-10-13
Some general meditiations / tacit knowledge on expo-updates that has accumulated through the years of working on this library.
There is some additional information in Notion (Updates module -> Past and future issues)
Here are some overarching principles and design goals that influenced the design of expo-updates and may be helpful to keep in mind and/or decide to explicitly reject or change:
SelectionPolicy classes provide a pluggable interface for determining ordering of updates on the client.createdAt, for example, has implications for server-based rollbacks (they must actually be a new update with a later createdAt date in order for the client to run them).Loader and Launcher classes are a result of this; the processes should be able to happen separately, independently, and simultaneously.
Loader classes modify and write to SQLite and the filesystem, while the Launcher classes mostly only read from SQLite and ensure integrity with the filesystem (though modify a few columns depending on whether the launch succeeded/failed).id (releaseId for classic updates) as a unique identifier across all updates. If a server hosts two manifests with the same id but differences elsewhere, expo-updates will not compare the manifests and notice the difference.
key attribute in the manifest, and it assumes that any two files with the same key are the same asset and can be substituted for one another. This holds as long as the updates service ensures keys are unique across all assets (as both EAS Update and the classic Expo updates service currently do).