diff --git a/app.config.js b/app.config.js
new file mode 100644
index 0000000..707b774
--- /dev/null
+++ b/app.config.js
@@ -0,0 +1,57 @@
+
+const IS_ROME = process.env.APP_VARIANT === 'ROME';
+
+export default ({ config }) => {
+ //console.log("Expo", JSON.stringify(config, null, 2))
+ return ({
+ ...config,
+ name: IS_ROME ? "Rome Mobile" : "ImEX Mobile",
+ slug: IS_ROME ? "rome-mobile" : "imexmobile",
+ extra: {
+ ...config.extra,
+ eas: {
+ ...config.extra.eas,
+ projectId: IS_ROME ? "df105e21-a07f-4425-af10-2200a7704a48" : "ffe01f3a-d507-4698-82cd-da1f1cad450b"
+ }
+ },
+ icon: IS_ROME ? "./assets/RomeIcon.png" : "./assets/logo192noa.png",
+ ios: {
+ ...config.ios,
+ bundleIdentifier: IS_ROME ? "com.rome.mobile" : "com.imex.imexmobile"
+ },
+ android: {
+ ...config.android,
+ package: IS_ROME ? "com.rome.mobile" : "com.imex.imexmobile"
+ },
+ splash: {
+ ...config.splash,
+ image: IS_ROME ? "./assets/RomeSplash.png" : "./assets/ImEXSplash.png" //Make sure these exist
+ },
+ notification: {
+ ...config.notification,
+ icon: IS_ROME ? "./assets/RomeNotificationIcon.png" : "./assets/ImEXNotificationIcon.png" // Make sure these exist
+ },
+ updates: {
+ ...config.updates,
+ url: IS_ROME ? "https://u.expo.dev/df105e21-a07f-4425-af10-2200a7704a48" : "https://u.expo.dev/ffe01f3a-d507-4698-82cd-da1f1cad450b"
+ },
+ web: {
+ ...config.web,
+ favicon: IS_ROME ? "./assets/RomeIcon.png" : "./assets/ImEXlogo192noa.png",
+ config: {
+ ...config.web.config,
+ firebase: {
+ ...config.web.config.firebase,
+ "apiKey": IS_ROME ? "AIzaSyAuLQR9SV5LsVxjU8wh9hvFLdhcAHU6cxE" : "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU",
+ "authDomain": IS_ROME ? "rome-prod-1.firebaseapp.com" : "imex-prod.firebaseapp.com",
+ "projectId": IS_ROME ? "rome-prod-1" : "imex-prod",
+ "storageBucket": IS_ROME ? "rome-prod-1.appspot.com" : "imex-prod.appspot.com",
+ "messagingSenderId": IS_ROME ? "147786367145" : "253497221485",
+ "appId": IS_ROME ? "1:147786367145:web:9d4cba68071c3f29a8a9b8" : "1:253497221485:web:9b65736a635a45ce227a64",
+ "measurementId": IS_ROME ? "G-G8Z9DRHTZS" : "G-96694D66L2"
+ }
+ }
+ }
+
+ })
+};
\ No newline at end of file
diff --git a/app.json b/app.json
index c9e62ba..88207eb 100644
--- a/app.json
+++ b/app.json
@@ -13,7 +13,7 @@
},
"runtimeVersion": "appVersion",
"orientation": "default",
- "icon": "./assets/logo192noa.png",
+ "icon": "./assets/ImEXlogo192noa.png",
"platforms": ["ios", "android"],
"ios": {
"supportsTablet": true,
@@ -38,11 +38,11 @@
]
},
"splash": {
- "image": "./assets/splash.png",
+ "image": "./assets/ImEXsplash.png",
"backgroundColor": "#efefef"
},
"notification": {
- "icon": "./assets/logo192noa.png"
+ "icon": "./assets/ImEXNotificationIcon.png"
},
"updates": {
"fallbackToCacheTimeout": 0,
@@ -50,7 +50,7 @@
},
"assetBundlePatterns": ["**/*"],
"web": {
- "favicon": "./assets/logo192noa.png",
+ "favicon": "./assets/ImEXlogo192noa.png",
"config": {
"firebase": {
"apiKey": "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU",
diff --git a/assets/logo192noa.png b/assets/ImEXNotificationIcon.png
similarity index 100%
rename from assets/logo192noa.png
rename to assets/ImEXNotificationIcon.png
diff --git a/assets/splash.png b/assets/ImEXSplash.png
similarity index 100%
rename from assets/splash.png
rename to assets/ImEXSplash.png
diff --git a/assets/ImEXlogo192noa.png b/assets/ImEXlogo192noa.png
new file mode 100644
index 0000000..ff28f9a
Binary files /dev/null and b/assets/ImEXlogo192noa.png differ
diff --git a/assets/RomeIcon.png b/assets/RomeIcon.png
new file mode 100644
index 0000000..32f5f53
Binary files /dev/null and b/assets/RomeIcon.png differ
diff --git a/assets/RomeOnlineIcon.png b/assets/RomeOnlineIcon.png
new file mode 100644
index 0000000..c48b5e9
Binary files /dev/null and b/assets/RomeOnlineIcon.png differ
diff --git a/assets/RomeSplash.png b/assets/RomeSplash.png
new file mode 100644
index 0000000..2a7804e
Binary files /dev/null and b/assets/RomeSplash.png differ
diff --git a/configs/imex/GoogleService-Info.plist b/configs/imex/GoogleService-Info.plist
new file mode 100644
index 0000000..9b285f7
--- /dev/null
+++ b/configs/imex/GoogleService-Info.plist
@@ -0,0 +1,36 @@
+
+
+
+
+ CLIENT_ID
+ 253497221485-qgnj5ve8q0gk2jsmsbsf8qh1i8q04enq.apps.googleusercontent.com
+ REVERSED_CLIENT_ID
+ com.googleusercontent.apps.253497221485-qgnj5ve8q0gk2jsmsbsf8qh1i8q04enq
+ API_KEY
+ AIzaSyAVKJ2eHZpKxsA0a3qyZImg-ePfuwcuCrE
+ GCM_SENDER_ID
+ 253497221485
+ PLIST_VERSION
+ 1
+ BUNDLE_ID
+ com.imex.imexmobile
+ PROJECT_ID
+ imex-prod
+ STORAGE_BUCKET
+ imex-prod.appspot.com
+ IS_ADS_ENABLED
+
+ IS_ANALYTICS_ENABLED
+
+ IS_APPINVITE_ENABLED
+
+ IS_GCM_ENABLED
+
+ IS_SIGNIN_ENABLED
+
+ GOOGLE_APP_ID
+ 1:253497221485:ios:fcbe67f6c6f7da68227a64
+ DATABASE_URL
+ https://imex-prod.firebaseio.com
+
+
\ No newline at end of file
diff --git a/configs/imex/google-services.json b/configs/imex/google-services.json
new file mode 100644
index 0000000..ddde65b
--- /dev/null
+++ b/configs/imex/google-services.json
@@ -0,0 +1,47 @@
+{
+ "project_info": {
+ "project_number": "253497221485",
+ "firebase_url": "https://imex-prod.firebaseio.com",
+ "project_id": "imex-prod",
+ "storage_bucket": "imex-prod.appspot.com"
+ },
+ "client": [
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:253497221485:android:c48f224bc1afd537227a64",
+ "android_client_info": {
+ "package_name": "com.imex.imexmobile"
+ }
+ },
+ "oauth_client": [
+ {
+ "client_id": "253497221485-1tjt8aflekk0s4d1jibd8p7cbtkoocv1.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ],
+ "api_key": [
+ {
+ "current_key": "AIzaSyDfmdrww4t6cnHbB4yNpJv0qLLRTwzIyUs"
+ }
+ ],
+ "services": {
+ "appinvite_service": {
+ "other_platform_oauth_client": [
+ {
+ "client_id": "253497221485-1tjt8aflekk0s4d1jibd8p7cbtkoocv1.apps.googleusercontent.com",
+ "client_type": 3
+ },
+ {
+ "client_id": "253497221485-qgnj5ve8q0gk2jsmsbsf8qh1i8q04enq.apps.googleusercontent.com",
+ "client_type": 2,
+ "ios_info": {
+ "bundle_id": "com.imex.imexmobile"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "configuration_version": "1"
+}
diff --git a/configs/rome/GoogleService-Info.plist b/configs/rome/GoogleService-Info.plist
new file mode 100644
index 0000000..a36c9f1
--- /dev/null
+++ b/configs/rome/GoogleService-Info.plist
@@ -0,0 +1,34 @@
+
+
+
+
+ CLIENT_ID
+ 147786367145-edt1dv440bco2afusuull5jci42k81v1.apps.googleusercontent.com
+ REVERSED_CLIENT_ID
+ com.googleusercontent.apps.147786367145-edt1dv440bco2afusuull5jci42k81v1
+ API_KEY
+ AIzaSyAGI0-1kPaUR-OnmneKZArgnVBYSLuCqlM
+ GCM_SENDER_ID
+ 147786367145
+ PLIST_VERSION
+ 1
+ BUNDLE_ID
+ com.rome.mobile
+ PROJECT_ID
+ rome-prod-1
+ STORAGE_BUCKET
+ rome-prod-1.appspot.com
+ IS_ADS_ENABLED
+
+ IS_ANALYTICS_ENABLED
+
+ IS_APPINVITE_ENABLED
+
+ IS_GCM_ENABLED
+
+ IS_SIGNIN_ENABLED
+
+ GOOGLE_APP_ID
+ 1:147786367145:ios:ebd3eaac9ad3c2d4a8a9b8
+
+
\ No newline at end of file
diff --git a/configs/rome/google-services.json b/configs/rome/google-services.json
new file mode 100644
index 0000000..85945bd
--- /dev/null
+++ b/configs/rome/google-services.json
@@ -0,0 +1,46 @@
+{
+ "project_info": {
+ "project_number": "147786367145",
+ "project_id": "rome-prod-1",
+ "storage_bucket": "rome-prod-1.appspot.com"
+ },
+ "client": [
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:147786367145:android:61ff82f70f6089eca8a9b8",
+ "android_client_info": {
+ "package_name": "com.rome.mobile"
+ }
+ },
+ "oauth_client": [
+ {
+ "client_id": "147786367145-hsl7bgapakau6ook4cuphu436hqub6dp.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ],
+ "api_key": [
+ {
+ "current_key": "AIzaSyD6_8MQKo4iGtMLmNHq-oLnVns77Aph5a8"
+ }
+ ],
+ "services": {
+ "appinvite_service": {
+ "other_platform_oauth_client": [
+ {
+ "client_id": "147786367145-hsl7bgapakau6ook4cuphu436hqub6dp.apps.googleusercontent.com",
+ "client_type": 3
+ },
+ {
+ "client_id": "147786367145-edt1dv440bco2afusuull5jci42k81v1.apps.googleusercontent.com",
+ "client_type": 2,
+ "ios_info": {
+ "bundle_id": "com.rome.mobile"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "configuration_version": "1"
+}
diff --git a/eas.json b/eas.json
index 5e86621..cdf8ea1 100644
--- a/eas.json
+++ b/eas.json
@@ -22,14 +22,44 @@
},
"test": {
"channel": "test",
- // "android": {
- // "buildType": "apk"
- // },
"autoIncrement": true
},
"production": {
"channel": "production",
"autoIncrement": true
+ },
+ "rome-development": {
+ "developmentClient": true,
+ "channel": "test",
+ "distribution": "internal",
+ "ios": {},
+ "autoIncrement": true,
+ "env": {
+ "APP_VARIANT": "ROME"
+ }
+ },
+ "rome-development-simulator": {
+ "developmentClient": true,
+ "channel": "test",
+ "distribution": "internal",
+ "ios": {
+ "simulator": true
+ },
+ "autoIncrement": true,
+ "env": {
+ "APP_VARIANT": "ROME"
+ }
+ },
+ "rome-test": {
+ "channel": "test",
+ "autoIncrement": true
+ },
+ "rome-production": {
+ "channel": "production",
+ "autoIncrement": true,
+ "env": {
+ "APP_VARIANT": "ROME"
+ }
}
},
"submit": {
diff --git a/env.js b/env.js
index cbfc72e..f285d1b 100644
--- a/env.js
+++ b/env.js
@@ -5,11 +5,6 @@ const ENV = {
API_URL: "https://api.test.imex.online",
uri: "https://db.test.bodyshop.app/v1/graphql",
wsuri: "wss://db.test.bodyshop.app/v1/graphql",
- REACT_APP_CLOUDINARY_ENDPOINT_API:
- "https://api.cloudinary.com/v1_1/bodyshop",
- REACT_APP_CLOUDINARY_ENDPOINT: "https://res.cloudinary.com/bodyshop",
- REACT_APP_CLOUDINARY_API_KEY: "473322739956866",
- REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS: "c_fill,h_250,w_250",
SPLIT_API: "ts615lqgnmk84thn72uk18uu5pgce6e0l4rc",
firebase: {
apiKey: "AIzaSyBw7_GTy7GtQyfkIRPVrWHEGKfcqeyXw0c",
@@ -26,12 +21,6 @@ const ENV = {
API_URL: "https://api.imex.online",
uri: "https://db.imex.online/v1/graphql",
wsuri: "wss://db.imex.online/v1/graphql",
- REACT_APP_CLOUDINARY_ENDPOINT_API:
- "https://api.cloudinary.com/v1_1/bodyshop",
- REACT_APP_CLOUDINARY_ENDPOINT: "https://res.cloudinary.com/bodyshop",
- REACT_APP_CLOUDINARY_API_KEY: "473322739956866",
- SPLIT_API: "et9pjkik6bn67he5evpmpr1agoo7gactphgk",
- REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS: "c_fill,h_250,w_250",
firebase: {
apiKey: "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU",
authDomain: "imex-prod.firebaseapp.com",
@@ -43,11 +32,41 @@ const ENV = {
measurementId: "G-NTWBKG2L0M",
},
},
+ "rometest": {
+ API_URL: "https://api.test.romeonline.io",
+ uri: "https://db.test.romeonline.io/v1/graphql",
+ wsuri: "wss://db.test.romeonline.io/v1/graphql",
+ firebase: {
+ apiKey: "AIzaSyAuLQR9SV5LsVxjU8wh9hvFLdhcAHU6cxE",
+ authDomain: "rome-prod-1.firebaseapp.com",
+ projectId: "rome-prod-1",
+ storageBucket: "rome-prod-1.appspot.com",
+ messagingSenderId: "147786367145",
+ appId: "1:147786367145:web:9d4cba68071c3f29a8a9b8",
+ measurementId: "G-G8Z9DRHTZS",
+ },
+
+ },
+ "romeprod": {
+ API_URL: "https://api.romeonline.io",
+ uri: "https://db.romeonline.io/v1/graphql",
+ wsuri: "wss://db.romeonline.io/v1/graphql",
+ firebase: {
+ apiKey: "AIzaSyAuLQR9SV5LsVxjU8wh9hvFLdhcAHU6cxE",
+ authDomain: "rome-prod-1.firebaseapp.com",
+ projectId: "rome-prod-1",
+ storageBucket: "rome-prod-1.appspot.com",
+ messagingSenderId: "147786367145",
+ appId: "1:147786367145:web:9d4cba68071c3f29a8a9b8",
+ measurementId: "G-G8Z9DRHTZS",
+ },
+ }
};
+const IS_ROME = process.env.APP_VARIANT === 'ROME';
function getEnvVars() {
- if (Updates.channel !== "production") return ENV.test;
- else return ENV.prod;
+ if (Updates.channel !== "production") return IS_ROME ? ENV.rometest : ENV.test;
+ else return IS_ROME ? ENV.romeprod : ENV.prod;
}
-
+console.log(IS_ROME, process.env, "ENV: ", getEnvVars());
export default getEnvVars();
diff --git a/package.json b/package.json
index c2ad513..6f3b4ba 100644
--- a/package.json
+++ b/package.json
@@ -4,11 +4,14 @@
"version": "1.0.0",
"main": "expo-router/entry",
"scripts": {
- "start": "expo start",
+ "start": "expo start --clear",
"android": "expo run:android",
"ios": "expo run:ios",
- "web": "expo start --web",
"eject": "expo eject",
+ "setup:imex": "cp configs/imex/google-services.json ./google-services.json && cp configs/imex/GoogleService-Info.plist ./GoogleService-Info.plist",
+ "setup:rome": "cp configs/rome/google-services.json ./google-services.json && cp configs/rome/GoogleService-Info.plist ./GoogleService-Info.plist",
+ "start:imex": "npm run setup:imex && APP_VARIANT=IMEX npm start",
+ "start:rome": "npm run setup:rome && APP_VARIANT=ROME npm start",
"release:test": "expo publish --release-channel test",
"release:production": "expo publish --release-channel production",
"build:production": "eas build --profile production",