-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cli] Improve Snack support for older SDKs #117
[cli] Improve Snack support for older SDKs #117
Conversation
2a59b87
to
2233b0f
Compare
'packages', | ||
EXPO_GO_BUNDLE_IDENTIFIER | ||
); | ||
export async function isAppInstalledOnEmulatorAsync( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be handy when we add support for opening updates
const localPath = await getContainerPathAsync({ | ||
udid, | ||
bundleIdentifier: EXPO_GO_BUNDLE_IDENTIFIER, | ||
}); | ||
if (!localPath) { | ||
return null; | ||
} | ||
|
||
const regex = /Exponent-([0-9.]+).*\.app$/; | ||
const regexMatch = regex.exec(localPath); | ||
if (!regexMatch) { | ||
return null; | ||
} | ||
const builtInfoPlistPath = path.join(localPath, 'EXSDKVersions.plist'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this is only possible on simulators, I tried using the HouseArrest Service to retrieve the EXSDKVersions on a real device but that doesn't work either given that VendContainer is only supported on dev-signed apps
Why
Closes ENG-10972
How
Improve Snack support for older SDKs on iOS and Android
on iOS Simulators:
EXSDKVersions.plist
on iOS Real devices:
EXSDKVersions.plist
(even through HouseArrest) and we can't install specific versions of Expo Goon Android:
EXSDKVersions.plist
on Android so we need to rely on checking the app version against the latest expo go release for a given SDK, reading from API V2 versions/latest. If the opened Snack requires a downgrade of Expo Go, first uninstall the app to avoidINSTALL_FAILED_VERSION_DOWNGRADE
Test Plan
Screen.Recording.2024-01-02.at.14.41.021.mov