Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Remove Photos native Dio adapter

Neeraj Gupta337eac88ce45
diff --git a/mobile/apps/photos/ios/Podfile b/mobile/apps/photos/ios/Podfile
index 5cc80f5799..e43bf87e22 100644
--- a/mobile/apps/photos/ios/Podfile
+++ b/mobile/apps/photos/ios/Podfile
@@ -53,23 +53,4 @@ post_install do |installer|
end
- # Temporary Flutter 3.32.8 arm64-simulator workaround.
- # Remove once the app is on Flutter 3.38+ and these frameworks load normally.
- installer.aggregate_targets.each do |aggregate_target|
- aggregate_target.user_project.native_targets.each do |target|
- next unless target.name == 'Runner'
-
- force_link_flags = [
- '$(inherited)',
- '-Wl,-needed_framework,cupertino_http',
- '-Wl,-needed_framework,objective_c',
- ]
-
- target.build_configurations.each do |config|
- config.build_settings['OTHER_LDFLAGS[sdk=iphonesimulator*]'] = force_link_flags
- end
- end
-
- aggregate_target.user_project.save
- end
end
diff --git a/mobile/apps/photos/ios/Podfile.lock b/mobile/apps/photos/ios/Podfile.lock
index 4e0ae28c1b..b1cfee6ebf 100644
--- a/mobile/apps/photos/ios/Podfile.lock
+++ b/mobile/apps/photos/ios/Podfile.lock
@@ -11,9 +11,6 @@ PODS:
- Flutter
- connectivity_plus (0.0.1):
- Flutter
- - cupertino_http (0.0.1):
- - Flutter
- - FlutterMacOS
- dart_ui_isolate (0.0.1):
- Flutter
- device_info_plus (0.0.1):
@@ -170,8 +167,6 @@ PODS:
- Flutter
- native_video_player (4.0.0):
- Flutter
- - objective_c (0.0.1):
- - Flutter
- onnxruntime (0.0.1):
- Flutter
- onnxruntime-objc (= 1.18.0)
@@ -272,7 +267,6 @@ DEPENDENCIES:
- battery_info (from `.symlinks/plugins/battery_info/ios`)
- camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- - cupertino_http (from `.symlinks/plugins/cupertino_http/darwin`)
- dart_ui_isolate (from `.symlinks/plugins/dart_ui_isolate/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- ente_photos_rust (from `.symlinks/plugins/ente_photos_rust/ios`)
@@ -308,7 +302,6 @@ DEPENDENCIES:
- move_to_background (from `.symlinks/plugins/move_to_background/ios`)
- native_video_editor (from `.symlinks/plugins/native_video_editor/ios`)
- native_video_player (from `.symlinks/plugins/native_video_player/ios`)
- - objective_c (from `.symlinks/plugins/objective_c/ios`)
- onnxruntime (from `.symlinks/plugins/onnxruntime/ios`)
- open_mail_app (from `.symlinks/plugins/open_mail_app/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
@@ -369,8 +362,6 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/camera_avfoundation/ios"
connectivity_plus:
:path: ".symlinks/plugins/connectivity_plus/ios"
- cupertino_http:
- :path: ".symlinks/plugins/cupertino_http/darwin"
dart_ui_isolate:
:path: ".symlinks/plugins/dart_ui_isolate/ios"
device_info_plus:
@@ -441,8 +432,6 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/native_video_editor/ios"
native_video_player:
:path: ".symlinks/plugins/native_video_player/ios"
- objective_c:
- :path: ".symlinks/plugins/objective_c/ios"
onnxruntime:
:path: ".symlinks/plugins/onnxruntime/ios"
open_mail_app:
@@ -497,7 +486,6 @@ SPEC CHECKSUMS:
battery_info: 83f3aae7be2fccefab1d2bf06b8aa96f11c8bcdd
camera_avfoundation: be3be85408cd4126f250386828e9b1dfa40ab436
connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd
- cupertino_http: 94ac07f5ff090b8effa6c5e2c47871d48ab7c86c
dart_ui_isolate: 46f6714abe6891313267153ef6f9748d8ecfcab1
device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe
ente_photos_rust: 79732f3ba67df7b0fb22089627afb80d692c2b2d
@@ -544,7 +532,6 @@ SPEC CHECKSUMS:
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
native_video_editor: 7f6e3d37acdae585f6c273b1e2be6ca6d6bb461e
native_video_player: 6809dec117e8997161dbfb42a6f90d6df71a504d
- objective_c: 89e720c30d716b036faf9c9684022048eee1eee2
onnxruntime: f9b296392c96c42882be020a59dbeac6310d81b2
onnxruntime-c: a909204639a1f035f575127ac406f781ac797c9c
onnxruntime-objc: b6fab0f1787aa6f7190c2013f03037df4718bd8b
@@ -577,6 +564,6 @@ SPEC CHECKSUMS:
wakelock_plus: e29112ab3ef0b318e58cfa5c32326458be66b556
workmanager_apple: 904529ae31e97fc5be632cf628507652294a0778
-PODFILE CHECKSUM: 1c99c7c32f840e3e08127181dd09d4755dbe2090
+PODFILE CHECKSUM: a0ca58908e52cf6c3fe2f16f5b193ce82a62fa3b
COCOAPODS: 1.16.2
diff --git a/mobile/apps/photos/ios/Runner.xcodeproj/project.pbxproj b/mobile/apps/photos/ios/Runner.xcodeproj/project.pbxproj
index 5d68379c8a..f5e1679703 100644
--- a/mobile/apps/photos/ios/Runner.xcodeproj/project.pbxproj
+++ b/mobile/apps/photos/ios/Runner.xcodeproj/project.pbxproj
@@ -634,7 +634,6 @@
"${BUILT_PRODUCTS_DIR}/battery_info/battery_info.framework",
"${BUILT_PRODUCTS_DIR}/camera_avfoundation/camera_avfoundation.framework",
"${BUILT_PRODUCTS_DIR}/connectivity_plus/connectivity_plus.framework",
- "${BUILT_PRODUCTS_DIR}/cupertino_http/cupertino_http.framework",
"${BUILT_PRODUCTS_DIR}/dart_ui_isolate/dart_ui_isolate.framework",
"${BUILT_PRODUCTS_DIR}/device_info_plus/device_info_plus.framework",
"${BUILT_PRODUCTS_DIR}/ente_photos_rust/ente_photos_rust.framework",
@@ -668,7 +667,6 @@
"${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
"${BUILT_PRODUCTS_DIR}/native_video_editor/native_video_editor.framework",
"${BUILT_PRODUCTS_DIR}/native_video_player/native_video_player.framework",
- "${BUILT_PRODUCTS_DIR}/objective_c/objective_c.framework",
"${BUILT_PRODUCTS_DIR}/open_mail_app/open_mail_app.framework",
"${BUILT_PRODUCTS_DIR}/package_info_plus/package_info_plus.framework",
"${BUILT_PRODUCTS_DIR}/path_provider_foundation/path_provider_foundation.framework",
@@ -738,7 +736,6 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/battery_info.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/camera_avfoundation.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/connectivity_plus.framework",
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/cupertino_http.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/dart_ui_isolate.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/device_info_plus.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ente_photos_rust.framework",
@@ -772,7 +769,6 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/native_video_editor.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/native_video_player.framework",
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/objective_c.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/open_mail_app.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info_plus.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_foundation.framework",
@@ -1043,11 +1039,6 @@
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 0.0.11;
- "OTHER_LDFLAGS[sdk=iphonesimulator*]" = (
- "$(inherited)",
- "-Wl,-needed_framework,cupertino_http",
- "-Wl,-needed_framework,objective_c",
- );
PRODUCT_BUNDLE_IDENTIFIER = io.ente.frame;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -1350,11 +1341,6 @@
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 0.0.11;
- "OTHER_LDFLAGS[sdk=iphonesimulator*]" = (
- "$(inherited)",
- "-Wl,-needed_framework,cupertino_http",
- "-Wl,-needed_framework,objective_c",
- );
PRODUCT_BUNDLE_IDENTIFIER = io.ente.frame.debug;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -1398,11 +1384,6 @@
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 0.0.11;
- "OTHER_LDFLAGS[sdk=iphonesimulator*]" = (
- "$(inherited)",
- "-Wl,-needed_framework,cupertino_http",
- "-Wl,-needed_framework,objective_c",
- );
PRODUCT_BUNDLE_IDENTIFIER = io.ente.frame;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
diff --git a/mobile/apps/photos/lib/core/network/network.dart b/mobile/apps/photos/lib/core/network/network.dart
index 8c4e2d8a86..8fb2ba01c8 100644
--- a/mobile/apps/photos/lib/core/network/network.dart
+++ b/mobile/apps/photos/lib/core/network/network.dart
@@ -2,7 +2,6 @@ import "dart:async";
import 'dart:io';
import 'package:dio/dio.dart';
-import "package:native_dio_adapter/native_dio_adapter.dart";
import 'package:package_info_plus/package_info_plus.dart';
import "package:photos/core/configuration.dart";
import "package:photos/core/event_bus.dart";
@@ -41,13 +40,6 @@ class NetworkClient {
),
);
- // Only use NativeAdapter on iOS. On Android, Cronet (used by NativeAdapter)
- // doesn't work in background tasks on Android 15, causing CronetException
- // during background sync. Use default adapter on Android instead.
- if (Platform.isIOS) {
- _enteDio.httpClientAdapter = NativeAdapter();
- }
-
_setupInterceptors(endpoint);
if (_endpointUpdatedSubscription != null) {
diff --git a/mobile/apps/photos/pubspec.lock b/mobile/apps/photos/pubspec.lock
index 966f93219b..61d2a9d171 100644
--- a/mobile/apps/photos/pubspec.lock
+++ b/mobile/apps/photos/pubspec.lock
@@ -459,14 +459,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.2"
- cupertino_http:
- dependency: transitive
- description:
- name: cupertino_http
- sha256: "8fb9e2c36d0732d9d96abd76683406b57e78a2514e27c962e0c603dbe6f2e3f8"
- url: "https://pub.dev"
- source: hosted
- version: "2.2.0"
cupertino_icons:
dependency: "direct main"
description:
@@ -1879,14 +1871,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.0"
- native_dio_adapter:
- dependency: "direct main"
- description:
- name: native_dio_adapter
- sha256: "7420bc9517b2abe09810199a19924617b45690a44ecfb0616ac9babc11875c03"
- url: "https://pub.dev"
- source: hosted
- version: "1.4.0"
native_video_editor:
dependency: "direct main"
description:
@@ -1926,14 +1910,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.2"
- objective_c:
- dependency: transitive
- description:
- name: objective_c
- sha256: "9f034ba1eeca53ddb339bc8f4813cb07336a849cd735559b60cdc068ecce2dc7"
- url: "https://pub.dev"
- source: hosted
- version: "7.1.0"
octo_image:
dependency: transitive
description:
diff --git a/mobile/apps/photos/pubspec.yaml b/mobile/apps/photos/pubspec.yaml
index f29c7fec19..a7ddc00486 100644
--- a/mobile/apps/photos/pubspec.yaml
+++ b/mobile/apps/photos/pubspec.yaml
@@ -185,7 +185,6 @@ dependencies:
url: https://github.com/ente-io/move_to_background.git
ref: 0cdfeed654d79636eff0c57110f3f6ad5801ba2f
nanoid: 1.0.0
- native_dio_adapter: 1.4.0
native_video_editor:
path: ../../packages/native_video_editor
native_video_player: 4.0.0