app.config.ts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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.1',
  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. splash: {
  31. image: './assets/splash.png',
  32. resizeMode: 'cover'
  33. },
  34. notification: {
  35. icon: './assets/notification-icon.png'
  36. },
  37. updates: {
  38. url: 'https://u.expo.dev/c31c6828-3c32-4c7a-aabc-f9b8336b3b66'
  39. },
  40. platforms: ['ios', 'android'],
  41. assetBundlePatterns: ['**/*'],
  42. ios: {
  43. supportsTablet: true,
  44. bundleIdentifier: env.PACKAGE_NAME,
  45. infoPlist: {
  46. UIBackgroundModes: ['fetch'],
  47. NSLocationAlwaysUsageDescription:
  48. 'Turn on location service to allow NomadMania.com find friends nearby.',
  49. NSPhotoLibraryUsageDescription:
  50. 'Enable NomadMania.com to access your photo library to upload your profile picture. Any violence, excess of nudity, stolen picture, or scam is forbidden',
  51. NSPhotoLibraryAddUsageDescription:
  52. 'Enable NomadMania.com to access your photo library to upload your profile picture. Any violence, excess of nudity, stolen picture, or scam is forbidden',
  53. NSPushNotificationsDescription:
  54. 'This will allow NomadMania.com to send you notifications. Also you can disable it in app settings'
  55. }
  56. },
  57. android: {
  58. package: env.PACKAGE_NAME,
  59. permissions: [
  60. 'ACCESS_BACKGROUND_LOCATION',
  61. 'ACCESS_FINE_LOCATION',
  62. 'ACCESS_COARSE_LOCATION',
  63. 'READ_EXTERNAL_STORAGE',
  64. 'WRITE_EXTERNAL_STORAGE',
  65. 'NOTIFICATIONS',
  66. 'USER_FACING_NOTIFICATIONS',
  67. 'INTERNET',
  68. 'CAMERA'
  69. ]
  70. },
  71. plugins: [
  72. [
  73. 'expo-image-picker',
  74. {
  75. photosPermission: 'Allow NomadMania.com access to your photo library to upload photos.',
  76. cameraPermission: 'Allow NomadMania.com access to your camera to upload photos directly.'
  77. }
  78. ]
  79. ]
  80. });