[ios] show helpful error message when expo-cli responds with an incompatible project #10508
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why
fix for #10344
When serving projects in development, expo-cli does not respect the SDK version headers in manifest requests and will respond with the project's manifest rather than an error code if the SDK version is incompatible.
Pre-expo-updates, we did our own client-side compatibility check when loading manifests for this reason, and spoofed the www error code response for manifests that were incompatible. With expo-updates, we do the client-side compatibility check at the time of launching an update from the database, which is why this has resulted in the less-helpful error message of "No launchable update found in database."
How
Add a separate call to the
verifyManifestSdkVersion:
method when loading a new remote update. If the update is incompatible, we abort and show an error.This does add a tiny bit more stateful behavior to EXAppLoaderExpoUpdates, so it would be good to do the follow up steps in the future to add some more robust handling and remove the need for this statefulness.
Test Plan
Follow up