From c53a0dd33041f1a21896e47b0a6fa49032f05600 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Mon, 1 Apr 2024 14:58:20 +0100 Subject: [PATCH] fix(mobile): Allow android/ios connections over http. #6 --- apps/mobile/app.json | 14 ++++++++++++++ apps/mobile/package.json | 1 + pnpm-lock.yaml | 15 +++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/apps/mobile/app.json b/apps/mobile/app.json index fec59de5..7c0f354e 100644 --- a/apps/mobile/app.json +++ b/apps/mobile/app.json @@ -18,6 +18,12 @@ "bundleIdentifier": "app.hoarder.hoardermobile", "config": { "usesNonExemptEncryption": false + }, + "infoPlist": { + "NSAppTransportSecurity": { + "NSAllowsArbitraryLoads": true, + "NSAllowsLocalNetworking": true + } } }, "android": { @@ -48,6 +54,14 @@ { "photosPermission": "The app access your photo gallary on your request to hoard them." } + ], + [ + "expo-build-properties", + { + "android": { + "usesCleartextTraffic": true + } + } ] ], "extra": { diff --git a/apps/mobile/package.json b/apps/mobile/package.json index 04fd8821..6ccd5622 100644 --- a/apps/mobile/package.json +++ b/apps/mobile/package.json @@ -19,6 +19,7 @@ "class-variance-authority": "^0.7.0", "clsx": "^2.1.0", "expo": "~50.0.11", + "expo-build-properties": "^0.11.1", "expo-config-plugin-ios-share-extension": "^0.0.4", "expo-constants": "~15.4.5", "expo-dev-client": "^3.3.9", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fe1a3187..fc7151ae 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -225,6 +225,9 @@ importers: expo: specifier: ~50.0.11 version: 50.0.11(@babel/core@7.23.9)(@react-native/babel-preset@0.73.21(@babel/core@7.23.9)(@babel/preset-env@7.24.0(@babel/core@7.23.9))) + expo-build-properties: + specifier: ^0.11.1 + version: 0.11.1(expo@50.0.11(@babel/core@7.23.9)(@react-native/babel-preset@0.73.21(@babel/core@7.23.9)(@babel/preset-env@7.24.0(@babel/core@7.23.9)))) expo-config-plugin-ios-share-extension: specifier: ^0.0.4 version: 0.0.4(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.24.0(@babel/core@7.23.9))(react@18.2.0)) @@ -6282,6 +6285,11 @@ packages: expo-asset@9.0.2: resolution: {integrity: sha512-PzYKME1MgUOoUvwtdzhAyXkjXOXGiSYqGKG/MsXwWr0Ef5wlBaBm2DCO9V6KYbng5tBPFu6hTjoRNil1tBOSow==} + expo-build-properties@0.11.1: + resolution: {integrity: sha512-m4j4aEjFaDuBE6KWYMxDhWgLzzSmpE7uHKAwtvXyNmRK+6JKF0gjiXi0sXgI5ngNppDQpsyPFMvqG7uQpRuCuw==} + peerDependencies: + expo: '*' + expo-config-plugin-ios-share-extension@0.0.4: resolution: {integrity: sha512-M/EMG0GiYtqkS/MOu7UA6qg2BHjl9zQesKdvxW2OiBl4xUTSDa4uIRMybN4O4yAJE9pwe0KeQbuS/ORnCZtjMg==} peerDependencies: @@ -20819,6 +20827,13 @@ snapshots: - supports-color dev: false + expo-build-properties@0.11.1(expo@50.0.11(@babel/core@7.23.9)(@react-native/babel-preset@0.73.21(@babel/core@7.23.9)(@babel/preset-env@7.24.0(@babel/core@7.23.9)))): + dependencies: + ajv: 8.12.0 + expo: 50.0.11(@babel/core@7.23.9)(@react-native/babel-preset@0.73.21(@babel/core@7.23.9)(@babel/preset-env@7.24.0(@babel/core@7.23.9))) + semver: 7.6.0 + dev: false + expo-config-plugin-ios-share-extension@0.0.4(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.24.0(@babel/core@7.23.9))(react@18.2.0)): dependencies: '@expo/config-plugins': 5.0.4