diff --git a/apps/expo/app.config.ts b/apps/expo/app.config.ts new file mode 100644 index 0000000..673d844 --- /dev/null +++ b/apps/expo/app.config.ts @@ -0,0 +1,40 @@ +import { ExpoConfig, ConfigContext } from "@expo/config"; + +const CLERK_PUBLISHABLE_KEY = "your-clerk-publishable-key"; + +const defineConfig = (_ctx: ConfigContext): ExpoConfig => ({ + name: "expo", + slug: "expo", + version: "1.0.0", + orientation: "portrait", + icon: "./assets/icon.png", + userInterfaceStyle: "light", + splash: { + image: "./assets/icon.png", + resizeMode: "contain", + backgroundColor: "#2e026d", + }, + updates: { + fallbackToCacheTimeout: 0, + }, + assetBundlePatterns: ["**/*"], + ios: { + supportsTablet: true, + bundleIdentifier: "your.bundle.identifier", + }, + android: { + adaptiveIcon: { + foregroundImage: "./assets/icon.png", + backgroundColor: "#2e026d", + }, + }, + extra: { + eas: { + projectId: "your-project-id", + }, + CLERK_PUBLISHABLE_KEY, + }, + plugins: ["./expo-plugins/with-modify-gradle.js"], +}); + +export default defineConfig; diff --git a/apps/expo/app.json b/apps/expo/app.json deleted file mode 100644 index d5cedc4..0000000 --- a/apps/expo/app.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "expo": { - "name": "expo", - "slug": "expo", - "version": "1.0.0", - "orientation": "portrait", - "icon": "./assets/icon.png", - "userInterfaceStyle": "light", - "splash": { - "image": "./assets/splash.png", - "resizeMode": "contain", - "backgroundColor": "#ffffff" - }, - "updates": { - "fallbackToCacheTimeout": 0 - }, - "assetBundlePatterns": ["**/*"], - "ios": { - "supportsTablet": true - }, - "android": { - "adaptiveIcon": { - "foregroundImage": "./assets/adaptive-icon.png", - "backgroundColor": "#FFFFFF" - } - }, - "web": { - "favicon": "./assets/favicon.png" - } - } -} diff --git a/apps/expo/assets/adaptive-icon.png b/apps/expo/assets/adaptive-icon.png deleted file mode 100644 index 03d6f6b..0000000 Binary files a/apps/expo/assets/adaptive-icon.png and /dev/null differ diff --git a/apps/expo/assets/favicon.png b/apps/expo/assets/favicon.png deleted file mode 100644 index e75f697..0000000 Binary files a/apps/expo/assets/favicon.png and /dev/null differ diff --git a/apps/expo/assets/icon.png b/apps/expo/assets/icon.png index a0b1526..8ff460d 100644 Binary files a/apps/expo/assets/icon.png and b/apps/expo/assets/icon.png differ diff --git a/apps/expo/assets/splash.png b/apps/expo/assets/splash.png deleted file mode 100644 index 0e89705..0000000 Binary files a/apps/expo/assets/splash.png and /dev/null differ diff --git a/apps/expo/src/_app.tsx b/apps/expo/src/_app.tsx index f04207b..7adfaad 100644 --- a/apps/expo/src/_app.tsx +++ b/apps/expo/src/_app.tsx @@ -7,12 +7,12 @@ import { HomeScreen } from "./screens/home"; import { SignInSignUpScreen } from "./screens/signin"; import { ClerkProvider, SignedIn, SignedOut } from "@clerk/clerk-expo"; import { tokenCache } from "./utils/cache"; -import { CLERK_PUBLISHABLE_KEY } from "./constants"; +import Constants from "expo-constants"; export const App = () => { return ( diff --git a/apps/expo/src/constants.ts b/apps/expo/src/constants.ts deleted file mode 100644 index 1e2629e..0000000 --- a/apps/expo/src/constants.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * URL key for the Clerk auth API. You can find this in your Clerk dashboard: - * https://dashboard.clerk.dev - * - * NOTE: we recommend putting the publishable key here instead of in your .env - * files for two reasons: - * 1. It's okay for this to be "public" (CLERK_SECRET_KEY - * NEVER be public) - * 2. Parsing the .env file in Metro/Expo runs the risk of including the - * variables above that we don't want (and it's obnoxious to do right as a - * result) - */ - -// FOR CLERK APPS AFTER 1/18/2023 pk_test_XXXXXXXXXXXXXXXXXXXXXXXX -export const CLERK_PUBLISHABLE_KEY = undefined; - -if (CLERK_PUBLISHABLE_KEY === undefined) { - throw new Error("CLERK_PUBLISHABLE_KEY is not defined"); -} diff --git a/apps/expo/tsconfig.json b/apps/expo/tsconfig.json index 8249de6..e229ea2 100644 --- a/apps/expo/tsconfig.json +++ b/apps/expo/tsconfig.json @@ -4,5 +4,5 @@ "strict": true, "jsx": "react-native" }, - "include": ["src", "index.ts"] + "include": ["src", "index.ts", "app.config.ts"] }