app.config.ts 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. import 'dotenv/config';
  2. import { env } from 'process';
  3. import path from 'path';
  4. import dotenv from 'dotenv';
  5. import type { ConfigContext, ExpoConfig } from 'expo/config';
  6. const API_HOST = env.ENV === 'production' ? env.PRODUCTION_API_HOST : env.DEVELOPMENT_API_HOST;
  7. dotenv.config({
  8. path: path.resolve(process.cwd(), '.env')
  9. });
  10. export default ({ config }: ConfigContext): ExpoConfig => ({
  11. ...config,
  12. name: 'NomadMania',
  13. slug: 'nomadmania-app',
  14. owner: 'nomadmania',
  15. scheme: 'nm',
  16. // Should be updated after every production release (deploy to AppStore/PlayMarket)
  17. version: '1.0.0',
  18. // Should be updated after every dependency change
  19. runtimeVersion: '1.2',
  20. orientation: 'portrait',
  21. icon: './assets/icon.png',
  22. userInterfaceStyle: 'light',
  23. extra: {
  24. ENV: env.ENV,
  25. API_HOST: API_HOST,
  26. eas: {
  27. projectId: env.EAS_PROJECT_ID
  28. }
  29. },
  30. experiments: {
  31. tsconfigPaths: true
  32. },
  33. splash: {
  34. image: './assets/splash.png',
  35. resizeMode: 'cover'
  36. },
  37. notification: {
  38. icon: './assets/notification-icon.png'
  39. },
  40. updates: {
  41. url: 'https://u.expo.dev/c31c6828-3c32-4c7a-aabc-f9b8336b3b66'
  42. },
  43. platforms: ['ios', 'android'],
  44. assetBundlePatterns: ['**/*'],
  45. ios: {
  46. supportsTablet: true,
  47. bundleIdentifier: env.PACKAGE_NAME,
  48. config: {
  49. googleMapsApiKey: env.IOS_GOOGLE_MAP_APIKEY
  50. },
  51. infoPlist: {
  52. UIBackgroundModes: ['fetch'],
  53. NSLocationAlwaysUsageDescription:
  54. 'Turn on location service to allow NomadMania.com find friends nearby.',
  55. NSPhotoLibraryUsageDescription:
  56. 'Enable NomadMania.com to access your photo library to upload your profile picture. Any violence, excess of nudity, stolen picture, or scam is forbidden',
  57. NSPhotoLibraryAddUsageDescription:
  58. 'Enable NomadMania.com to access your photo library to upload your profile picture. Any violence, excess of nudity, stolen picture, or scam is forbidden',
  59. NSPushNotificationsDescription:
  60. 'This will allow NomadMania.com to send you notifications. Also you can disable it in app settings'
  61. }
  62. },
  63. android: {
  64. package: env.PACKAGE_NAME,
  65. config: {
  66. googleMaps: {
  67. apiKey: env.ANDROID_GOOGLE_MAP_APIKEY
  68. }
  69. },
  70. permissions: [
  71. 'ACCESS_BACKGROUND_LOCATION',
  72. 'ACCESS_FINE_LOCATION',
  73. 'ACCESS_COARSE_LOCATION',
  74. 'READ_EXTERNAL_STORAGE',
  75. 'WRITE_EXTERNAL_STORAGE',
  76. 'NOTIFICATIONS',
  77. 'USER_FACING_NOTIFICATIONS',
  78. 'INTERNET',
  79. 'CAMERA'
  80. ]
  81. },
  82. plugins: [
  83. [
  84. 'expo-image-picker',
  85. {
  86. photosPermission: 'Allow NomadMania.com access to your photo library to upload photos.',
  87. cameraPermission: 'Allow NomadMania.com access to your camera to upload photos directly.'
  88. }
  89. ]
  90. ]
  91. });