From f91aa37c6bd900bdc4eec1095c9ecd83da2f13f2 Mon Sep 17 00:00:00 2001 From: Hailey Date: Fri, 12 Apr 2024 14:51:53 -0700 Subject: Enable updates for `production` behind `receive_updates` gate (#3496) * add gate type * gate the updates * enable updates in `production` * web placeholder for `useOTAUpdates()` * update comment --- app.config.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'app.config.js') diff --git a/app.config.js b/app.config.js index 9036d5e33..40feed40c 100644 --- a/app.config.js +++ b/app.config.js @@ -42,8 +42,14 @@ module.exports = function (config) { const IS_DEV = process.env.EXPO_PUBLIC_ENV === 'development' const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight' + const IS_PRODUCTION = process.env.EXPO_PUBLIC_ENV === 'production' - const UPDATES_CHANNEL = IS_TESTFLIGHT ? 'testflight' : 'production' + const UPDATES_CHANNEL = IS_TESTFLIGHT + ? 'testflight' + : IS_PRODUCTION + ? 'production' + : undefined + const UPDATES_ENABLED = !!UPDATES_CHANNEL return { expo: { @@ -126,14 +132,12 @@ module.exports = function (config) { }, updates: { url: 'https://updates.bsky.app/manifest', - // TODO Eventually we want to enable this for all environments, but for now it will only be used for - // TestFlight builds - enabled: IS_TESTFLIGHT, + enabled: UPDATES_ENABLED, fallbackToCacheTimeout: 30000, - codeSigningCertificate: IS_TESTFLIGHT + codeSigningCertificate: UPDATES_ENABLED ? './code-signing/certificate.pem' : undefined, - codeSigningMetadata: IS_TESTFLIGHT + codeSigningMetadata: UPDATES_ENABLED ? { keyid: 'main', alg: 'rsa-v1_5-sha256', -- cgit 1.4.1