From a542e2e1fbcf82a697bdbaf6d7889c345120d762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Qu=E1=BB=91c=20Kh=C3=A1nh?= Date: Wed, 7 Aug 2024 10:03:29 +0700 Subject: [PATCH] fix(mobile): refactor expo setup to adapt expo-updates (#214) Note: Set `EXPO_USE_METRO_WORKSPACE_ROOT=0` on EAS for production build, this variable is only necessary on development. https://github.com/expo/eas-cli/issues/2280#issuecomment-2183524390 --- apps/mobile/app.json | 3 +++ apps/mobile/app/_layout.tsx | 5 +++++ apps/mobile/index.js | 6 ------ apps/mobile/package.json | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) delete mode 100644 apps/mobile/index.js diff --git a/apps/mobile/app.json b/apps/mobile/app.json index a874fa0b..791d5728 100644 --- a/apps/mobile/app.json +++ b/apps/mobile/app.json @@ -17,6 +17,9 @@ "bundleIdentifier": "ai.sixpm.app", "config": { "usesNonExemptEncryption": false + }, + "entitlements": { + "com.apple.developer.applesignin": ["Default"] } }, "android": { diff --git a/apps/mobile/app/_layout.tsx b/apps/mobile/app/_layout.tsx index ebcbe824..bb0eba56 100644 --- a/apps/mobile/app/_layout.tsx +++ b/apps/mobile/app/_layout.tsx @@ -1,3 +1,8 @@ +import '@formatjs/intl-locale/polyfill-force' +import '@formatjs/intl-pluralrules/polyfill-force' +import '@formatjs/intl-pluralrules/locale-data/en' +import '@formatjs/intl-pluralrules/locale-data/vi' + import '../global.css' import * as Sentry from '@sentry/react-native' diff --git a/apps/mobile/index.js b/apps/mobile/index.js deleted file mode 100644 index e4f02316..00000000 --- a/apps/mobile/index.js +++ /dev/null @@ -1,6 +0,0 @@ -import '@formatjs/intl-locale/polyfill-force' -import '@formatjs/intl-pluralrules/polyfill-force' -import '@formatjs/intl-pluralrules/locale-data/en' -import '@formatjs/intl-pluralrules/locale-data/vi' - -import 'expo-router/entry' diff --git a/apps/mobile/package.json b/apps/mobile/package.json index d9b6c03d..1b4ffedc 100644 --- a/apps/mobile/package.json +++ b/apps/mobile/package.json @@ -1,6 +1,6 @@ { "name": "@6pm/mobile", - "main": "index.js", + "main": "expo-router/entry", "version": "1.0.0", "scripts": { "start": "expo start -c",