From c4bf3ce1870906ab1719d4639da6f51fe0b16dcf Mon Sep 17 00:00:00 2001 From: Petr Konecny Date: Fri, 16 May 2025 13:57:56 +0200 Subject: [PATCH 1/6] chore: removed old not used config --- app.config.ts | 8 +++++--- eas.json | 9 ++++++++- package.json | 2 ++ pnpm-lock.yaml | 6 ++++++ src/config.ts | 9 --------- src/utils/getStoreLink.ts | 8 ++++---- 6 files changed, 25 insertions(+), 17 deletions(-) delete mode 100644 src/config.ts diff --git a/app.config.ts b/app.config.ts index a09ccef..5b45f03 100644 --- a/app.config.ts +++ b/app.config.ts @@ -32,7 +32,7 @@ const config = { otaUpdateUrl: '', } -const environment = process.env.EXPO_PUBLIC_APP_ENV || 'dev' +const detectedEnvironment = process.env.EXPO_PUBLIC_APP_ENV || 'dev' // your custom fonts const fonts = ['./assets/fonts/Domine-Bold.ttf'] @@ -40,7 +40,9 @@ const fonts = ['./assets/fonts/Domine-Bold.ttf'] // prefetched/embedded assets, can be referenced as source='strv_logo' https://docs.expo.dev/versions/latest/sdk/asset/#configurable-properties const assets = ['./assets/images/strv_logo.png'] -const getEnvironmentInfo = (): { +export const getEnvironmentInfo = ( + environment: Environment, +): { name: ExpoConfig['name'] appIdentifier: IOS['bundleIdentifier'] icon: ExpoConfig['icon'] @@ -62,7 +64,7 @@ const getEnvironmentInfo = (): { } } -const { name, appIdentifier, icon } = getEnvironmentInfo() +const { name, appIdentifier, icon } = getEnvironmentInfo(detectedEnvironment) const plugins: ExpoConfig['plugins'] = [ ['expo-build-properties'], diff --git a/eas.json b/eas.json index d5e7fc9..d1004ef 100644 --- a/eas.json +++ b/eas.json @@ -41,5 +41,12 @@ "environment": "production" } }, - "submit": {} + "submit": { + "production": { + "ios": { + "ascAppId": "", + "appleTeamId": "" + } + } + } } diff --git a/package.json b/package.json index c7d424c..59267ee 100644 --- a/package.json +++ b/package.json @@ -27,9 +27,11 @@ "@dev-plugins/react-native-mmkv": "^0.2.0", "@react-native-community/netinfo": "11.4.1", "expo": "^52.0.44", + "expo-asset": "~11.0.5", "expo-build-properties": "~0.13.2", "expo-constants": "~17.0.8", "expo-dev-client": "~5.0.20", + "expo-font": "~13.0.4", "expo-image": "~2.0.7", "expo-linking": "~7.0.5", "expo-router": "~4.0.20", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9bfdd2b..ec28c57 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,6 +16,9 @@ importers: expo: specifier: ^52.0.44 version: 52.0.44(@babel/core@7.26.0)(@babel/preset-env@7.24.5(@babel/core@7.26.0))(@expo/metro-runtime@4.0.1(react-native@0.76.9(@babel/core@7.26.0)(@babel/preset-env@7.24.5(@babel/core@7.26.0))(@types/react@18.3.18)(react@18.3.1)))(graphql@15.8.0)(react-native@0.76.9(@babel/core@7.26.0)(@babel/preset-env@7.24.5(@babel/core@7.26.0))(@types/react@18.3.18)(react@18.3.1))(react@18.3.1) + expo-asset: + specifier: ~11.0.5 + version: 11.0.5(expo@52.0.44(@babel/core@7.26.0)(@babel/preset-env@7.24.5(@babel/core@7.26.0))(@expo/metro-runtime@4.0.1(react-native@0.76.9(@babel/core@7.26.0)(@babel/preset-env@7.24.5(@babel/core@7.26.0))(@types/react@18.3.18)(react@18.3.1)))(graphql@15.8.0)(react-native@0.76.9(@babel/core@7.26.0)(@babel/preset-env@7.24.5(@babel/core@7.26.0))(@types/react@18.3.18)(react@18.3.1))(react@18.3.1))(react-native@0.76.9(@babel/core@7.26.0)(@babel/preset-env@7.24.5(@babel/core@7.26.0))(@types/react@18.3.18)(react@18.3.1))(react@18.3.1) expo-build-properties: specifier: ~0.13.2 version: 0.13.2(expo@52.0.44(@babel/core@7.26.0)(@babel/preset-env@7.24.5(@babel/core@7.26.0))(@expo/metro-runtime@4.0.1(react-native@0.76.9(@babel/core@7.26.0)(@babel/preset-env@7.24.5(@babel/core@7.26.0))(@types/react@18.3.18)(react@18.3.1)))(graphql@15.8.0)(react-native@0.76.9(@babel/core@7.26.0)(@babel/preset-env@7.24.5(@babel/core@7.26.0))(@types/react@18.3.18)(react@18.3.1))(react@18.3.1)) @@ -25,6 +28,9 @@ importers: expo-dev-client: specifier: ~5.0.20 version: 5.0.20(expo@52.0.44(@babel/core@7.26.0)(@babel/preset-env@7.24.5(@babel/core@7.26.0))(@expo/metro-runtime@4.0.1(react-native@0.76.9(@babel/core@7.26.0)(@babel/preset-env@7.24.5(@babel/core@7.26.0))(@types/react@18.3.18)(react@18.3.1)))(graphql@15.8.0)(react-native@0.76.9(@babel/core@7.26.0)(@babel/preset-env@7.24.5(@babel/core@7.26.0))(@types/react@18.3.18)(react@18.3.1))(react@18.3.1)) + expo-font: + specifier: ~13.0.4 + version: 13.0.4(expo@52.0.44(@babel/core@7.26.0)(@babel/preset-env@7.24.5(@babel/core@7.26.0))(@expo/metro-runtime@4.0.1(react-native@0.76.9(@babel/core@7.26.0)(@babel/preset-env@7.24.5(@babel/core@7.26.0))(@types/react@18.3.18)(react@18.3.1)))(graphql@15.8.0)(react-native@0.76.9(@babel/core@7.26.0)(@babel/preset-env@7.24.5(@babel/core@7.26.0))(@types/react@18.3.18)(react@18.3.1))(react@18.3.1))(react@18.3.1) expo-image: specifier: ~2.0.7 version: 2.0.7(expo@52.0.44(@babel/core@7.26.0)(@babel/preset-env@7.24.5(@babel/core@7.26.0))(@expo/metro-runtime@4.0.1(react-native@0.76.9(@babel/core@7.26.0)(@babel/preset-env@7.24.5(@babel/core@7.26.0))(@types/react@18.3.18)(react@18.3.1)))(graphql@15.8.0)(react-native@0.76.9(@babel/core@7.26.0)(@babel/preset-env@7.24.5(@babel/core@7.26.0))(@types/react@18.3.18)(react@18.3.1))(react@18.3.1))(react-native-web@0.19.13(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-native@0.76.9(@babel/core@7.26.0)(@babel/preset-env@7.24.5(@babel/core@7.26.0))(@types/react@18.3.18)(react@18.3.1))(react@18.3.1) diff --git a/src/config.ts b/src/config.ts deleted file mode 100644 index 4a00b5b..0000000 --- a/src/config.ts +++ /dev/null @@ -1,9 +0,0 @@ -import Constants from 'expo-constants' - -export const env = { APP_ENV: process.env.EXPO_PUBLIC_APP_ENV } - -export const config = { - applicationIdProd: 'com.expo.template', - appleIdProd: '123456789', - installedAppVersion: Constants.expoConfig?.version, -} diff --git a/src/utils/getStoreLink.ts b/src/utils/getStoreLink.ts index 9e1cc0a..f9c411c 100644 --- a/src/utils/getStoreLink.ts +++ b/src/utils/getStoreLink.ts @@ -1,9 +1,9 @@ +import { getEnvironmentInfo } from 'app.config' +import easJson from 'eas.json' import { Platform } from 'react-native' -import { config } from '~/config' - -const applicationIdProd = config.applicationIdProd -const appleIdProd = config.appleIdProd +const applicationIdProd = getEnvironmentInfo('production').appIdentifier +const appleIdProd = easJson.submit.production.ios.ascAppId type StoreLink = { storeURI: string From ef60625e11564788ff28ef7556785d7370aa66b1 Mon Sep 17 00:00:00 2001 From: Petr Konecny Date: Fri, 16 May 2025 14:12:53 +0200 Subject: [PATCH 2/6] chore: added placeholder values --- eas.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eas.json b/eas.json index d1004ef..a8a9ccd 100644 --- a/eas.json +++ b/eas.json @@ -44,8 +44,8 @@ "submit": { "production": { "ios": { - "ascAppId": "", - "appleTeamId": "" + "ascAppId": "1234567890", + "appleTeamId": "1234567890" } } } From d2a02990cff6c75c0aa7bd091e4c550522ffc356 Mon Sep 17 00:00:00 2001 From: Petr Konecny Date: Fri, 16 May 2025 14:15:49 +0200 Subject: [PATCH 3/6] chore: debug --- app.config.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/app.config.ts b/app.config.ts index 5b45f03..4d77575 100644 --- a/app.config.ts +++ b/app.config.ts @@ -15,23 +15,23 @@ declare const process: { } // Template defaults uncomment if you are working on the template -// const config = { -// appIdentifierBase: 'com.strv.rntemplate', -// expoProjectId: '46e1c780-9495-4650-93c8-7f465bf4e1d0', -// expoProjectOwner: 'strv-internal', -// appScheme: 'template-react-native-expo', -// otaUpdateUrl: 'https://u.expo.dev/46e1c780-9495-4650-93c8-7f465bf4e1d0', -// } - -// Your project defaults const config = { - appIdentifierBase: undefined, - expoProjectId: undefined, - expoProjectOwner: undefined, - appScheme: '', - otaUpdateUrl: '', + appIdentifierBase: 'com.strv.rntemplate', + expoProjectId: '46e1c780-9495-4650-93c8-7f465bf4e1d0', + expoProjectOwner: 'strv-internal', + appScheme: 'template-react-native-expo', + otaUpdateUrl: 'https://u.expo.dev/46e1c780-9495-4650-93c8-7f465bf4e1d0', } +// Your project defaults +// const config = { +// appIdentifierBase: undefined, +// expoProjectId: undefined, +// expoProjectOwner: undefined, +// appScheme: '', +// otaUpdateUrl: '', +// } + const detectedEnvironment = process.env.EXPO_PUBLIC_APP_ENV || 'dev' // your custom fonts From f1a89de8a93610f3faf670dd86fbc80a3e6941c2 Mon Sep 17 00:00:00 2001 From: Petr Konecny Date: Fri, 16 May 2025 14:19:06 +0200 Subject: [PATCH 4/6] chore: debug --- eas.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/eas.json b/eas.json index a8a9ccd..b14b0af 100644 --- a/eas.json +++ b/eas.json @@ -42,6 +42,16 @@ } }, "submit": { + "staging": { + "ios": { + "ascAppId": "6670311845", + "appleTeamId": "EAVQTDVRT7" + }, + "android": { + "track": "internal", + "releaseStatus": "draft" + } + }, "production": { "ios": { "ascAppId": "1234567890", From e0bef24e83dd4012b16f2eabed0a97ec1e63d195 Mon Sep 17 00:00:00 2001 From: Petr Konecny Date: Fri, 16 May 2025 14:51:04 +0200 Subject: [PATCH 5/6] Revert "chore: debug" This reverts commit d2a02990cff6c75c0aa7bd091e4c550522ffc356. --- app.config.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/app.config.ts b/app.config.ts index 4d77575..5b45f03 100644 --- a/app.config.ts +++ b/app.config.ts @@ -15,23 +15,23 @@ declare const process: { } // Template defaults uncomment if you are working on the template -const config = { - appIdentifierBase: 'com.strv.rntemplate', - expoProjectId: '46e1c780-9495-4650-93c8-7f465bf4e1d0', - expoProjectOwner: 'strv-internal', - appScheme: 'template-react-native-expo', - otaUpdateUrl: 'https://u.expo.dev/46e1c780-9495-4650-93c8-7f465bf4e1d0', -} - -// Your project defaults // const config = { -// appIdentifierBase: undefined, -// expoProjectId: undefined, -// expoProjectOwner: undefined, -// appScheme: '', -// otaUpdateUrl: '', +// appIdentifierBase: 'com.strv.rntemplate', +// expoProjectId: '46e1c780-9495-4650-93c8-7f465bf4e1d0', +// expoProjectOwner: 'strv-internal', +// appScheme: 'template-react-native-expo', +// otaUpdateUrl: 'https://u.expo.dev/46e1c780-9495-4650-93c8-7f465bf4e1d0', // } +// Your project defaults +const config = { + appIdentifierBase: undefined, + expoProjectId: undefined, + expoProjectOwner: undefined, + appScheme: '', + otaUpdateUrl: '', +} + const detectedEnvironment = process.env.EXPO_PUBLIC_APP_ENV || 'dev' // your custom fonts From 586c0f0fc12735ebb717a3541a7618b7f6c116b5 Mon Sep 17 00:00:00 2001 From: Petr Konecny Date: Fri, 16 May 2025 14:51:12 +0200 Subject: [PATCH 6/6] Revert "chore: debug" This reverts commit f1a89de8a93610f3faf670dd86fbc80a3e6941c2. --- eas.json | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/eas.json b/eas.json index b14b0af..a8a9ccd 100644 --- a/eas.json +++ b/eas.json @@ -42,16 +42,6 @@ } }, "submit": { - "staging": { - "ios": { - "ascAppId": "6670311845", - "appleTeamId": "EAVQTDVRT7" - }, - "android": { - "track": "internal", - "releaseStatus": "draft" - } - }, "production": { "ios": { "ascAppId": "1234567890",