|
@@ -1,43 +1,84 @@
|
|
|
import 'dotenv/config';
|
|
|
-import type { ConfigContext, ExpoConfig } from 'expo/config';
|
|
|
import { env } from 'process';
|
|
|
+import path from 'path';
|
|
|
+import dotenv from 'dotenv';
|
|
|
+
|
|
|
+import type { ConfigContext, ExpoConfig } from 'expo/config';
|
|
|
+
|
|
|
+const API_HOST = env.ENV === 'production' ? env.PRODUCTION_API_HOST : env.DEVELOPMENT_API_HOST;
|
|
|
+
|
|
|
+dotenv.config({
|
|
|
+ path: path.resolve(process.cwd(), '.env')
|
|
|
+});
|
|
|
|
|
|
export default ({ config }: ConfigContext): ExpoConfig => ({
|
|
|
...config,
|
|
|
- name: 'nomadmania-app',
|
|
|
+ name: 'NomadMania',
|
|
|
slug: 'nomadmania-app',
|
|
|
+ owner: 'nomadmania',
|
|
|
+ scheme: 'nm',
|
|
|
+ // Should be updated after every production release (deploy to AppStore/PlayMarket)
|
|
|
version: '1.0.0',
|
|
|
+ // Should be updated after every dependency change
|
|
|
+ runtimeVersion: '1.1',
|
|
|
orientation: 'portrait',
|
|
|
icon: './assets/icon.png',
|
|
|
userInterfaceStyle: 'light',
|
|
|
- plugins: [
|
|
|
- [
|
|
|
- 'expo-image-picker',
|
|
|
- {
|
|
|
- photosPermission: 'The app accesses your photos to let you share them with your friends.',
|
|
|
- cameraPermission: 'The app accesses your photos to let you share them with your friends.'
|
|
|
- }
|
|
|
- ]
|
|
|
- ],
|
|
|
extra: {
|
|
|
- API_HOST: env.API_HOST
|
|
|
+ ENV: env.ENV,
|
|
|
+ API_HOST: API_HOST,
|
|
|
+ eas: {
|
|
|
+ projectId: env.EAS_PROJECT_ID
|
|
|
+ }
|
|
|
},
|
|
|
splash: {
|
|
|
image: './assets/splash.png',
|
|
|
- resizeMode: 'contain',
|
|
|
- backgroundColor: '#ffffff'
|
|
|
+ resizeMode: 'cover'
|
|
|
+ },
|
|
|
+ notification: {
|
|
|
+ icon: './assets/notification-icon.png'
|
|
|
+ },
|
|
|
+ updates: {
|
|
|
+ url: 'https://u.expo.dev/c31c6828-3c32-4c7a-aabc-f9b8336b3b66'
|
|
|
},
|
|
|
+ platforms: ['ios', 'android'],
|
|
|
assetBundlePatterns: ['**/*'],
|
|
|
ios: {
|
|
|
- supportsTablet: true
|
|
|
+ supportsTablet: true,
|
|
|
+ bundleIdentifier: env.PACKAGE_NAME,
|
|
|
+ infoPlist: {
|
|
|
+ UIBackgroundModes: ['fetch'],
|
|
|
+ NSLocationAlwaysUsageDescription:
|
|
|
+ 'Turn on location service to allow NomadMania.com find friends nearby.',
|
|
|
+ NSPhotoLibraryUsageDescription:
|
|
|
+ 'Enable NomadMania.com to access your photo library to upload your profile picture. Any violence, excess of nudity, stolen picture, or scam is forbidden',
|
|
|
+ NSPhotoLibraryAddUsageDescription:
|
|
|
+ 'Enable NomadMania.com to access your photo library to upload your profile picture. Any violence, excess of nudity, stolen picture, or scam is forbidden',
|
|
|
+ NSPushNotificationsDescription:
|
|
|
+ 'This will allow NomadMania.com to send you notifications. Also you can disable it in app settings'
|
|
|
+ }
|
|
|
},
|
|
|
android: {
|
|
|
- adaptiveIcon: {
|
|
|
- foregroundImage: './assets/adaptive-icon.png',
|
|
|
- backgroundColor: '#ffffff'
|
|
|
- }
|
|
|
+ package: env.PACKAGE_NAME,
|
|
|
+ permissions: [
|
|
|
+ 'ACCESS_BACKGROUND_LOCATION',
|
|
|
+ 'ACCESS_FINE_LOCATION',
|
|
|
+ 'ACCESS_COARSE_LOCATION',
|
|
|
+ 'READ_EXTERNAL_STORAGE',
|
|
|
+ 'WRITE_EXTERNAL_STORAGE',
|
|
|
+ 'NOTIFICATIONS',
|
|
|
+ 'USER_FACING_NOTIFICATIONS',
|
|
|
+ 'INTERNET',
|
|
|
+ 'CAMERA'
|
|
|
+ ]
|
|
|
},
|
|
|
- web: {
|
|
|
- favicon: './assets/favicon.png'
|
|
|
- }
|
|
|
+ plugins: [
|
|
|
+ [
|
|
|
+ 'expo-image-picker',
|
|
|
+ {
|
|
|
+ photosPermission: 'Allow NomadMania.com access to your photo library to upload photos.',
|
|
|
+ cameraPermission: 'Allow NomadMania.com access to your camera to upload photos directly.'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ ]
|
|
|
});
|