Skip to content

Instantly share code, notes, and snippets.

@wcastand
Created September 17, 2025 12:40
Show Gist options
  • Select an option

  • Save wcastand/279ef087c3c2895af50f13274aaa9aa8 to your computer and use it in GitHub Desktop.

Select an option

Save wcastand/279ef087c3c2895af50f13274aaa9aa8 to your computer and use it in GitHub Desktop.
import type { ExpoConfig } from "@expo/config"
const APP_VERSION = "..."
const IS_DEV = process.env.EXPO_PUBLIC_APP_VARIANT !== "production"
const PRIMARY_COLOR = "..."
export default (): ExpoConfig => ({
android: {
adaptiveIcon: {
backgroundColor: PRIMARY_COLOR,
foregroundImage: IS_DEV ? "./assets/icons/adaptive-icon-dark.png" : "./assets/icons/adaptive-icon-light.png",
},
googleServicesFile: "...",
intentFilters: [
{
action: "VIEW",
autoVerify: true,
category: ["BROWSABLE", "DEFAULT"],
data: [
{
host: "...",
pathPrefix: "/mobile-app",
scheme: "https",
},
],
},
],
package: "...",
permissions: [
"CAMERA",
"INTERNET",
"RECORD_AUDIO",
"MODIFY_AUDIO_SETTINGS",
"CAMERA_ROLL",
"VIBRATE",
"READ_EXTERNAL_STORAGE",
"WRITE_EXTERNAL_STORAGE",
"com.google.android.c2dm.permission.RECEIVE",
],
softwareKeyboardLayoutMode: "resize",
},
assetBundlePatterns: ["**/*"],
developmentClient: { silentLaunch: true },
experiments: {
reactCanary: false,
reactCompiler: true,
remoteBuildCache: {
provider: "eas",
},
tsconfigPaths: true,
typedRoutes: true,
},
extra: {
eas: { projectId:"..." },
},
githubUrl: "...",
icon: IS_DEV ? "./assets/icons/ios-light-staging.png" : "./assets/icons/ios-light.png",
ios: {
appleTeamId: "...",
associatedDomains: ["..."],
bundleIdentifier: "...",
entitlements: {
"com.apple.developer.pass-type-identifiers": [],
"com.apple.developer.payment-pass-provisioning": true,
},
icon: {
dark: IS_DEV ? "./assets/icons/ios-dark-staging.png" : "./assets/icons/ios-dark.png",
light: IS_DEV ? "./assets/icons/ios-light-staging.png" : "./assets/icons/ios-light.png",
tinted: "./assets/icons/ios-tinted.png",
},
infoPlist: {
AppStoreCountry: "fr",
AppStoreID: "...",
CADisableMinimumFrameDurationOnPhone: true,
CFBundleAllowMixedLocalizations: true,
CFBundleLocalizations: ["fr"],
IntercomUniversalLinkDomains: ["..."],
ITSAppUsesNonExemptEncryption: false,
LSApplicationQueriesSchemes: ["..."],
NSCameraUsageDescription: "To create your account",
NSFaceIDUsageDescription: "To authenticate you",
NSPhotoLibraryUsageDescription: "To upload your documents",
UIBackgroundModes: ["remote-notification"],
},
privacyManifests: {
NSPrivacyAccessedAPITypes: [
{
NSPrivacyAccessedAPIType: "NSPrivacyAccessedAPICategoryUserDefaults",
NSPrivacyAccessedAPITypeReasons: ["CA92.1"],
},
{
NSPrivacyAccessedAPIType: "NSPrivacyAccessedAPICategorySystemBootTime",
NSPrivacyAccessedAPITypeReasons: ["35F9.1"],
},
{
NSPrivacyAccessedAPIType: "NSPrivacyAccessedAPICategoryFileTimestamp",
NSPrivacyAccessedAPITypeReasons: ["C617.1"],
},
],
NSPrivacyCollectedDataTypes: [
{
NSPrivacyCollectedDataType: "NSPrivacyCollectedDataTypeCrashData",
NSPrivacyCollectedDataTypeLinked: false,
NSPrivacyCollectedDataTypePurposes: ["NSPrivacyCollectedDataTypePurposeAppFunctionality"],
NSPrivacyCollectedDataTypeTracking: false,
},
{
NSPrivacyCollectedDataType: "NSPrivacyCollectedDataTypePerformanceData",
NSPrivacyCollectedDataTypeLinked: false,
NSPrivacyCollectedDataTypePurposes: ["NSPrivacyCollectedDataTypePurposeAppFunctionality"],
NSPrivacyCollectedDataTypeTracking: false,
},
{
NSPrivacyCollectedDataType: "NSPrivacyCollectedDataTypeOtherDiagnosticData",
NSPrivacyCollectedDataTypeLinked: false,
NSPrivacyCollectedDataTypePurposes: ["NSPrivacyCollectedDataTypePurposeAppFunctionality"],
NSPrivacyCollectedDataTypeTracking: false,
},
],
},
supportsTablet: false,
},
name: "...",
newArchEnabled: true,
notification: {
iosDisplayInForeground: true,
},
orientation: "portrait",
owner: "...",
plugins: [
[
"expo-build-properties",
{
ios: {
useFrameworks: "static",
},
},
],
"expo-asset",
[
"expo-splash-screen",
{
backgroundColor: "#CDFB6E",
dark: {
backgroundColor: "#040600",
image: "./assets/icons/splash-icon-dark.png",
},
image: "./assets/icons/splash-icon-light.png",
imageWidth: 200,
},
],
[
"expo-font",
{
fonts: [
"node_modules/@expo-google-fonts/instrument-sans/400Regular/InstrumentSans_400Regular.ttf",
"node_modules/@expo-google-fonts/instrument-sans/400Regular_Italic/InstrumentSans_400Regular_Italic.ttf",
"node_modules/@expo-google-fonts/instrument-sans/500Medium/InstrumentSans_500Medium.ttf",
"node_modules/@expo-google-fonts/instrument-sans/500Medium_Italic/InstrumentSans_500Medium_Italic.ttf",
"node_modules/@expo-google-fonts/instrument-sans/600SemiBold/InstrumentSans_600SemiBold.ttf",
"node_modules/@expo-google-fonts/instrument-sans/600SemiBold_Italic/InstrumentSans_600SemiBold_Italic.ttf",
"node_modules/@expo-google-fonts/instrument-sans/700Bold/InstrumentSans_700Bold.ttf",
"node_modules/@expo-google-fonts/instrument-sans/700Bold_Italic/InstrumentSans_700Bold_Italic.ttf",
],
},
],
"expo-web-browser",
"expo-background-task",
"expo-localization",
[
"expo-quick-actions",
{
androidIcons: {
shortcut_compose: {
backgroundColor: PRIMARY_COLOR,
foregroundImage: "./assets/icons/adaptive-icon-light.png",
},
},
},
],
[
"expo-notifications",
{
color: "#FFFFFF",
enableBackgroundRemoteNotifications: true,
icon: "./assets/icons/notif-icon.png",
},
],
[
"expo-secure-store",
{
faceIDPermission:"...",
},
],
[
"react-native-edge-to-edge",
{
android: {
parentTheme: "Material3",
},
},
],
[
"expo-router",
{
asyncRoutes: false,
origin: "...",
sitemap: IS_DEV,
},
],
"@config-plugins/react-native-blob-util",
"@config-plugins/react-native-pdf",
[
"@stripe/stripe-react-native",
{
enableGooglePay: true,
merchantIdentifier: "...",
},
],
[
"customerio-expo-plugin",
{
config: {
cdpApiKey: process.env.CUSTOMER_IO_API_KEY,
region: "eu",
siteId: process.env.CUSTOMER_IO_SITE_ID,
},
},
],
[
"@intercom/intercom-react-native",
IS_DEV
? {
androidApiKey: "...",
appId: "...",
iosApiKey: "...",
}
: {
androidApiKey: "...",
appId: "...",
iosApiKey: "...",
},
],
"./plugins/build/google-pay-kit.plugin.js",
"./plugins/build/android-secure-flag.plugin.js",
"./plugins/build/android-fix-universal-link.plugin.js",
"./plugins/build/android-faster-startup-no-bundle.js",
"./plugins/build/android-remove-text-color.js",
"./plugins/build/android-res-config.js",
"./plugins/build/datadog-native-initialization.js",
["expo-datadog"],
],
primaryColor: PRIMARY_COLOR,
runtimeVersion: APP_VERSION,
scheme: "...",
slug: "green-got",
updates: {
checkAutomatically: "ON_ERROR_RECOVERY",
disableAntiBrickingMeasures: IS_DEV,
enabled: true,
fallbackToCacheTimeout: 0,
url: "..."
},
userInterfaceStyle: "automatic",
version: APP_VERSION,
})
// config.babel.js
module.exports = (api) => {
api.cache(true)
return {
plugins: [
"@legendapp/state/babel",
[
"@tamagui/babel-plugin",
{
components: ["@tamagui/core"],
config: "./src/tamagui/tamagui.config.ts",
disableExtraction: process.env.NODE_ENV === "development",
logTimings: false,
},
],
"@lingui/babel-plugin-lingui-macro",
"@babel/plugin-transform-export-namespace-from",
],
presets: [
[
"babel-preset-expo",
{
lazyImports: true,
},
],
],
}
}
const { wrapWithReanimatedMetroConfig } = require("react-native-reanimated/metro-config")
const { getDatadogExpoConfig } = require("@datadog/mobile-react-native/metro")
const { withRozenite } = require("@rozenite/metro")
const config = getDatadogExpoConfig(__dirname, {
annotateReactComponents: true,
isCSSEnabled: true,
})
config.transformer.minifierConfig = {
compress: {
drop_console: true,
},
}
config.transformer.babelTransformerPath = require.resolve("@lingui/metro-transformer/expo")
config.resolver.assetExts.push("svg")
config.resolver.sourceExts.push("mjs")
config.resolver.sourceExts.push("po")
config.resolver.sourceExts.push("pot")
config.resolver.unstable_enablePackageExports = true
config.resolver.resolveRequest = (context, moduleImport, platform) => {
switch (moduleImport) {
case "@lingui/core":
case "@lingui/react":
return { filePath: require.resolve(moduleImport), type: "sourceFile" }
default:
return context.resolveRequest(context, moduleImport, platform)
}
}
module.exports = withRozenite(wrapWithReanimatedMetroConfig(config))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment