Skip to content

High performance self-hosted photo and video management solution.

chore(mobile): use path provider foundation (#16804)

shenlong6caa11d079ba
diff --git a/mobile/ios/Podfile.lock b/mobile/ios/Podfile.lock
index 90a4862054..4f030b0495 100644
--- a/mobile/ios/Podfile.lock
+++ b/mobile/ios/Podfile.lock
@@ -69,8 +69,9 @@ PODS:
- Flutter
- package_info_plus (0.4.5):
- Flutter
- - path_provider_ios (0.0.1):
+ - path_provider_foundation (0.0.1):
- Flutter
+ - FlutterMacOS
- permission_handler_apple (9.3.0):
- Flutter
- photo_manager (2.0.0):
@@ -121,7 +122,7 @@ DEPENDENCIES:
- native_video_player (from `.symlinks/plugins/native_video_player/ios`)
- network_info_plus (from `.symlinks/plugins/network_info_plus/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
+ - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- photo_manager (from `.symlinks/plugins/photo_manager/ios`)
- share_handler_ios (from `.symlinks/plugins/share_handler_ios/ios`)
@@ -178,8 +179,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/network_info_plus/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
- path_provider_ios:
- :path: ".symlinks/plugins/path_provider_ios/ios"
+ path_provider_foundation:
+ :path: ".symlinks/plugins/path_provider_foundation/darwin"
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"
photo_manager:
@@ -221,7 +222,7 @@ SPEC CHECKSUMS:
native_video_player: d12af78a1a4a8cf09775a5177d5b392def6fd23c
network_info_plus: 6613d9d7cdeb0e6f366ed4dbe4b3c51c52d567a9
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
- path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
+ path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
photo_manager: ff695c7a1dd5bc379974953a2b5c0a293f7c4c8a
SAMKeychain: 483e1c9f32984d50ca961e26818a534283b4cd5c
diff --git a/mobile/ios/Runner/AppDelegate.swift b/mobile/ios/Runner/AppDelegate.swift
index 6c749cdb9f..fd62618205 100644
--- a/mobile/ios/Runner/AppDelegate.swift
+++ b/mobile/ios/Runner/AppDelegate.swift
@@ -1,7 +1,7 @@
import BackgroundTasks
import Flutter
import network_info_plus
-import path_provider_ios
+import path_provider_foundation
import permission_handler_apple
import photo_manager
import shared_preferences_foundation
@@ -24,8 +24,8 @@ import UIKit
BackgroundServicePlugin.register(with: self.registrar(forPlugin: "BackgroundServicePlugin")!)
BackgroundServicePlugin.setPluginRegistrantCallback { registry in
- if !registry.hasPlugin("org.cocoapods.path-provider-ios") {
- FLTPathProviderPlugin.register(with: registry.registrar(forPlugin: "org.cocoapods.path-provider-ios")!)
+ if !registry.hasPlugin("org.cocoapods.path-provider-foundation") {
+ PathProviderPlugin.register(with: registry.registrar(forPlugin: "org.cocoapods.path-provider-foundation")!)
}
if !registry.hasPlugin("org.cocoapods.photo-manager") {
diff --git a/mobile/ios/Runner/BackgroundSync/BackgroundServicePlugin.swift b/mobile/ios/Runner/BackgroundSync/BackgroundServicePlugin.swift
index 2699ed4b09..cac9faab01 100644
--- a/mobile/ios/Runner/BackgroundSync/BackgroundServicePlugin.swift
+++ b/mobile/ios/Runner/BackgroundSync/BackgroundServicePlugin.swift
@@ -7,7 +7,7 @@
import Flutter
import BackgroundTasks
-import path_provider_ios
+import path_provider_foundation
import CryptoKit
import Network
diff --git a/mobile/lib/services/background.service.dart b/mobile/lib/services/background.service.dart
index 548e4b1ad5..fe483384e5 100644
--- a/mobile/lib/services/background.service.dart
+++ b/mobile/lib/services/background.service.dart
@@ -52,7 +52,7 @@ import 'package:immich_mobile/utils/bootstrap.dart';
import 'package:immich_mobile/utils/diff.dart';
import 'package:immich_mobile/utils/http_ssl_cert_override.dart';
import 'package:network_info_plus/network_info_plus.dart';
-import 'package:path_provider_ios/path_provider_ios.dart';
+import 'package:path_provider_foundation/path_provider_foundation.dart';
import 'package:photo_manager/photo_manager.dart' show PMProgressHandler;
final backgroundServiceProvider = Provider(
@@ -322,7 +322,7 @@ class BackgroundService {
// NOTE: I'm not sure this is strictly necessary anymore, but
// out of an abundance of caution, we will keep it in until someone
// can say for sure
- PathProviderIOS.registerWith();
+ PathProviderFoundation.registerWith();
}
switch (call.method) {
case "backgroundProcessing":
diff --git a/mobile/pubspec.lock b/mobile/pubspec.lock
index 091b7eb7ec..58a4f87847 100644
--- a/mobile/pubspec.lock
+++ b/mobile/pubspec.lock
@@ -1129,21 +1129,13 @@ packages:
source: hosted
version: "2.2.16"
path_provider_foundation:
- dependency: transitive
+ dependency: "direct main"
description:
name: path_provider_foundation
sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
- path_provider_ios:
- dependency: "direct main"
- description:
- name: path_provider_ios
- sha256: "03d639406f5343478352433f00d3c4394d52dac8df3d847869c5e2333e0bbce8"
- url: "https://pub.dev"
- source: hosted
- version: "2.0.11"
path_provider_linux:
dependency: transitive
description:
diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml
index 400415c032..3e476d5441 100644
--- a/mobile/pubspec.yaml
+++ b/mobile/pubspec.yaml
@@ -39,7 +39,7 @@ dependencies:
scrollable_positioned_list: ^0.3.8
path: ^1.8.3
path_provider: ^2.1.5
- path_provider_ios: ^2.0.11
+ path_provider_foundation: ^2.4.1
collection: ^1.18.0
http_parser: ^4.0.2
flutter_web_auth_2: ^5.0.0-alpha.0