Expo Documentation on Multiple App Variants 🔗
app.json was converted to app.config.ts
import { ConfigContext, ExpoConfig } from "expo/config";
const IS_DEV = process.env.APP_VARIANT === "development";
const getUniqueIdentifier = () => {
if (IS_DEV) {
return "com.bhashasakhi.app.dev";
}
return "com.bhashasakhi.app";
};
const getAppName = () => {
if (IS_DEV) {
return "(Dev) Bhasha Sakhi";
}
return "Bhasha Sakhi";
};
export default ({ config }: ConfigContext): ExpoConfig => ({
...config,
name: getAppName(),
scheme: IS_DEV ? "bhashasakhi-dev" : "bhashasakhi",
ios: {
bundleIdentifier: getUniqueIdentifier(),
},
android: {
package: getUniqueIdentifier(),
}
eas.json
"build": {
"development": {
"env": {
"APP_VARIANT": "development"
}
},
}
eas build --profile development
package.json{
"scripts": {
"dev": "APP_VARIANT=development npx expo start"
}
}
npm run dev