-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
expo-updates implementation #3092
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Pull Request introduced fingerprint changes against the base commit: 5b4b8e4 Fingerprint diff[
{
"type": "dir",
"filePath": "node_modules/expo-updates/ios",
"reasons": [
"expoAutolinkingIos"
],
"hash": "d46bff4299ab6eed3a7e3a2488215fad8eaa164d"
},
{
"type": "dir",
"filePath": "patches",
"reasons": [
"patchPackage"
],
"hash": "888e27fa069294187b187c178bdafbaf3a95670f"
},
{
"type": "contents",
"id": "expoConfig",
"contents": "{\"android\":{\"adaptiveIcon\":{\"backgroundColor\":\"#1185FE\",\"backgroundImage\":\"./assets/icon-android-background.png\",\"foregroundImage\":\"./assets/icon-android-foreground.png\",\"monochromeImage\":\"./assets/icon-android-foreground.png\"},\"googleServicesFile\":\"./google-services.json\",\"icon\":\"./assets/icon.png\",\"intentFilters\":[{\"action\":\"VIEW\",\"autoVerify\":true,\"category\":[\"BROWSABLE\",\"DEFAULT\"],\"data\":[false,{\"host\":\"bsky.app\",\"scheme\":\"https\"}]}],\"package\":\"xyz.blueskyweb.app\",\"splash\":{\"backgroundColor\":\"#0c7cff\",\"dark\":{\"backgroundColor\":\"#0f141b\",\"image\":\"./assets/splash-dark.png\",\"resizeMode\":\"cover\"},\"image\":\"./assets/splash.png\",\"resizeMode\":\"cover\"}},\"androidStatusBar\":{\"backgroundColor\":\"#00000000\",\"barStyle\":\"light-content\"},\"assetBundlePatterns\":[\"**/*\"],\"extra\":{\"eas\":{\"build\":{\"experimental\":{\"ios\":{\"appExtensions\":[{\"bundleIdentifier\":\"xyz.blueskyweb.app.Share-with-Bluesky\",\"entitlements\":{\"com.apple.security.application-groups\":[\"group.app.bsky\"]},\"targetName\":\"Share-with-Bluesky\"}]}}},\"projectId\":\"55bd077a-d905-4184-9c7f-94789ba0f302\"}},\"hooks\":{\"postPublish\":[{\"config\":{\"dist\":\"undefined.1.73.0.undefined\",\"organization\":\"blueskyweb\",\"project\":\"react-native\",\"release\":\"1.73.0\"},\"file\":\"sentry-expo/upload-sourcemaps\"}]},\"icon\":\"./assets/icon.png\",\"ios\":{\"associatedDomains\":[\"applinks:bsky.app\",\"applinks:staging.bsky.app\"],\"bundleIdentifier\":\"xyz.blueskyweb.app\",\"config\":{\"usesNonExemptEncryption\":false},\"entitlements\":{\"com.apple.security.application-groups\":\"group.app.bsky\"},\"infoPlist\":{\"NSCameraUsageDescription\":\"Used for profile pictures, posts, and other kinds of content.\",\"NSMicrophoneUsageDescription\":\"Used for posts and other kinds of content.\",\"NSPhotoLibraryAddUsageDescription\":\"Used to save images to your library.\",\"NSPhotoLibraryUsageDescription\":\"Used for profile pictures, posts, and other kinds of content\",\"UIBackgroundModes\":[\"remote-notification\"]},\"splash\":{\"backgroundColor\":\"#ffffff\",\"dark\":{\"backgroundColor\":\"#001429\",\"image\":\"./assets/splash-dark.png\",\"resizeMode\":\"cover\"},\"image\":\"./assets/splash.png\",\"resizeMode\":\"cover\"},\"supportsTablet\":false},\"name\":\"Bluesky\",\"orientation\":\"portrait\",\"owner\":\"blueskysocial\",\"platforms\":[\"android\",\"ios\",\"web\"],\"plugins\":[\"./plugins/shareExtension/withShareExtensions.js\",\"./plugins/withAndroidManifestFCMIconPlugin.js\",\"./plugins/withAndroidManifestPlugin.js\",\"./plugins/withAndroidStylesWindowBackgroundPlugin.js\",\"expo-localization\",[\"expo-build-properties\",{\"android\":{\"buildToolsVersion\":\"34.0.0\",\"compileSdkVersion\":34,\"kotlinVersion\":\"1.8.0\",\"newArchEnabled\":false,\"targetSdkVersion\":34},\"ios\":{\"deploymentTarget\":\"13.4\",\"newArchEnabled\":false}}],[\"expo-notifications\",{\"color\":\"#1185fe\",\"icon\":\"./assets/icon-android-notification.png\"}]],\"scheme\":\"bluesky\",\"sdkVersion\":\"50.0.0\",\"slug\":\"bluesky\",\"splash\":{\"backgroundColor\":\"#ffffff\",\"image\":\"./assets/splash.png\",\"resizeMode\":\"cover\"},\"updates\":{\"checkAutomatically\":\"NEVER\",\"codeSigningCertificate\":\"./code-signing/certificate.pem\",\"codeSigningMetadata\":{\"alg\":\"rsa-v1_5-sha256\",\"keyid\":\"main\"},\"enabled\":false,\"fallbackToCacheTimeout\":30000,\"url\":\"https://updates.bsky.app/manifest\"},\"userInterfaceStyle\":\"automatic\",\"version\":\"1.73.0\",\"web\":{\"favicon\":\"./assets/favicon.png\"}}",
"reasons": [
"expoConfig"
],
"hash": "d59da7540bac6685b669a372fd064d727c41c2cb"
}
] Generated by PR labeler 🤖 |
haileyok
force-pushed
the
hailey/expo-updates
branch
from
March 19, 2024 18:46
de9e913
to
230de84
Compare
Closing in favor of #3291 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Expo Updates
This PR implements the
expo-updates
client into the app. It replies on the Bluesky updates server which uses the expo-updates protocol.I've opted to stray from the default options here and never check automatically at app launch. I'm not certain of the start-time implications across devices and networks if we take that route. I believe that setting the
fallbackToCacheTimeout
to zero would prevent that, but I would rather remain safe and manually check for the update once the app has launched.Once a user opens the app, we set a timeout for 15 seconds that will check for an update. If there is an update available, it will be fetched in the background but will not be used for that launch. We also check for an update each time the user opens the app from the background, assuming that 30 minutes has passed between the last time they opened the app and now.
New updates will be used whenever one of two things happens:
In the first situation, there isn't much thinking that we need to do. In the latter, we use a 30 minute time period to ensure that this wasn't the user backgrounding the app to go watch a short video or something, then come back to the app expecting to be in the same state. A 30 minute period is generally enough time for to feel confident in reloading the app without affecting the user's flow. This only happens if an update is available.
Deploy Process
The deploy process is pretty straight forward.
By having this distinction, we can deploy changes rapidly for testing internally while maintaining the version that production users are using.
Test Plan
Created a TestFlight release and an APK that has an
Alert
at launch. This update was deployed and installed on devices. After restarting the app, the message no longer appears, indicating that the new bundle has been properly installed.We should use this internally on a TestFlight release for a bit before using it in production.