diff --git a/mobile/.gitignore b/mobile/.gitignore
new file mode 100644
index 0000000000..0fa6b675c0
--- /dev/null
+++ b/mobile/.gitignore
@@ -0,0 +1,46 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+**/ios/Flutter/.last_build_id
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.packages
+.pub-cache/
+.pub/
+/build/
+
+# Web related
+lib/generated_plugin_registrant.dart
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release
diff --git a/mobile/.metadata b/mobile/.metadata
new file mode 100644
index 0000000000..fd70cabc06
--- /dev/null
+++ b/mobile/.metadata
@@ -0,0 +1,10 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled and should not be manually edited.
+
+version:
+ revision: 77d935af4db863f6abd0b9c31c7e6df2a13de57b
+ channel: stable
+
+project_type: app
diff --git a/mobile/README.md b/mobile/README.md
new file mode 100644
index 0000000000..9304b780e2
--- /dev/null
+++ b/mobile/README.md
@@ -0,0 +1,16 @@
+# immich_mobile
+
+A new Flutter project.
+
+## Getting Started
+
+This project is a starting point for a Flutter application.
+
+Few resources to get you started if this is your first Flutter project:
+
+- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
+- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
+
+For help getting started with Flutter, view our
+[online documentation](https://flutter.dev/docs), which offers tutorials,
+samples, guidance on mobile development, and a full API reference.
diff --git a/mobile/analysis_options.yaml b/mobile/analysis_options.yaml
new file mode 100644
index 0000000000..61b6c4de17
--- /dev/null
+++ b/mobile/analysis_options.yaml
@@ -0,0 +1,29 @@
+# This file configures the analyzer, which statically analyzes Dart code to
+# check for errors, warnings, and lints.
+#
+# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
+# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
+# invoked from the command line by running `flutter analyze`.
+
+# The following line activates a set of recommended lints for Flutter apps,
+# packages, and plugins designed to encourage good coding practices.
+include: package:flutter_lints/flutter.yaml
+
+linter:
+ # The lint rules applied to this project can be customized in the
+ # section below to disable rules from the `package:flutter_lints/flutter.yaml`
+ # included above or to enable additional rules. A list of all available lints
+ # and their documentation is published at
+ # https://dart-lang.github.io/linter/lints/index.html.
+ #
+ # Instead of disabling a lint rule for the entire project in the
+ # section below, it can also be suppressed for a single line of code
+ # or a specific dart file by using the `// ignore: name_of_lint` and
+ # `// ignore_for_file: name_of_lint` syntax on the line or in the file
+ # producing the lint.
+ rules:
+ # avoid_print: false # Uncomment to disable the `avoid_print` rule
+ # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options
diff --git a/mobile/android/.gitignore b/mobile/android/.gitignore
new file mode 100644
index 0000000000..6f568019d3
--- /dev/null
+++ b/mobile/android/.gitignore
@@ -0,0 +1,13 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java
+
+# Remember to never publicly share your keystore.
+# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
+key.properties
+**/*.keystore
+**/*.jks
diff --git a/mobile/android/app/build.gradle b/mobile/android/app/build.gradle
new file mode 100644
index 0000000000..d7a11558d8
--- /dev/null
+++ b/mobile/android/app/build.gradle
@@ -0,0 +1,68 @@
+def localProperties = new Properties()
+def localPropertiesFile = rootProject.file('local.properties')
+if (localPropertiesFile.exists()) {
+ localPropertiesFile.withReader('UTF-8') { reader ->
+ localProperties.load(reader)
+ }
+}
+
+def flutterRoot = localProperties.getProperty('flutter.sdk')
+if (flutterRoot == null) {
+ throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
+}
+
+def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
+if (flutterVersionCode == null) {
+ flutterVersionCode = '1'
+}
+
+def flutterVersionName = localProperties.getProperty('flutter.versionName')
+if (flutterVersionName == null) {
+ flutterVersionName = '1.0'
+}
+
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
+
+android {
+ compileSdkVersion flutter.compileSdkVersion
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+
+ kotlinOptions {
+ jvmTarget = '1.8'
+ }
+
+ sourceSets {
+ main.java.srcDirs += 'src/main/kotlin'
+ }
+
+ defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+ applicationId "com.example.immich_mobile"
+ minSdkVersion flutter.minSdkVersion
+ targetSdkVersion flutter.targetSdkVersion
+ versionCode flutterVersionCode.toInteger()
+ versionName flutterVersionName
+ }
+
+ buildTypes {
+ release {
+ // TODO: Add your own signing config for the release build.
+ // Signing with the debug keys for now, so `flutter run --release` works.
+ signingConfig signingConfigs.debug
+ }
+ }
+}
+
+flutter {
+ source '../..'
+}
+
+dependencies {
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+}
diff --git a/mobile/android/app/src/debug/AndroidManifest.xml b/mobile/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 0000000000..610629c0c1
--- /dev/null
+++ b/mobile/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/mobile/android/app/src/main/AndroidManifest.xml b/mobile/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000000..71267f848f
--- /dev/null
+++ b/mobile/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mobile/android/app/src/main/kotlin/com/example/immich_mobile/MainActivity.kt b/mobile/android/app/src/main/kotlin/com/example/immich_mobile/MainActivity.kt
new file mode 100644
index 0000000000..520f053b5c
--- /dev/null
+++ b/mobile/android/app/src/main/kotlin/com/example/immich_mobile/MainActivity.kt
@@ -0,0 +1,6 @@
+package com.example.immich_mobile
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity: FlutterActivity() {
+}
diff --git a/mobile/android/app/src/main/res/drawable-v21/launch_background.xml b/mobile/android/app/src/main/res/drawable-v21/launch_background.xml
new file mode 100644
index 0000000000..f74085f3f6
--- /dev/null
+++ b/mobile/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/mobile/android/app/src/main/res/drawable/launch_background.xml b/mobile/android/app/src/main/res/drawable/launch_background.xml
new file mode 100644
index 0000000000..304732f884
--- /dev/null
+++ b/mobile/android/app/src/main/res/drawable/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000000..db77bb4b7b
Binary files /dev/null and b/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000000..17987b79bb
Binary files /dev/null and b/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000000..09d4391482
Binary files /dev/null and b/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000000..d5f1c8d34e
Binary files /dev/null and b/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000000..4d6372eebd
Binary files /dev/null and b/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/mobile/android/app/src/main/res/values-night/styles.xml b/mobile/android/app/src/main/res/values-night/styles.xml
new file mode 100644
index 0000000000..3db14bb539
--- /dev/null
+++ b/mobile/android/app/src/main/res/values-night/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/mobile/android/app/src/main/res/values/styles.xml b/mobile/android/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000000..d460d1e921
--- /dev/null
+++ b/mobile/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/mobile/android/app/src/profile/AndroidManifest.xml b/mobile/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 0000000000..610629c0c1
--- /dev/null
+++ b/mobile/android/app/src/profile/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/mobile/android/build.gradle b/mobile/android/build.gradle
new file mode 100644
index 0000000000..4256f91736
--- /dev/null
+++ b/mobile/android/build.gradle
@@ -0,0 +1,31 @@
+buildscript {
+ ext.kotlin_version = '1.6.10'
+ repositories {
+ google()
+ mavenCentral()
+ }
+
+ dependencies {
+ classpath 'com.android.tools.build:gradle:4.1.0'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+rootProject.buildDir = '../build'
+subprojects {
+ project.buildDir = "${rootProject.buildDir}/${project.name}"
+}
+subprojects {
+ project.evaluationDependsOn(':app')
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/mobile/android/gradle.properties b/mobile/android/gradle.properties
new file mode 100644
index 0000000000..94adc3a3f9
--- /dev/null
+++ b/mobile/android/gradle.properties
@@ -0,0 +1,3 @@
+org.gradle.jvmargs=-Xmx1536M
+android.useAndroidX=true
+android.enableJetifier=true
diff --git a/mobile/android/gradle/wrapper/gradle-wrapper.properties b/mobile/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000000..bc6a58afdd
--- /dev/null
+++ b/mobile/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Jun 23 08:50:38 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
diff --git a/mobile/android/settings.gradle b/mobile/android/settings.gradle
new file mode 100644
index 0000000000..44e62bcf06
--- /dev/null
+++ b/mobile/android/settings.gradle
@@ -0,0 +1,11 @@
+include ':app'
+
+def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
+def properties = new Properties()
+
+assert localPropertiesFile.exists()
+localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
+
+def flutterSdkPath = properties.getProperty("flutter.sdk")
+assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
+apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
diff --git a/mobile/assets/immich-logo-no-outline.png b/mobile/assets/immich-logo-no-outline.png
new file mode 100644
index 0000000000..d4e7085f12
Binary files /dev/null and b/mobile/assets/immich-logo-no-outline.png differ
diff --git a/mobile/assets/immich-logo.png b/mobile/assets/immich-logo.png
new file mode 100644
index 0000000000..cf998992a7
Binary files /dev/null and b/mobile/assets/immich-logo.png differ
diff --git a/mobile/assets/immich-logo.svg b/mobile/assets/immich-logo.svg
new file mode 100644
index 0000000000..e7edba069b
--- /dev/null
+++ b/mobile/assets/immich-logo.svg
@@ -0,0 +1,98 @@
+
+
+
diff --git a/mobile/ios/.gitignore b/mobile/ios/.gitignore
new file mode 100644
index 0000000000..7a7f9873ad
--- /dev/null
+++ b/mobile/ios/.gitignore
@@ -0,0 +1,34 @@
+**/dgph
+*.mode1v3
+*.mode2v3
+*.moved-aside
+*.pbxuser
+*.perspectivev3
+**/*sync/
+.sconsign.dblite
+.tags*
+**/.vagrant/
+**/DerivedData/
+Icon?
+**/Pods/
+**/.symlinks/
+profile
+xcuserdata
+**/.generated/
+Flutter/App.framework
+Flutter/Flutter.framework
+Flutter/Flutter.podspec
+Flutter/Generated.xcconfig
+Flutter/ephemeral/
+Flutter/app.flx
+Flutter/app.zip
+Flutter/flutter_assets/
+Flutter/flutter_export_environment.sh
+ServiceDefinitions.json
+Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!default.mode1v3
+!default.mode2v3
+!default.pbxuser
+!default.perspectivev3
diff --git a/mobile/ios/Flutter/AppFrameworkInfo.plist b/mobile/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 0000000000..8d4492f977
--- /dev/null
+++ b/mobile/ios/Flutter/AppFrameworkInfo.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ App
+ CFBundleIdentifier
+ io.flutter.flutter.app
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ App
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ MinimumOSVersion
+ 9.0
+
+
diff --git a/mobile/ios/Flutter/Debug.xcconfig b/mobile/ios/Flutter/Debug.xcconfig
new file mode 100644
index 0000000000..ec97fc6f30
--- /dev/null
+++ b/mobile/ios/Flutter/Debug.xcconfig
@@ -0,0 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
+#include "Generated.xcconfig"
diff --git a/mobile/ios/Flutter/Release.xcconfig b/mobile/ios/Flutter/Release.xcconfig
new file mode 100644
index 0000000000..c4855bfe20
--- /dev/null
+++ b/mobile/ios/Flutter/Release.xcconfig
@@ -0,0 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
+#include "Generated.xcconfig"
diff --git a/mobile/ios/Podfile b/mobile/ios/Podfile
new file mode 100644
index 0000000000..1e8c3c90a5
--- /dev/null
+++ b/mobile/ios/Podfile
@@ -0,0 +1,41 @@
+# Uncomment this line to define a global platform for your project
+# platform :ios, '9.0'
+
+# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
+ENV['COCOAPODS_DISABLE_STATS'] = 'true'
+
+project 'Runner', {
+ 'Debug' => :debug,
+ 'Profile' => :release,
+ 'Release' => :release,
+}
+
+def flutter_root
+ generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
+ unless File.exist?(generated_xcode_build_settings_path)
+ raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
+ end
+
+ File.foreach(generated_xcode_build_settings_path) do |line|
+ matches = line.match(/FLUTTER_ROOT\=(.*)/)
+ return matches[1].strip if matches
+ end
+ raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
+end
+
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
+
+flutter_ios_podfile_setup
+
+target 'Runner' do
+ use_frameworks!
+ use_modular_headers!
+
+ flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
+end
+
+post_install do |installer|
+ installer.pods_project.targets.each do |target|
+ flutter_additional_ios_build_settings(target)
+ end
+end
diff --git a/mobile/ios/Podfile.lock b/mobile/ios/Podfile.lock
new file mode 100644
index 0000000000..296e770b67
--- /dev/null
+++ b/mobile/ios/Podfile.lock
@@ -0,0 +1,50 @@
+PODS:
+ - device_info_plus (0.0.1):
+ - Flutter
+ - Flutter (1.0.0)
+ - FMDB (2.7.5):
+ - FMDB/standard (= 2.7.5)
+ - FMDB/standard (2.7.5)
+ - path_provider_ios (0.0.1):
+ - Flutter
+ - photo_manager (1.0.0):
+ - Flutter
+ - FlutterMacOS
+ - sqflite (0.0.2):
+ - Flutter
+ - FMDB (>= 2.7.5)
+
+DEPENDENCIES:
+ - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
+ - Flutter (from `Flutter`)
+ - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
+ - photo_manager (from `.symlinks/plugins/photo_manager/ios`)
+ - sqflite (from `.symlinks/plugins/sqflite/ios`)
+
+SPEC REPOS:
+ trunk:
+ - FMDB
+
+EXTERNAL SOURCES:
+ device_info_plus:
+ :path: ".symlinks/plugins/device_info_plus/ios"
+ Flutter:
+ :path: Flutter
+ path_provider_ios:
+ :path: ".symlinks/plugins/path_provider_ios/ios"
+ photo_manager:
+ :path: ".symlinks/plugins/photo_manager/ios"
+ sqflite:
+ :path: ".symlinks/plugins/sqflite/ios"
+
+SPEC CHECKSUMS:
+ device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
+ Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
+ FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
+ path_provider_ios: 7d7ce634493af4477d156294792024ec3485acd5
+ photo_manager: 84fa94fbeb82e607333ea9a13c43b58e0903a463
+ sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
+
+PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
+
+COCOAPODS: 1.10.1
diff --git a/mobile/ios/Runner.xcodeproj/project.pbxproj b/mobile/ios/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 0000000000..0309944ddd
--- /dev/null
+++ b/mobile/ios/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,551 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 51;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+ D218389C4A4C4693F141F7D1 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 886774DBDDE6B35BF2B4F2CD /* Pods_Runner.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ );
+ name = "Embed Frameworks";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
+ 2E3441B73560D0F6FD25E04F /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
+ 886774DBDDE6B35BF2B4F2CD /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
+ 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
+ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+ E0E99CDC17B3EB7FA8BA2332 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
+ F7101BB0391A314774615E89 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 97C146EB1CF9000F007C117D /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D218389C4A4C4693F141F7D1 /* Pods_Runner.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 0FB772A5B9601143383626CA /* Pods */ = {
+ isa = PBXGroup;
+ children = (
+ 2E3441B73560D0F6FD25E04F /* Pods-Runner.debug.xcconfig */,
+ E0E99CDC17B3EB7FA8BA2332 /* Pods-Runner.release.xcconfig */,
+ F7101BB0391A314774615E89 /* Pods-Runner.profile.xcconfig */,
+ );
+ path = Pods;
+ sourceTree = "";
+ };
+ 1754452DD81DA6620E279E51 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 886774DBDDE6B35BF2B4F2CD /* Pods_Runner.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
+ 9740EEB11CF90186004384FC /* Flutter */ = {
+ isa = PBXGroup;
+ children = (
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */,
+ );
+ name = Flutter;
+ sourceTree = "";
+ };
+ 97C146E51CF9000F007C117D = {
+ isa = PBXGroup;
+ children = (
+ 9740EEB11CF90186004384FC /* Flutter */,
+ 97C146F01CF9000F007C117D /* Runner */,
+ 97C146EF1CF9000F007C117D /* Products */,
+ 0FB772A5B9601143383626CA /* Pods */,
+ 1754452DD81DA6620E279E51 /* Frameworks */,
+ );
+ sourceTree = "";
+ };
+ 97C146EF1CF9000F007C117D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146EE1CF9000F007C117D /* Runner.app */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 97C146F01CF9000F007C117D /* Runner */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146FA1CF9000F007C117D /* Main.storyboard */,
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */,
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+ 97C147021CF9000F007C117D /* Info.plist */,
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
+ );
+ path = Runner;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 97C146ED1CF9000F007C117D /* Runner */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+ buildPhases = (
+ 4044AF030EF7D8721844FFBA /* [CP] Check Pods Manifest.lock */,
+ 9740EEB61CF901F6004384FC /* Run Script */,
+ 97C146EA1CF9000F007C117D /* Sources */,
+ 97C146EB1CF9000F007C117D /* Frameworks */,
+ 97C146EC1CF9000F007C117D /* Resources */,
+ 9705A1C41CF9048500538489 /* Embed Frameworks */,
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ D218A34AEE62BC1EF119F5B0 /* [CP] Embed Pods Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Runner;
+ productName = Runner;
+ productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 97C146E61CF9000F007C117D /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 1300;
+ ORGANIZATIONNAME = "";
+ TargetAttributes = {
+ 97C146ED1CF9000F007C117D = {
+ CreatedOnToolsVersion = 7.3.1;
+ LastSwiftMigration = 1100;
+ };
+ };
+ };
+ buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 97C146E51CF9000F007C117D;
+ productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 97C146ED1CF9000F007C117D /* Runner */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 97C146EC1CF9000F007C117D /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Thin Binary";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
+ };
+ 4044AF030EF7D8721844FFBA /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
+ };
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Run Script";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+ };
+ D218A34AEE62BC1EF119F5B0 /* [CP] Embed Pods Frameworks */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
+ );
+ name = "[CP] Embed Pods Frameworks";
+ outputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 97C146EA1CF9000F007C117D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C146FB1CF9000F007C117D /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C147001CF9000F007C117D /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 249021D3217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Profile;
+ };
+ 249021D4217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = C24486LLLU;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.immichMobile;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Profile;
+ };
+ 97C147031CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 97C147041CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ SWIFT_COMPILATION_MODE = wholemodule;
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 97C147061CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = C24486LLLU;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.immichMobile;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Debug;
+ };
+ 97C147071CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = C24486LLLU;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.immichMobile;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147031CF9000F007C117D /* Debug */,
+ 97C147041CF9000F007C117D /* Release */,
+ 249021D3217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147061CF9000F007C117D /* Debug */,
+ 97C147071CF9000F007C117D /* Release */,
+ 249021D4217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}
diff --git a/mobile/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/mobile/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000000..919434a625
--- /dev/null
+++ b/mobile/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000000..18d981003d
--- /dev/null
+++ b/mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000000..f9b0d7c5ea
--- /dev/null
+++ b/mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 0000000000..c87d15a335
--- /dev/null
+++ b/mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mobile/ios/Runner.xcworkspace/contents.xcworkspacedata b/mobile/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000000..21a3cc14c7
--- /dev/null
+++ b/mobile/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
diff --git a/mobile/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/mobile/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000000..18d981003d
--- /dev/null
+++ b/mobile/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/mobile/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/mobile/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000000..f9b0d7c5ea
--- /dev/null
+++ b/mobile/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/mobile/ios/Runner/AppDelegate.swift b/mobile/ios/Runner/AppDelegate.swift
new file mode 100644
index 0000000000..70693e4a8c
--- /dev/null
+++ b/mobile/ios/Runner/AppDelegate.swift
@@ -0,0 +1,13 @@
+import UIKit
+import Flutter
+
+@UIApplicationMain
+@objc class AppDelegate: FlutterAppDelegate {
+ override func application(
+ _ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
+ ) -> Bool {
+ GeneratedPluginRegistrant.register(with: self)
+ return super.application(application, didFinishLaunchingWithOptions: launchOptions)
+ }
+}
diff --git a/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000000..d36b1fab2d
--- /dev/null
+++ b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,122 @@
+{
+ "images" : [
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "83.5x83.5",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-83.5x83.5@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "1024x1024",
+ "idiom" : "ios-marketing",
+ "filename" : "Icon-App-1024x1024@1x.png",
+ "scale" : "1x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
new file mode 100644
index 0000000000..dc9ada4725
Binary files /dev/null and b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
new file mode 100644
index 0000000000..28c6bf0301
Binary files /dev/null and b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
new file mode 100644
index 0000000000..2ccbfd967d
Binary files /dev/null and b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
new file mode 100644
index 0000000000..f091b6b0bc
Binary files /dev/null and b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
new file mode 100644
index 0000000000..4cde12118d
Binary files /dev/null and b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
new file mode 100644
index 0000000000..d0ef06e7ed
Binary files /dev/null and b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
new file mode 100644
index 0000000000..dcdc2306c2
Binary files /dev/null and b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
new file mode 100644
index 0000000000..2ccbfd967d
Binary files /dev/null and b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
new file mode 100644
index 0000000000..c8f9ed8f5c
Binary files /dev/null and b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
new file mode 100644
index 0000000000..a6d6b8609d
Binary files /dev/null and b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
new file mode 100644
index 0000000000..a6d6b8609d
Binary files /dev/null and b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
new file mode 100644
index 0000000000..75b2d164a5
Binary files /dev/null and b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
new file mode 100644
index 0000000000..c4df70d39d
Binary files /dev/null and b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
new file mode 100644
index 0000000000..6a84f41e14
Binary files /dev/null and b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
new file mode 100644
index 0000000000..d0e1f58536
Binary files /dev/null and b/mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
new file mode 100644
index 0000000000..0bedcf2fd4
--- /dev/null
+++ b/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@3x.png",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
new file mode 100644
index 0000000000..9da19eacad
Binary files /dev/null and b/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ
diff --git a/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
new file mode 100644
index 0000000000..9da19eacad
Binary files /dev/null and b/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ
diff --git a/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
new file mode 100644
index 0000000000..9da19eacad
Binary files /dev/null and b/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ
diff --git a/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
new file mode 100644
index 0000000000..89c2725b70
--- /dev/null
+++ b/mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
@@ -0,0 +1,5 @@
+# Launch Screen Assets
+
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
+
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
diff --git a/mobile/ios/Runner/Base.lproj/LaunchScreen.storyboard b/mobile/ios/Runner/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 0000000000..f2e259c7c9
--- /dev/null
+++ b/mobile/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mobile/ios/Runner/Base.lproj/Main.storyboard b/mobile/ios/Runner/Base.lproj/Main.storyboard
new file mode 100644
index 0000000000..f3c28516fb
--- /dev/null
+++ b/mobile/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mobile/ios/Runner/Info.plist b/mobile/ios/Runner/Info.plist
new file mode 100644
index 0000000000..db89cddaa1
--- /dev/null
+++ b/mobile/ios/Runner/Info.plist
@@ -0,0 +1,49 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ Immich Mobile
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ immich_mobile
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ $(FLUTTER_BUILD_NAME)
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ $(FLUTTER_BUILD_NUMBER)
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UIViewControllerBasedStatusBarAppearance
+
+ NSPhotoLibraryUsageDescription
+ App need your agree, can visit your album
+
+
\ No newline at end of file
diff --git a/mobile/ios/Runner/Runner-Bridging-Header.h b/mobile/ios/Runner/Runner-Bridging-Header.h
new file mode 100644
index 0000000000..308a2a560b
--- /dev/null
+++ b/mobile/ios/Runner/Runner-Bridging-Header.h
@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"
diff --git a/mobile/lib/constants/hive_box.dart b/mobile/lib/constants/hive_box.dart
new file mode 100644
index 0000000000..61b6fb93ae
--- /dev/null
+++ b/mobile/lib/constants/hive_box.dart
@@ -0,0 +1,11 @@
+// Access token
+const String userInfoBox = "immichBoxUserInfo"; // Box
+const String accessTokenKey = "immichBoxAccessTokenKey"; // Key 1
+const String deviceIdKey = 'immichBoxDeviceIdKey'; // Key 2
+
+// SERVER ENDPOINT
+const String serverEndpointKey = 'immichBoxServerEndpoint';
+
+// KEY
+const String hiveAllAsssetKey = "allAssets";
+const String hiveBackupProgressKey = "backupProgressAssets";
diff --git a/mobile/lib/main.dart b/mobile/lib/main.dart
new file mode 100644
index 0000000000..753dba5dbe
--- /dev/null
+++ b/mobile/lib/main.dart
@@ -0,0 +1,92 @@
+import 'package:flutter/material.dart';
+import 'package:hive_flutter/hive_flutter.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:immich_mobile/routing/router.dart';
+import 'package:immich_mobile/shared/providers/app_state.provider.dart';
+import 'constants/hive_box.dart';
+import 'package:google_fonts/google_fonts.dart';
+
+void main() async {
+ await Hive.initFlutter();
+ await Hive.openBox(userInfoBox);
+ // Hive.registerAdapter(ImmichBackUpAssetAdapter());
+ // Hive.deleteBoxFromDisk(hiveImmichBox);
+
+ runApp(const ProviderScope(child: ImmichApp()));
+}
+
+class ImmichApp extends ConsumerStatefulWidget {
+ const ImmichApp({Key? key}) : super(key: key);
+
+ @override
+ _ImmichAppState createState() => _ImmichAppState();
+}
+
+class _ImmichAppState extends ConsumerState with WidgetsBindingObserver {
+ @override
+ void didChangeAppLifecycleState(AppLifecycleState state) {
+ switch (state) {
+ case AppLifecycleState.resumed:
+ debugPrint("[APP STATE] resumed");
+ ref.read(appStateProvider.notifier).state = AppStateEnum.resumed;
+ break;
+ case AppLifecycleState.inactive:
+ debugPrint("[APP STATE] inactive");
+ ref.read(appStateProvider.notifier).state = AppStateEnum.inactive;
+ break;
+ case AppLifecycleState.paused:
+ debugPrint("[APP STATE] paused");
+ ref.read(appStateProvider.notifier).state = AppStateEnum.paused;
+ break;
+ case AppLifecycleState.detached:
+ debugPrint("[APP STATE] detached");
+ ref.read(appStateProvider.notifier).state = AppStateEnum.detached;
+ break;
+ }
+ }
+
+ Future initApp() async {
+ // ! TOBE DELETE
+ // Simulate Sign In And Register/Get Device ID
+ // await ref.read(authenticationProvider.notifier).login();
+ // ref.read(backupProvider.notifier).getBackupInfo();
+ // WidgetsBinding.instance?.addObserver(this);
+ }
+
+ @override
+ initState() {
+ super.initState();
+ initApp().then((_) => debugPrint("App Init Completed"));
+ }
+
+ @override
+ void dispose() {
+ WidgetsBinding.instance?.removeObserver(this);
+ super.dispose();
+ }
+
+ final _immichRouter = AppRouter();
+
+ @override
+ Widget build(BuildContext context) {
+ return MaterialApp.router(
+ title: 'Immich',
+ debugShowCheckedModeBanner: false,
+ theme: ThemeData(
+ primarySwatch: Colors.indigo,
+ textTheme: GoogleFonts.workSansTextTheme(
+ Theme.of(context).textTheme.apply(fontSizeFactor: 1.0),
+ ),
+ scaffoldBackgroundColor: const Color(0xFFf6f8fe),
+ appBarTheme: const AppBarTheme(
+ backgroundColor: Colors.white,
+ foregroundColor: Colors.indigo,
+ elevation: 1,
+ centerTitle: true,
+ ),
+ ),
+ routeInformationParser: _immichRouter.defaultRouteParser(),
+ routerDelegate: _immichRouter.delegate(),
+ );
+ }
+}
diff --git a/mobile/lib/module_template/models/store_model_here.txt b/mobile/lib/module_template/models/store_model_here.txt
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/mobile/lib/module_template/providers/store_providers_here.txt b/mobile/lib/module_template/providers/store_providers_here.txt
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/mobile/lib/module_template/services/store_services_here.txt b/mobile/lib/module_template/services/store_services_here.txt
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/mobile/lib/module_template/ui/store_ui_here.txt b/mobile/lib/module_template/ui/store_ui_here.txt
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/mobile/lib/module_template/views/store_views_here.txt b/mobile/lib/module_template/views/store_views_here.txt
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/mobile/lib/modules/home/models/get_all_asset_respose.model.dart b/mobile/lib/modules/home/models/get_all_asset_respose.model.dart
new file mode 100644
index 0000000000..8338405ca7
--- /dev/null
+++ b/mobile/lib/modules/home/models/get_all_asset_respose.model.dart
@@ -0,0 +1,113 @@
+import 'dart:convert';
+
+import 'package:flutter/foundation.dart';
+import 'package:immich_mobile/shared/models/immich_asset.model.dart';
+
+class ImmichAssetGroupByDate {
+ final String date;
+ List assets;
+ ImmichAssetGroupByDate({
+ required this.date,
+ required this.assets,
+ });
+
+ ImmichAssetGroupByDate copyWith({
+ String? date,
+ List? assets,
+ }) {
+ return ImmichAssetGroupByDate(
+ date: date ?? this.date,
+ assets: assets ?? this.assets,
+ );
+ }
+
+ Map toMap() {
+ return {
+ 'date': date,
+ 'assets': assets.map((x) => x.toMap()).toList(),
+ };
+ }
+
+ factory ImmichAssetGroupByDate.fromMap(Map map) {
+ return ImmichAssetGroupByDate(
+ date: map['date'] ?? '',
+ assets: List.from(map['assets']?.map((x) => ImmichAsset.fromMap(x))),
+ );
+ }
+
+ String toJson() => json.encode(toMap());
+
+ factory ImmichAssetGroupByDate.fromJson(String source) => ImmichAssetGroupByDate.fromMap(json.decode(source));
+
+ @override
+ String toString() => 'ImmichAssetGroupByDate(date: $date, assets: $assets)';
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) return true;
+
+ return other is ImmichAssetGroupByDate && other.date == date && listEquals(other.assets, assets);
+ }
+
+ @override
+ int get hashCode => date.hashCode ^ assets.hashCode;
+}
+
+class GetAllAssetResponse {
+ final int count;
+ final List data;
+ final String nextPageKey;
+ GetAllAssetResponse({
+ required this.count,
+ required this.data,
+ required this.nextPageKey,
+ });
+
+ GetAllAssetResponse copyWith({
+ int? count,
+ List? data,
+ String? nextPageKey,
+ }) {
+ return GetAllAssetResponse(
+ count: count ?? this.count,
+ data: data ?? this.data,
+ nextPageKey: nextPageKey ?? this.nextPageKey,
+ );
+ }
+
+ Map toMap() {
+ return {
+ 'count': count,
+ 'data': data.map((x) => x.toMap()).toList(),
+ 'nextPageKey': nextPageKey,
+ };
+ }
+
+ factory GetAllAssetResponse.fromMap(Map map) {
+ return GetAllAssetResponse(
+ count: map['count']?.toInt() ?? 0,
+ data: List.from(map['data']?.map((x) => ImmichAssetGroupByDate.fromMap(x))),
+ nextPageKey: map['nextPageKey'] ?? '',
+ );
+ }
+
+ String toJson() => json.encode(toMap());
+
+ factory GetAllAssetResponse.fromJson(String source) => GetAllAssetResponse.fromMap(json.decode(source));
+
+ @override
+ String toString() => 'GetAllAssetResponse(count: $count, data: $data, nextPageKey: $nextPageKey)';
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) return true;
+
+ return other is GetAllAssetResponse &&
+ other.count == count &&
+ listEquals(other.data, data) &&
+ other.nextPageKey == nextPageKey;
+ }
+
+ @override
+ int get hashCode => count.hashCode ^ data.hashCode ^ nextPageKey.hashCode;
+}
diff --git a/mobile/lib/modules/home/providers/asset.provider.dart b/mobile/lib/modules/home/providers/asset.provider.dart
new file mode 100644
index 0000000000..6eca6f1326
--- /dev/null
+++ b/mobile/lib/modules/home/providers/asset.provider.dart
@@ -0,0 +1,60 @@
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:immich_mobile/modules/home/models/get_all_asset_respose.model.dart';
+import 'package:immich_mobile/modules/home/services/asset.service.dart';
+
+class AssetNotifier extends StateNotifier> {
+ final imagePerPage = 100;
+ final AssetService _assetService = AssetService();
+
+ AssetNotifier() : super([]);
+ late String? nextPageKey = "";
+ bool isFetching = false;
+
+ getImmichAssets() async {
+ GetAllAssetResponse? res = await _assetService.getAllAsset();
+ nextPageKey = res?.nextPageKey;
+
+ if (res != null) {
+ for (var assets in res.data) {
+ state = [...state, assets];
+ }
+ }
+ }
+
+ getMoreAsset() async {
+ if (nextPageKey != null && !isFetching) {
+ isFetching = true;
+ GetAllAssetResponse? res = await _assetService.getMoreAsset(nextPageKey);
+
+ if (res != null) {
+ nextPageKey = res.nextPageKey;
+
+ List previousState = state;
+ List currentState = [];
+
+ for (var assets in res.data) {
+ currentState = [...currentState, assets];
+ }
+
+ if (previousState.last.date == currentState.first.date) {
+ previousState.last.assets = [...previousState.last.assets, ...currentState.first.assets];
+ state = [...previousState, ...currentState.sublist(1)];
+ } else {
+ state = [...previousState, ...currentState];
+ }
+ }
+
+ isFetching = false;
+ }
+ }
+
+ clearAllAsset() {
+ state = [];
+ }
+}
+
+final currentLocalPageProvider = StateProvider((ref) => 0);
+
+final assetProvider = StateNotifierProvider>((ref) {
+ return AssetNotifier();
+});
diff --git a/mobile/lib/modules/home/services/asset.service.dart b/mobile/lib/modules/home/services/asset.service.dart
new file mode 100644
index 0000000000..63a99b4028
--- /dev/null
+++ b/mobile/lib/modules/home/services/asset.service.dart
@@ -0,0 +1,38 @@
+import 'dart:convert';
+
+import 'package:flutter/material.dart';
+import 'package:immich_mobile/modules/home/models/get_all_asset_respose.model.dart';
+import 'package:immich_mobile/shared/services/network.service.dart';
+
+class AssetService {
+ final NetworkService _networkService = NetworkService();
+
+ Future getAllAsset() async {
+ var res = await _networkService.getRequest(url: "asset/all");
+ try {
+ Map decodedData = jsonDecode(res.toString());
+
+ GetAllAssetResponse result = GetAllAssetResponse.fromMap(decodedData);
+ return result;
+ } catch (e) {
+ debugPrint("Error getAllAsset ${e.toString()}");
+ }
+ }
+
+ Future getMoreAsset(String? nextPageKey) async {
+ try {
+ var res = await _networkService.getRequest(
+ url: "asset/all?nextPageKey=$nextPageKey",
+ );
+
+ Map decodedData = jsonDecode(res.toString());
+
+ GetAllAssetResponse result = GetAllAssetResponse.fromMap(decodedData);
+ if (result.count != 0) {
+ return result;
+ }
+ } catch (e) {
+ debugPrint("Error getAllAsset ${e.toString()}");
+ }
+ }
+}
diff --git a/mobile/lib/modules/home/ui/image_grid.dart b/mobile/lib/modules/home/ui/image_grid.dart
new file mode 100644
index 0000000000..e5e0411e6e
--- /dev/null
+++ b/mobile/lib/modules/home/ui/image_grid.dart
@@ -0,0 +1,26 @@
+import 'package:flutter/material.dart';
+import 'package:immich_mobile/modules/home/ui/thumbnail_image.dart';
+import 'package:immich_mobile/shared/models/immich_asset.model.dart';
+
+class ImageGrid extends StatelessWidget {
+ final List assetGroup;
+
+ const ImageGrid({Key? key, required this.assetGroup}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return SliverGrid(
+ gridDelegate:
+ const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, crossAxisSpacing: 5.0, mainAxisSpacing: 5),
+ delegate: SliverChildBuilderDelegate(
+ (BuildContext context, int index) {
+ return GestureDetector(
+ onTap: () {},
+ child: ThumbnailImage(asset: assetGroup[index]),
+ );
+ },
+ childCount: assetGroup.length,
+ ),
+ );
+ }
+}
diff --git a/mobile/lib/modules/home/ui/immich_sliver_appbar.dart b/mobile/lib/modules/home/ui/immich_sliver_appbar.dart
new file mode 100644
index 0000000000..ed54d1f931
--- /dev/null
+++ b/mobile/lib/modules/home/ui/immich_sliver_appbar.dart
@@ -0,0 +1,105 @@
+import 'package:auto_route/auto_route.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:immich_mobile/modules/home/providers/asset.provider.dart';
+
+import 'package:immich_mobile/routing/router.dart';
+import 'package:immich_mobile/shared/models/backup_state.model.dart';
+import 'package:immich_mobile/shared/providers/backup.provider.dart';
+
+class ImmichSliverAppBar extends ConsumerWidget {
+ const ImmichSliverAppBar({
+ Key? key,
+ required this.imageGridGroup,
+ }) : super(key: key);
+
+ final List imageGridGroup;
+
+ @override
+ Widget build(BuildContext context, WidgetRef ref) {
+ final BackUpState _backupState = ref.watch(backupProvider);
+
+ return SliverPadding(
+ padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 5),
+ sliver: SliverAppBar(
+ centerTitle: true,
+ floating: true,
+ pinned: false,
+ snap: false,
+ backgroundColor: Colors.grey[200],
+ shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(5))),
+ leading: Builder(
+ builder: (BuildContext context) {
+ return IconButton(
+ icon: const Icon(Icons.account_circle_rounded),
+ onPressed: () {
+ Scaffold.of(context).openDrawer();
+ },
+ tooltip: MaterialLocalizations.of(context).openAppDrawerTooltip,
+ );
+ },
+ ),
+ title: Text(
+ 'IMMICH',
+ style: GoogleFonts.snowburstOne(
+ textStyle: TextStyle(
+ fontWeight: FontWeight.bold,
+ fontSize: 18,
+ color: Theme.of(context).primaryColor,
+ ),
+ ),
+ ),
+ actions: [
+ Stack(
+ alignment: AlignmentDirectional.center,
+ children: [
+ _backupState.backupProgress == BackUpProgressEnum.inProgress
+ ? Positioned(
+ top: 10,
+ right: 12,
+ child: SizedBox(
+ height: 8,
+ width: 8,
+ child: CircularProgressIndicator(
+ strokeWidth: 1,
+ valueColor: AlwaysStoppedAnimation(Theme.of(context).primaryColor),
+ ),
+ ),
+ )
+ : Container(),
+ IconButton(
+ icon: const Icon(Icons.backup_rounded),
+ tooltip: 'Backup Controller',
+ onPressed: () async {
+ var onPop = await AutoRouter.of(context).push(const BackupControllerRoute());
+
+ // Fetch new image
+ if (onPop == true) {
+ // Remove and force getting new widget again
+ if (imageGridGroup.isNotEmpty) {
+ ref.read(assetProvider.notifier).getMoreAsset();
+ } else {
+ ref.read(assetProvider.notifier).getImmichAssets();
+ }
+ }
+ },
+ ),
+ _backupState.backupProgress == BackUpProgressEnum.inProgress
+ ? Positioned(
+ bottom: 5,
+ child: Text(
+ _backupState.backingUpAssetCount.toString(),
+ style: const TextStyle(fontSize: 9, fontWeight: FontWeight.bold),
+ ),
+ )
+ : Container()
+ ],
+ ),
+ ],
+ systemOverlayStyle: SystemUiOverlayStyle.dark,
+ ),
+ );
+ }
+}
diff --git a/mobile/lib/modules/home/ui/profile_drawer.dart b/mobile/lib/modules/home/ui/profile_drawer.dart
new file mode 100644
index 0000000000..03b96d2d7f
--- /dev/null
+++ b/mobile/lib/modules/home/ui/profile_drawer.dart
@@ -0,0 +1,72 @@
+import 'package:auto_route/annotations.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/src/widgets/framework.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:immich_mobile/modules/home/providers/asset.provider.dart';
+import 'package:immich_mobile/modules/login/models/authentication_state.model.dart';
+import 'package:immich_mobile/modules/login/providers/authentication.provider.dart';
+import 'package:immich_mobile/routing/router.dart';
+
+class ProfileDrawer extends ConsumerWidget {
+ const ProfileDrawer({Key? key}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context, WidgetRef ref) {
+ AuthenticationState _authState = ref.watch(authenticationProvider);
+
+ return Drawer(
+ shape: const RoundedRectangleBorder(
+ borderRadius: BorderRadius.only(
+ topRight: Radius.circular(5),
+ bottomRight: Radius.circular(5),
+ ),
+ ),
+ child: ListView(
+ padding: EdgeInsets.zero,
+ children: [
+ DrawerHeader(
+ decoration: BoxDecoration(
+ color: Colors.grey[200],
+ ),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ const Image(
+ image: AssetImage('assets/immich-logo-no-outline.png'),
+ width: 50,
+ filterQuality: FilterQuality.high,
+ ),
+ const Padding(padding: EdgeInsets.all(8)),
+ Text(
+ _authState.userEmail,
+ style: TextStyle(color: Theme.of(context).primaryColor, fontWeight: FontWeight.bold),
+ )
+ ],
+ ),
+ ),
+ ListTile(
+ tileColor: Colors.grey[100],
+ leading: const Icon(
+ Icons.logout_rounded,
+ color: Colors.black54,
+ ),
+ title: const Text(
+ "Sign Out",
+ style: TextStyle(color: Colors.black54, fontSize: 14),
+ ),
+ onTap: () async {
+ bool res = await ref.read(authenticationProvider.notifier).logout();
+ ref.read(assetProvider.notifier).clearAllAsset();
+
+ if (res) {
+ AutoRouter.of(context).popUntilRoot();
+ }
+ },
+ )
+ ],
+ ),
+ );
+ }
+}
diff --git a/mobile/lib/modules/home/ui/thumbnail_image.dart b/mobile/lib/modules/home/ui/thumbnail_image.dart
new file mode 100644
index 0000000000..257ad20ffc
--- /dev/null
+++ b/mobile/lib/modules/home/ui/thumbnail_image.dart
@@ -0,0 +1,52 @@
+import 'package:auto_route/auto_route.dart';
+import 'package:cached_network_image/cached_network_image.dart';
+import 'package:flutter/material.dart';
+import 'package:hive_flutter/hive_flutter.dart';
+import 'package:immich_mobile/constants/hive_box.dart';
+import 'package:immich_mobile/shared/models/immich_asset.model.dart';
+import 'package:immich_mobile/routing/router.dart';
+import 'package:transparent_image/transparent_image.dart';
+
+class ThumbnailImage extends StatelessWidget {
+ final ImmichAsset asset;
+
+ const ThumbnailImage({Key? key, required this.asset}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ var box = Hive.box(userInfoBox);
+ var thumbnailRequestUrl =
+ '${box.get(serverEndpointKey)}/asset/file?aid=${asset.deviceAssetId}&did=${asset.deviceId}&isThumb=true';
+
+ return GestureDetector(
+ onTap: () {
+ AutoRouter.of(context).push(
+ ImageViewerRoute(
+ imageUrl:
+ '${box.get(serverEndpointKey)}/asset/file?aid=${asset.deviceAssetId}&did=${asset.deviceId}&isThumb=false',
+ heroTag: asset.id,
+ thumbnailUrl: thumbnailRequestUrl,
+ ),
+ );
+ },
+ onLongPress: () {},
+ child: Hero(
+ tag: asset.id,
+ child: CachedNetworkImage(
+ width: 300,
+ height: 300,
+ memCacheHeight: 250,
+ fit: BoxFit.cover,
+ imageUrl: thumbnailRequestUrl,
+ httpHeaders: {"Authorization": "Bearer ${box.get(accessTokenKey)}"},
+ fadeInDuration: const Duration(milliseconds: 250),
+ progressIndicatorBuilder: (context, url, downloadProgress) => Transform.scale(
+ scale: 0.2,
+ child: CircularProgressIndicator(value: downloadProgress.progress),
+ ),
+ errorWidget: (context, url, error) => const Icon(Icons.error),
+ ),
+ ),
+ );
+ }
+}
diff --git a/mobile/lib/modules/home/views/home_page.dart b/mobile/lib/modules/home/views/home_page.dart
new file mode 100644
index 0000000000..ad4142891a
--- /dev/null
+++ b/mobile/lib/modules/home/views/home_page.dart
@@ -0,0 +1,165 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_hooks/flutter_hooks.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:immich_mobile/modules/home/ui/immich_sliver_appbar.dart';
+import 'package:immich_mobile/modules/home/ui/profile_drawer.dart';
+import 'package:immich_mobile/shared/models/backup_state.model.dart';
+import 'package:immich_mobile/modules/home/models/get_all_asset_respose.model.dart';
+import 'package:immich_mobile/modules/home/ui/image_grid.dart';
+import 'package:immich_mobile/modules/home/providers/asset.provider.dart';
+import 'package:immich_mobile/shared/providers/backup.provider.dart';
+import 'package:intl/intl.dart';
+
+class HomePage extends HookConsumerWidget {
+ const HomePage({Key? key}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context, WidgetRef ref) {
+ final ValueNotifier _showBackToTopBtn = useState(false);
+ ScrollController _scrollController = useScrollController();
+ List assetGroup = ref.watch(assetProvider);
+ BackUpState _backupState = ref.watch(backupProvider);
+ List imageGridGroup = [];
+ List monthGroupKey = [];
+
+ _scrollControllerCallback() {
+ var endOfPage = _scrollController.position.maxScrollExtent;
+
+ if (_scrollController.offset >= endOfPage - (endOfPage * 0.1) && !_scrollController.position.outOfRange) {
+ ref.read(assetProvider.notifier).getMoreAsset();
+ }
+
+ if (_scrollController.offset >= 400) {
+ _showBackToTopBtn.value = true;
+ } else {
+ _showBackToTopBtn.value = false;
+ }
+ }
+
+ useEffect(() {
+ ref.read(assetProvider.notifier).getImmichAssets();
+
+ _scrollController.addListener(_scrollControllerCallback);
+
+ return () => _scrollController.removeListener(_scrollControllerCallback);
+ }, [_scrollController, key]);
+
+ Widget _buildBody() {
+ if (assetGroup.isNotEmpty) {
+ String lastGroupDate = assetGroup[0].date;
+
+ for (var group in assetGroup) {
+ var dateTitle = group.date;
+ var assetGroup = group.assets;
+
+ int? currentMonth = DateTime.tryParse(dateTitle)?.month;
+ int? previousMonth = DateTime.tryParse(lastGroupDate)?.month;
+
+ if ((currentMonth! - previousMonth!) != 0) {
+ var myKey = GlobalKey();
+ monthGroupKey.add(myKey);
+ // debugPrint("Group Key $myKey");
+
+ imageGridGroup.add(
+ SliverToBoxAdapter(
+ key: myKey,
+ child: Padding(
+ padding: const EdgeInsets.only(left: 10.0, top: 32),
+ child: Text(
+ DateFormat('MMMM, y').format(
+ DateTime.parse(dateTitle),
+ ),
+ style: TextStyle(
+ fontSize: 24,
+ fontWeight: FontWeight.bold,
+ color: Theme.of(context).primaryColor,
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+
+ imageGridGroup.add(
+ _buildDateGroupTitle(dateTitle),
+ );
+
+ imageGridGroup.add(ImageGrid(assetGroup: assetGroup));
+
+ lastGroupDate = dateTitle;
+ }
+
+ return SafeArea(
+ child: CustomScrollView(
+ controller: _scrollController,
+ slivers: [
+ ImmichSliverAppBar(imageGridGroup: imageGridGroup),
+ ...imageGridGroup,
+ ],
+ ),
+ );
+ } else {
+ return Container();
+ }
+ }
+
+ return Scaffold(
+ drawer: const ProfileDrawer(),
+ body: _buildBody(),
+ bottomNavigationBar: BottomAppBar(
+ child: IconButton(
+ onPressed: () {
+ if (monthGroupKey.isNotEmpty) {
+ var targetContext = monthGroupKey.last.currentContext;
+ if (targetContext != null) {
+ Scrollable.ensureVisible(
+ targetContext,
+ duration: const Duration(milliseconds: 400),
+ curve: Curves.easeInOut,
+ );
+ }
+ }
+ },
+ icon: const Icon(Icons.ac_unit_outlined),
+ ),
+ ),
+ floatingActionButton: _showBackToTopBtn.value
+ ? FloatingActionButton.small(
+ enableFeedback: true,
+ backgroundColor: Theme.of(context).secondaryHeaderColor,
+ foregroundColor: Theme.of(context).primaryColor,
+ onPressed: () {
+ _scrollController.animateTo(0, duration: const Duration(seconds: 1), curve: Curves.easeOutExpo);
+ },
+ child: const Icon(Icons.keyboard_arrow_up_rounded),
+ )
+ : null,
+ );
+ }
+
+ SliverToBoxAdapter _buildDateGroupTitle(String dateTitle) {
+ var currentYear = DateTime.now().year;
+ var groupYear = DateTime.parse(dateTitle).year;
+ var formatDateTemplate = currentYear == groupYear ? 'E, MMM dd' : 'E, MMM dd, yyyy';
+ return SliverToBoxAdapter(
+ child: Padding(
+ padding: const EdgeInsets.only(top: 24.0, bottom: 24.0, left: 3.0),
+ child: Row(
+ children: [
+ Padding(
+ padding: const EdgeInsets.only(left: 8.0, bottom: 5.0, top: 5.0),
+ child: Text(
+ DateFormat(formatDateTemplate).format(DateTime.parse(dateTitle)),
+ style: const TextStyle(
+ fontSize: 14,
+ fontWeight: FontWeight.bold,
+ color: Colors.black87,
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/mobile/lib/modules/login/models/authentication_state.model.dart b/mobile/lib/modules/login/models/authentication_state.model.dart
new file mode 100644
index 0000000000..bc0c868e22
--- /dev/null
+++ b/mobile/lib/modules/login/models/authentication_state.model.dart
@@ -0,0 +1,93 @@
+import 'dart:convert';
+
+import 'package:immich_mobile/shared/models/device_info.model.dart';
+
+class AuthenticationState {
+ final String deviceId;
+ final String deviceType;
+ final String userId;
+ final String userEmail;
+ final bool isAuthenticated;
+ final DeviceInfoRemote deviceInfo;
+
+ AuthenticationState({
+ required this.deviceId,
+ required this.deviceType,
+ required this.userId,
+ required this.userEmail,
+ required this.isAuthenticated,
+ required this.deviceInfo,
+ });
+
+ AuthenticationState copyWith({
+ String? deviceId,
+ String? deviceType,
+ String? userId,
+ String? userEmail,
+ bool? isAuthenticated,
+ DeviceInfoRemote? deviceInfo,
+ }) {
+ return AuthenticationState(
+ deviceId: deviceId ?? this.deviceId,
+ deviceType: deviceType ?? this.deviceType,
+ userId: userId ?? this.userId,
+ userEmail: userEmail ?? this.userEmail,
+ isAuthenticated: isAuthenticated ?? this.isAuthenticated,
+ deviceInfo: deviceInfo ?? this.deviceInfo,
+ );
+ }
+
+ @override
+ String toString() {
+ return 'AuthenticationState(deviceId: $deviceId, deviceType: $deviceType, userId: $userId, userEmail: $userEmail, isAuthenticated: $isAuthenticated, deviceInfo: $deviceInfo)';
+ }
+
+ Map toMap() {
+ return {
+ 'deviceId': deviceId,
+ 'deviceType': deviceType,
+ 'userId': userId,
+ 'userEmail': userEmail,
+ 'isAuthenticated': isAuthenticated,
+ 'deviceInfo': deviceInfo.toMap(),
+ };
+ }
+
+ factory AuthenticationState.fromMap(Map map) {
+ return AuthenticationState(
+ deviceId: map['deviceId'] ?? '',
+ deviceType: map['deviceType'] ?? '',
+ userId: map['userId'] ?? '',
+ userEmail: map['userEmail'] ?? '',
+ isAuthenticated: map['isAuthenticated'] ?? false,
+ deviceInfo: DeviceInfoRemote.fromMap(map['deviceInfo']),
+ );
+ }
+
+ String toJson() => json.encode(toMap());
+
+ factory AuthenticationState.fromJson(String source) => AuthenticationState.fromMap(json.decode(source));
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) return true;
+
+ return other is AuthenticationState &&
+ other.deviceId == deviceId &&
+ other.deviceType == deviceType &&
+ other.userId == userId &&
+ other.userEmail == userEmail &&
+ other.isAuthenticated == isAuthenticated &&
+ other.deviceInfo == deviceInfo;
+ }
+
+ @override
+ int get hashCode {
+ return deviceId.hashCode ^
+ deviceType.hashCode ^
+ userId.hashCode ^
+ userEmail.hashCode ^
+ isAuthenticated.hashCode ^
+ deviceInfo.hashCode;
+ }
+}
diff --git a/mobile/lib/modules/login/models/login_response.model.dart b/mobile/lib/modules/login/models/login_response.model.dart
new file mode 100644
index 0000000000..3c2032a842
--- /dev/null
+++ b/mobile/lib/modules/login/models/login_response.model.dart
@@ -0,0 +1,61 @@
+import 'dart:convert';
+
+class LogInReponse {
+ final String accessToken;
+ final String userId;
+ final String userEmail;
+
+ LogInReponse({
+ required this.accessToken,
+ required this.userId,
+ required this.userEmail,
+ });
+
+ LogInReponse copyWith({
+ String? accessToken,
+ String? userId,
+ String? userEmail,
+ }) {
+ return LogInReponse(
+ accessToken: accessToken ?? this.accessToken,
+ userId: userId ?? this.userId,
+ userEmail: userEmail ?? this.userEmail,
+ );
+ }
+
+ Map toMap() {
+ return {
+ 'accessToken': accessToken,
+ 'userId': userId,
+ 'userEmail': userEmail,
+ };
+ }
+
+ factory LogInReponse.fromMap(Map map) {
+ return LogInReponse(
+ accessToken: map['accessToken'] ?? '',
+ userId: map['userId'] ?? '',
+ userEmail: map['userEmail'] ?? '',
+ );
+ }
+
+ String toJson() => json.encode(toMap());
+
+ factory LogInReponse.fromJson(String source) => LogInReponse.fromMap(json.decode(source));
+
+ @override
+ String toString() => 'LogInReponse(accessToken: $accessToken, userId: $userId, userEmail: $userEmail)';
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) return true;
+
+ return other is LogInReponse &&
+ other.accessToken == accessToken &&
+ other.userId == userId &&
+ other.userEmail == userEmail;
+ }
+
+ @override
+ int get hashCode => accessToken.hashCode ^ userId.hashCode ^ userEmail.hashCode;
+}
diff --git a/mobile/lib/modules/login/providers/authentication.provider.dart b/mobile/lib/modules/login/providers/authentication.provider.dart
new file mode 100644
index 0000000000..90699f1d39
--- /dev/null
+++ b/mobile/lib/modules/login/providers/authentication.provider.dart
@@ -0,0 +1,127 @@
+import 'package:dio/dio.dart';
+import 'package:flutter/material.dart';
+import 'package:hive/hive.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:immich_mobile/constants/hive_box.dart';
+import 'package:immich_mobile/modules/login/models/authentication_state.model.dart';
+import 'package:immich_mobile/modules/login/models/login_response.model.dart';
+import 'package:immich_mobile/shared/services/backup.service.dart';
+import 'package:immich_mobile/shared/services/device_info.service.dart';
+import 'package:immich_mobile/shared/services/network.service.dart';
+import 'package:immich_mobile/shared/models/device_info.model.dart';
+import 'package:immich_mobile/utils/dio_http_interceptor.dart';
+
+class AuthenticationNotifier extends StateNotifier {
+ AuthenticationNotifier()
+ : super(
+ AuthenticationState(
+ deviceId: "",
+ deviceType: "",
+ isAuthenticated: false,
+ userId: "",
+ userEmail: "",
+ deviceInfo: DeviceInfoRemote(
+ id: 0,
+ userId: "",
+ deviceId: "",
+ deviceType: "",
+ notificationToken: "",
+ createdAt: "",
+ isAutoBackup: false,
+ ),
+ ),
+ );
+
+ final DeviceInfoService _deviceInfoService = DeviceInfoService();
+ final BackupService _backupService = BackupService();
+ final NetworkService _networkService = NetworkService();
+
+ Future login(String email, String password, String serverEndpoint) async {
+ // Store server endpoint to Hive and test endpoint
+ if (serverEndpoint[serverEndpoint.length - 1] == "/") {
+ var validUrl = serverEndpoint.substring(0, serverEndpoint.length - 1);
+ Hive.box(userInfoBox).put(serverEndpointKey, validUrl);
+ } else {
+ Hive.box(userInfoBox).put(serverEndpointKey, serverEndpoint);
+ }
+
+ bool isServerEndpointVerified = await _networkService.pingServer();
+ if (!isServerEndpointVerified) {
+ return false;
+ }
+
+ // Store device id to local storage
+ var deviceInfo = await _deviceInfoService.getDeviceInfo();
+ Hive.box(userInfoBox).put(deviceIdKey, deviceInfo["deviceId"]);
+
+ state = state.copyWith(
+ deviceId: deviceInfo["deviceId"],
+ deviceType: deviceInfo["deviceType"],
+ );
+
+ // Make sign-in request
+ try {
+ Response res = await _networkService.postRequest(url: 'auth/login', data: {'email': email, 'password': password});
+
+ var payload = LogInReponse.fromJson(res.toString());
+
+ Hive.box(userInfoBox).put(accessTokenKey, payload.accessToken);
+
+ state = state.copyWith(
+ isAuthenticated: true,
+ userId: payload.userId,
+ userEmail: payload.userEmail,
+ );
+ } catch (e) {
+ return false;
+ }
+
+ // Register device info
+ try {
+ Response res = await _networkService
+ .postRequest(url: 'device-info', data: {'deviceId': state.deviceId, 'deviceType': state.deviceType});
+
+ DeviceInfoRemote deviceInfo = DeviceInfoRemote.fromJson(res.toString());
+ state = state.copyWith(deviceInfo: deviceInfo);
+ } catch (e) {
+ debugPrint("ERROR Register Device Info: $e");
+ }
+
+ return true;
+ }
+
+ Future logout() async {
+ Hive.box(userInfoBox).delete(accessTokenKey);
+ state = AuthenticationState(
+ deviceId: "",
+ deviceType: "",
+ isAuthenticated: false,
+ userId: "",
+ userEmail: "",
+ deviceInfo: DeviceInfoRemote(
+ id: 0,
+ userId: "",
+ deviceId: "",
+ deviceType: "",
+ notificationToken: "",
+ createdAt: "",
+ isAutoBackup: false,
+ ),
+ );
+
+ return true;
+ }
+
+ setAutoBackup(bool backupState) async {
+ var deviceInfo = await _deviceInfoService.getDeviceInfo();
+ var deviceId = deviceInfo["deviceId"];
+ var deviceType = deviceInfo["deviceType"];
+
+ DeviceInfoRemote deviceInfoRemote = await _backupService.setAutoBackup(backupState, deviceId, deviceType);
+ state = state.copyWith(deviceInfo: deviceInfoRemote);
+ }
+}
+
+final authenticationProvider = StateNotifierProvider((ref) {
+ return AuthenticationNotifier();
+});
diff --git a/mobile/lib/modules/login/ui/login_form.dart b/mobile/lib/modules/login/ui/login_form.dart
new file mode 100644
index 0000000000..058f6bd63a
--- /dev/null
+++ b/mobile/lib/modules/login/ui/login_form.dart
@@ -0,0 +1,124 @@
+import 'package:auto_route/auto_route.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_hooks/flutter_hooks.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:immich_mobile/modules/login/providers/authentication.provider.dart';
+
+class LoginForm extends HookConsumerWidget {
+ const LoginForm({Key? key}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context, WidgetRef ref) {
+ final usernameController = useTextEditingController(text: 'testuser@email.com');
+ final passwordController = useTextEditingController(text: 'password');
+ final serverEndpointController = useTextEditingController(text: 'http://192.168.1.216');
+
+ return Center(
+ child: ConstrainedBox(
+ constraints: const BoxConstraints(maxWidth: 300),
+ child: Wrap(
+ spacing: 32,
+ runSpacing: 32,
+ alignment: WrapAlignment.center,
+ children: [
+ const Image(
+ image: AssetImage('assets/immich-logo-no-outline.png'),
+ width: 128,
+ filterQuality: FilterQuality.high,
+ ),
+ Text(
+ 'IMMICH',
+ style: GoogleFonts.snowburstOne(
+ textStyle:
+ TextStyle(fontWeight: FontWeight.bold, fontSize: 48, color: Theme.of(context).primaryColor)),
+ ),
+ EmailInput(controller: usernameController),
+ PasswordInput(controller: passwordController),
+ ServerEndpointInput(controller: serverEndpointController),
+ LoginButton(
+ emailController: usernameController,
+ passwordController: passwordController,
+ serverEndpointController: serverEndpointController,
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
+
+class ServerEndpointInput extends StatelessWidget {
+ final TextEditingController controller;
+
+ const ServerEndpointInput({Key? key, required this.controller}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return TextFormField(
+ controller: controller,
+ decoration: const InputDecoration(
+ labelText: 'Server Endpoint URL', border: OutlineInputBorder(), hintText: 'http://your-server-ip:port'),
+ );
+ }
+}
+
+class EmailInput extends StatelessWidget {
+ final TextEditingController controller;
+
+ const EmailInput({Key? key, required this.controller}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return TextFormField(
+ controller: controller,
+ decoration:
+ const InputDecoration(labelText: 'email', border: OutlineInputBorder(), hintText: 'youremail@email.com'),
+ );
+ }
+}
+
+class PasswordInput extends StatelessWidget {
+ final TextEditingController controller;
+
+ const PasswordInput({Key? key, required this.controller}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return TextFormField(
+ obscureText: true,
+ controller: controller,
+ decoration: const InputDecoration(labelText: 'Password', border: OutlineInputBorder(), hintText: 'password'),
+ );
+ }
+}
+
+class LoginButton extends ConsumerWidget {
+ final TextEditingController emailController;
+ final TextEditingController passwordController;
+ final TextEditingController serverEndpointController;
+
+ const LoginButton(
+ {Key? key,
+ required this.emailController,
+ required this.passwordController,
+ required this.serverEndpointController})
+ : super(key: key);
+
+ @override
+ Widget build(BuildContext context, WidgetRef ref) {
+ return ElevatedButton(
+ onPressed: () async {
+ var isAuthenicated = await ref
+ .read(authenticationProvider.notifier)
+ .login(emailController.text, passwordController.text, serverEndpointController.text);
+
+ if (isAuthenicated) {
+ AutoRouter.of(context).pushNamed("/home-page");
+ } else {
+ debugPrint("BAD LOGIN TRY AGAIN - Show UI Here");
+ }
+ },
+ child: const Text("Login"));
+ }
+}
diff --git a/mobile/lib/modules/login/views/login_page.dart b/mobile/lib/modules/login/views/login_page.dart
new file mode 100644
index 0000000000..c590b8d574
--- /dev/null
+++ b/mobile/lib/modules/login/views/login_page.dart
@@ -0,0 +1,16 @@
+import 'package:auto_route/auto_route.dart';
+import 'package:flutter/material.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:immich_mobile/modules/login/providers/authentication.provider.dart';
+import 'package:immich_mobile/modules/login/ui/login_form.dart';
+
+class LoginPage extends HookConsumerWidget {
+ const LoginPage({Key? key}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context, WidgetRef ref) {
+ return const Scaffold(
+ body: LoginForm(),
+ );
+ }
+}
diff --git a/mobile/lib/routing/auth_guard.dart b/mobile/lib/routing/auth_guard.dart
new file mode 100644
index 0000000000..c0aec9a996
--- /dev/null
+++ b/mobile/lib/routing/auth_guard.dart
@@ -0,0 +1,22 @@
+import 'dart:convert';
+
+import 'package:auto_route/auto_route.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:immich_mobile/shared/services/network.service.dart';
+
+class AuthGuard extends AutoRouteGuard {
+ final NetworkService _networkService = NetworkService();
+
+ @override
+ void onNavigation(NavigationResolver resolver, StackRouter router) async {
+ try {
+ var res = await _networkService.postRequest(url: 'auth/validateToken');
+ var jsonReponse = jsonDecode(res.toString());
+ if (jsonReponse['authStatus']) {
+ resolver.next(true);
+ }
+ } catch (e) {
+ router.removeUntil((route) => route.name == "LoginRoute");
+ }
+ }
+}
diff --git a/mobile/lib/routing/router.dart b/mobile/lib/routing/router.dart
new file mode 100644
index 0000000000..797117d914
--- /dev/null
+++ b/mobile/lib/routing/router.dart
@@ -0,0 +1,22 @@
+import 'package:auto_route/auto_route.dart';
+import 'package:flutter/widgets.dart';
+import 'package:immich_mobile/modules/login/views/login_page.dart';
+import 'package:immich_mobile/modules/home/views/home_page.dart';
+import 'package:immich_mobile/routing/auth_guard.dart';
+import 'package:immich_mobile/shared/views/backup_controller_page.dart';
+import 'package:immich_mobile/shared/views/image_viewer_page.dart';
+
+part 'router.gr.dart';
+
+@MaterialAutoRouter(
+ replaceInRouteName: 'Page,Route',
+ routes: [
+ AutoRoute(page: LoginPage, initial: true),
+ AutoRoute(page: HomePage, guards: [AuthGuard]),
+ AutoRoute(page: BackupControllerPage, guards: [AuthGuard]),
+ AutoRoute(page: ImageViewerPage, guards: [AuthGuard]),
+ ],
+)
+class AppRouter extends _$AppRouter {
+ AppRouter() : super(authGuard: AuthGuard());
+}
diff --git a/mobile/lib/routing/router.gr.dart b/mobile/lib/routing/router.gr.dart
new file mode 100644
index 0000000000..cc76a25b74
--- /dev/null
+++ b/mobile/lib/routing/router.gr.dart
@@ -0,0 +1,122 @@
+// **************************************************************************
+// AutoRouteGenerator
+// **************************************************************************
+
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+// **************************************************************************
+// AutoRouteGenerator
+// **************************************************************************
+//
+// ignore_for_file: type=lint
+
+part of 'router.dart';
+
+class _$AppRouter extends RootStackRouter {
+ _$AppRouter(
+ {GlobalKey? navigatorKey, required this.authGuard})
+ : super(navigatorKey);
+
+ final AuthGuard authGuard;
+
+ @override
+ final Map pagesMap = {
+ LoginRoute.name: (routeData) {
+ return MaterialPageX(
+ routeData: routeData, child: const LoginPage());
+ },
+ HomeRoute.name: (routeData) {
+ return MaterialPageX(
+ routeData: routeData, child: const HomePage());
+ },
+ BackupControllerRoute.name: (routeData) {
+ return MaterialPageX(
+ routeData: routeData, child: const BackupControllerPage());
+ },
+ ImageViewerRoute.name: (routeData) {
+ final args = routeData.argsAs();
+ return MaterialPageX(
+ routeData: routeData,
+ child: ImageViewerPage(
+ key: args.key,
+ imageUrl: args.imageUrl,
+ heroTag: args.heroTag,
+ thumbnailUrl: args.thumbnailUrl));
+ }
+ };
+
+ @override
+ List get routes => [
+ RouteConfig(LoginRoute.name, path: '/'),
+ RouteConfig(HomeRoute.name, path: '/home-page', guards: [authGuard]),
+ RouteConfig(BackupControllerRoute.name,
+ path: '/backup-controller-page', guards: [authGuard]),
+ RouteConfig(ImageViewerRoute.name,
+ path: '/image-viewer-page', guards: [authGuard])
+ ];
+}
+
+/// generated route for
+/// [LoginPage]
+class LoginRoute extends PageRouteInfo {
+ const LoginRoute() : super(LoginRoute.name, path: '/');
+
+ static const String name = 'LoginRoute';
+}
+
+/// generated route for
+/// [HomePage]
+class HomeRoute extends PageRouteInfo {
+ const HomeRoute() : super(HomeRoute.name, path: '/home-page');
+
+ static const String name = 'HomeRoute';
+}
+
+/// generated route for
+/// [BackupControllerPage]
+class BackupControllerRoute extends PageRouteInfo {
+ const BackupControllerRoute()
+ : super(BackupControllerRoute.name, path: '/backup-controller-page');
+
+ static const String name = 'BackupControllerRoute';
+}
+
+/// generated route for
+/// [ImageViewerPage]
+class ImageViewerRoute extends PageRouteInfo {
+ ImageViewerRoute(
+ {Key? key,
+ required String imageUrl,
+ required String heroTag,
+ required String thumbnailUrl})
+ : super(ImageViewerRoute.name,
+ path: '/image-viewer-page',
+ args: ImageViewerRouteArgs(
+ key: key,
+ imageUrl: imageUrl,
+ heroTag: heroTag,
+ thumbnailUrl: thumbnailUrl));
+
+ static const String name = 'ImageViewerRoute';
+}
+
+class ImageViewerRouteArgs {
+ const ImageViewerRouteArgs(
+ {this.key,
+ required this.imageUrl,
+ required this.heroTag,
+ required this.thumbnailUrl});
+
+ final Key? key;
+
+ final String imageUrl;
+
+ final String heroTag;
+
+ final String thumbnailUrl;
+
+ @override
+ String toString() {
+ return 'ImageViewerRouteArgs{key: $key, imageUrl: $imageUrl, heroTag: $heroTag, thumbnailUrl: $thumbnailUrl}';
+ }
+}
diff --git a/mobile/lib/shared/models/backup_state.model.dart b/mobile/lib/shared/models/backup_state.model.dart
new file mode 100644
index 0000000000..db78327376
--- /dev/null
+++ b/mobile/lib/shared/models/backup_state.model.dart
@@ -0,0 +1,77 @@
+import 'dart:convert';
+
+import 'package:dio/dio.dart';
+
+import 'package:immich_mobile/shared/models/server_info.model.dart';
+
+enum BackUpProgressEnum { idle, inProgress, done }
+
+class BackUpState {
+ final BackUpProgressEnum backupProgress;
+ final int totalAssetCount;
+ final int assetOnDatabase;
+ final int backingUpAssetCount;
+ final double progressInPercentage;
+ final CancelToken cancelToken;
+ final ServerInfo serverInfo;
+
+ BackUpState({
+ required this.backupProgress,
+ required this.totalAssetCount,
+ required this.assetOnDatabase,
+ required this.backingUpAssetCount,
+ required this.progressInPercentage,
+ required this.cancelToken,
+ required this.serverInfo,
+ });
+
+ BackUpState copyWith({
+ BackUpProgressEnum? backupProgress,
+ int? totalAssetCount,
+ int? assetOnDatabase,
+ int? backingUpAssetCount,
+ double? progressInPercentage,
+ CancelToken? cancelToken,
+ ServerInfo? serverInfo,
+ }) {
+ return BackUpState(
+ backupProgress: backupProgress ?? this.backupProgress,
+ totalAssetCount: totalAssetCount ?? this.totalAssetCount,
+ assetOnDatabase: assetOnDatabase ?? this.assetOnDatabase,
+ backingUpAssetCount: backingUpAssetCount ?? this.backingUpAssetCount,
+ progressInPercentage: progressInPercentage ?? this.progressInPercentage,
+ cancelToken: cancelToken ?? this.cancelToken,
+ serverInfo: serverInfo ?? this.serverInfo,
+ );
+ }
+
+ @override
+ String toString() {
+ return 'BackUpState(backupProgress: $backupProgress, totalAssetCount: $totalAssetCount, assetOnDatabase: $assetOnDatabase, backingUpAssetCount: $backingUpAssetCount, progressInPercentage: $progressInPercentage, cancelToken: $cancelToken, serverInfo: $serverInfo)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) return true;
+
+ return other is BackUpState &&
+ other.backupProgress == backupProgress &&
+ other.totalAssetCount == totalAssetCount &&
+ other.assetOnDatabase == assetOnDatabase &&
+ other.backingUpAssetCount == backingUpAssetCount &&
+ other.progressInPercentage == progressInPercentage &&
+ other.cancelToken == cancelToken &&
+ other.serverInfo == serverInfo;
+ }
+
+ @override
+ int get hashCode {
+ return backupProgress.hashCode ^
+ totalAssetCount.hashCode ^
+ assetOnDatabase.hashCode ^
+ backingUpAssetCount.hashCode ^
+ progressInPercentage.hashCode ^
+ cancelToken.hashCode ^
+ serverInfo.hashCode;
+ }
+}
diff --git a/mobile/lib/shared/models/device_info.model.dart b/mobile/lib/shared/models/device_info.model.dart
new file mode 100644
index 0000000000..359bf6e65a
--- /dev/null
+++ b/mobile/lib/shared/models/device_info.model.dart
@@ -0,0 +1,100 @@
+import 'dart:convert';
+import 'dart:ffi';
+
+class DeviceInfoRemote {
+ final int id;
+ final String userId;
+ final String deviceId;
+ final String deviceType;
+ final String notificationToken;
+ final String createdAt;
+ final bool isAutoBackup;
+
+ DeviceInfoRemote({
+ required this.id,
+ required this.userId,
+ required this.deviceId,
+ required this.deviceType,
+ required this.notificationToken,
+ required this.createdAt,
+ required this.isAutoBackup,
+ });
+
+ DeviceInfoRemote copyWith({
+ int? id,
+ String? userId,
+ String? deviceId,
+ String? deviceType,
+ String? notificationToken,
+ String? createdAt,
+ bool? isAutoBackup,
+ }) {
+ return DeviceInfoRemote(
+ id: id ?? this.id,
+ userId: userId ?? this.userId,
+ deviceId: deviceId ?? this.deviceId,
+ deviceType: deviceType ?? this.deviceType,
+ notificationToken: notificationToken ?? this.notificationToken,
+ createdAt: createdAt ?? this.createdAt,
+ isAutoBackup: isAutoBackup ?? this.isAutoBackup,
+ );
+ }
+
+ Map toMap() {
+ return {
+ 'id': id,
+ 'userId': userId,
+ 'deviceId': deviceId,
+ 'deviceType': deviceType,
+ 'notificationToken': notificationToken,
+ 'createdAt': createdAt,
+ 'isAutoBackup': isAutoBackup,
+ };
+ }
+
+ factory DeviceInfoRemote.fromMap(Map map) {
+ return DeviceInfoRemote(
+ id: map['id']?.toInt() ?? 0,
+ userId: map['userId'] ?? '',
+ deviceId: map['deviceId'] ?? '',
+ deviceType: map['deviceType'] ?? '',
+ notificationToken: map['notificationToken'] ?? '',
+ createdAt: map['createdAt'] ?? '',
+ isAutoBackup: map['isAutoBackup'] ?? false,
+ );
+ }
+
+ String toJson() => json.encode(toMap());
+
+ factory DeviceInfoRemote.fromJson(String source) => DeviceInfoRemote.fromMap(json.decode(source));
+
+ @override
+ String toString() {
+ return 'DeviceInfo(id: $id, userId: $userId, deviceId: $deviceId, deviceType: $deviceType, notificationToken: $notificationToken, createdAt: $createdAt, isAutoBackup: $isAutoBackup)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) return true;
+
+ return other is DeviceInfoRemote &&
+ other.id == id &&
+ other.userId == userId &&
+ other.deviceId == deviceId &&
+ other.deviceType == deviceType &&
+ other.notificationToken == notificationToken &&
+ other.createdAt == createdAt &&
+ other.isAutoBackup == isAutoBackup;
+ }
+
+ @override
+ int get hashCode {
+ return id.hashCode ^
+ userId.hashCode ^
+ deviceId.hashCode ^
+ deviceType.hashCode ^
+ notificationToken.hashCode ^
+ createdAt.hashCode ^
+ isAutoBackup.hashCode;
+ }
+}
diff --git a/mobile/lib/shared/models/image_viewer_page_data.model.dart b/mobile/lib/shared/models/image_viewer_page_data.model.dart
new file mode 100644
index 0000000000..8d101b5e8f
--- /dev/null
+++ b/mobile/lib/shared/models/image_viewer_page_data.model.dart
@@ -0,0 +1,11 @@
+class ImageViewerPageData {
+ final String heroTag;
+ final String imageUrl;
+ final String thumbnailUrl;
+
+ ImageViewerPageData({
+ required this.heroTag,
+ required this.imageUrl,
+ required this.thumbnailUrl,
+ });
+}
diff --git a/mobile/lib/shared/models/immich_asset.model.dart b/mobile/lib/shared/models/immich_asset.model.dart
new file mode 100644
index 0000000000..85c0f89a72
--- /dev/null
+++ b/mobile/lib/shared/models/immich_asset.model.dart
@@ -0,0 +1,131 @@
+import 'dart:convert';
+
+class ImmichAsset {
+ final String id;
+ final String deviceAssetId;
+ final String userId;
+ final String deviceId;
+ final String assetType;
+ final String localPath;
+ final String remotePath;
+ final String createdAt;
+ final String modifiedAt;
+ final bool isFavorite;
+ final String? description;
+
+ ImmichAsset({
+ required this.id,
+ required this.deviceAssetId,
+ required this.userId,
+ required this.deviceId,
+ required this.assetType,
+ required this.localPath,
+ required this.remotePath,
+ required this.createdAt,
+ required this.modifiedAt,
+ required this.isFavorite,
+ this.description,
+ });
+
+ ImmichAsset copyWith({
+ String? id,
+ String? deviceAssetId,
+ String? userId,
+ String? deviceId,
+ String? assetType,
+ String? localPath,
+ String? remotePath,
+ String? createdAt,
+ String? modifiedAt,
+ bool? isFavorite,
+ String? description,
+ }) {
+ return ImmichAsset(
+ id: id ?? this.id,
+ deviceAssetId: deviceAssetId ?? this.deviceAssetId,
+ userId: userId ?? this.userId,
+ deviceId: deviceId ?? this.deviceId,
+ assetType: assetType ?? this.assetType,
+ localPath: localPath ?? this.localPath,
+ remotePath: remotePath ?? this.remotePath,
+ createdAt: createdAt ?? this.createdAt,
+ modifiedAt: modifiedAt ?? this.modifiedAt,
+ isFavorite: isFavorite ?? this.isFavorite,
+ description: description ?? this.description,
+ );
+ }
+
+ Map toMap() {
+ return {
+ 'id': id,
+ 'deviceAssetId': deviceAssetId,
+ 'userId': userId,
+ 'deviceId': deviceId,
+ 'assetType': assetType,
+ 'localPath': localPath,
+ 'remotePath': remotePath,
+ 'createdAt': createdAt,
+ 'modifiedAt': modifiedAt,
+ 'isFavorite': isFavorite,
+ 'description': description,
+ };
+ }
+
+ factory ImmichAsset.fromMap(Map map) {
+ return ImmichAsset(
+ id: map['id'] ?? '',
+ deviceAssetId: map['deviceAssetId'] ?? '',
+ userId: map['userId'] ?? '',
+ deviceId: map['deviceId'] ?? '',
+ assetType: map['assetType'] ?? '',
+ localPath: map['localPath'] ?? '',
+ remotePath: map['remotePath'] ?? '',
+ createdAt: map['createdAt'] ?? '',
+ modifiedAt: map['modifiedAt'] ?? '',
+ isFavorite: map['isFavorite'] ?? false,
+ description: map['description'],
+ );
+ }
+
+ String toJson() => json.encode(toMap());
+
+ factory ImmichAsset.fromJson(String source) => ImmichAsset.fromMap(json.decode(source));
+
+ @override
+ String toString() {
+ return 'ImmichAsset(id: $id, deviceAssetId: $deviceAssetId, userId: $userId, deviceId: $deviceId, assetType: $assetType, localPath: $localPath, remotePath: $remotePath, createdAt: $createdAt, modifiedAt: $modifiedAt, isFavorite: $isFavorite, description: $description)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) return true;
+
+ return other is ImmichAsset &&
+ other.id == id &&
+ other.deviceAssetId == deviceAssetId &&
+ other.userId == userId &&
+ other.deviceId == deviceId &&
+ other.assetType == assetType &&
+ other.localPath == localPath &&
+ other.remotePath == remotePath &&
+ other.createdAt == createdAt &&
+ other.modifiedAt == modifiedAt &&
+ other.isFavorite == isFavorite &&
+ other.description == description;
+ }
+
+ @override
+ int get hashCode {
+ return id.hashCode ^
+ deviceAssetId.hashCode ^
+ userId.hashCode ^
+ deviceId.hashCode ^
+ assetType.hashCode ^
+ localPath.hashCode ^
+ remotePath.hashCode ^
+ createdAt.hashCode ^
+ modifiedAt.hashCode ^
+ isFavorite.hashCode ^
+ description.hashCode;
+ }
+}
diff --git a/mobile/lib/shared/models/server_info.model.dart b/mobile/lib/shared/models/server_info.model.dart
new file mode 100644
index 0000000000..7cb2c77c13
--- /dev/null
+++ b/mobile/lib/shared/models/server_info.model.dart
@@ -0,0 +1,98 @@
+import 'dart:convert';
+
+class ServerInfo {
+ final String diskSize;
+ final String diskUse;
+ final String diskAvailable;
+ final int diskSizeRaw;
+ final int diskUseRaw;
+ final int diskAvailableRaw;
+ final double diskUsagePercentage;
+ ServerInfo({
+ required this.diskSize,
+ required this.diskUse,
+ required this.diskAvailable,
+ required this.diskSizeRaw,
+ required this.diskUseRaw,
+ required this.diskAvailableRaw,
+ required this.diskUsagePercentage,
+ });
+
+ ServerInfo copyWith({
+ String? diskSize,
+ String? diskUse,
+ String? diskAvailable,
+ int? diskSizeRaw,
+ int? diskUseRaw,
+ int? diskAvailableRaw,
+ double? diskUsagePercentage,
+ }) {
+ return ServerInfo(
+ diskSize: diskSize ?? this.diskSize,
+ diskUse: diskUse ?? this.diskUse,
+ diskAvailable: diskAvailable ?? this.diskAvailable,
+ diskSizeRaw: diskSizeRaw ?? this.diskSizeRaw,
+ diskUseRaw: diskUseRaw ?? this.diskUseRaw,
+ diskAvailableRaw: diskAvailableRaw ?? this.diskAvailableRaw,
+ diskUsagePercentage: diskUsagePercentage ?? this.diskUsagePercentage,
+ );
+ }
+
+ Map toMap() {
+ return {
+ 'diskSize': diskSize,
+ 'diskUse': diskUse,
+ 'diskAvailable': diskAvailable,
+ 'diskSizeRaw': diskSizeRaw,
+ 'diskUseRaw': diskUseRaw,
+ 'diskAvailableRaw': diskAvailableRaw,
+ 'diskUsagePercentage': diskUsagePercentage,
+ };
+ }
+
+ factory ServerInfo.fromMap(Map map) {
+ return ServerInfo(
+ diskSize: map['diskSize'] ?? '',
+ diskUse: map['diskUse'] ?? '',
+ diskAvailable: map['diskAvailable'] ?? '',
+ diskSizeRaw: map['diskSizeRaw']?.toInt() ?? 0,
+ diskUseRaw: map['diskUseRaw']?.toInt() ?? 0,
+ diskAvailableRaw: map['diskAvailableRaw']?.toInt() ?? 0,
+ diskUsagePercentage: map['diskUsagePercentage']?.toDouble() ?? 0.0,
+ );
+ }
+
+ String toJson() => json.encode(toMap());
+
+ factory ServerInfo.fromJson(String source) => ServerInfo.fromMap(json.decode(source));
+
+ @override
+ String toString() {
+ return 'ServerInfo(diskSize: $diskSize, diskUse: $diskUse, diskAvailable: $diskAvailable, diskSizeRaw: $diskSizeRaw, diskUseRaw: $diskUseRaw, diskAvailableRaw: $diskAvailableRaw, diskUsagePercentage: $diskUsagePercentage)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) return true;
+
+ return other is ServerInfo &&
+ other.diskSize == diskSize &&
+ other.diskUse == diskUse &&
+ other.diskAvailable == diskAvailable &&
+ other.diskSizeRaw == diskSizeRaw &&
+ other.diskUseRaw == diskUseRaw &&
+ other.diskAvailableRaw == diskAvailableRaw &&
+ other.diskUsagePercentage == diskUsagePercentage;
+ }
+
+ @override
+ int get hashCode {
+ return diskSize.hashCode ^
+ diskUse.hashCode ^
+ diskAvailable.hashCode ^
+ diskSizeRaw.hashCode ^
+ diskUseRaw.hashCode ^
+ diskAvailableRaw.hashCode ^
+ diskUsagePercentage.hashCode;
+ }
+}
diff --git a/mobile/lib/shared/providers/app_state.provider.dart b/mobile/lib/shared/providers/app_state.provider.dart
new file mode 100644
index 0000000000..32854d925b
--- /dev/null
+++ b/mobile/lib/shared/providers/app_state.provider.dart
@@ -0,0 +1,13 @@
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+
+enum AppStateEnum {
+ active,
+ inactive,
+ paused,
+ resumed,
+ detached,
+}
+
+final appStateProvider = StateProvider((ref) {
+ return AppStateEnum.active;
+});
diff --git a/mobile/lib/shared/providers/backup.provider.dart b/mobile/lib/shared/providers/backup.provider.dart
new file mode 100644
index 0000000000..e17466e053
--- /dev/null
+++ b/mobile/lib/shared/providers/backup.provider.dart
@@ -0,0 +1,137 @@
+import 'package:dio/dio.dart';
+import 'package:flutter/foundation.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:immich_mobile/shared/services/server_info.service.dart';
+import 'package:immich_mobile/shared/models/backup_state.model.dart';
+import 'package:immich_mobile/shared/models/server_info.model.dart';
+import 'package:immich_mobile/shared/services/backup.service.dart';
+import 'package:photo_manager/photo_manager.dart';
+
+class BackupNotifier extends StateNotifier {
+ BackupNotifier()
+ : super(
+ BackUpState(
+ backupProgress: BackUpProgressEnum.idle,
+ backingUpAssetCount: 0,
+ assetOnDatabase: 0,
+ totalAssetCount: 0,
+ progressInPercentage: 0,
+ cancelToken: CancelToken(),
+ serverInfo: ServerInfo(
+ diskAvailable: "0",
+ diskAvailableRaw: 0,
+ diskSize: "0",
+ diskSizeRaw: 0,
+ diskUsagePercentage: 0.0,
+ diskUse: "0",
+ diskUseRaw: 0,
+ ),
+ ),
+ );
+
+ final BackupService _backupService = BackupService();
+ final ServerInfoService _serverInfoService = ServerInfoService();
+
+ void getBackupInfo() async {
+ _updateServerInfo();
+
+ List list = await PhotoManager.getAssetPathList(onlyAll: true, type: RequestType.image);
+
+ if (list.isEmpty) {
+ debugPrint("No Asset On Device");
+ return;
+ }
+
+ int totalAsset = list[0].assetCount;
+ List didBackupAsset = await _backupService.getDeviceBackupAsset();
+
+ state = state.copyWith(totalAssetCount: totalAsset, assetOnDatabase: didBackupAsset.length);
+ }
+
+ void startBackupProcess() async {
+ _updateServerInfo();
+
+ state = state.copyWith(backupProgress: BackUpProgressEnum.inProgress);
+
+ var authResult = await PhotoManager.requestPermissionExtend();
+ if (authResult.isAuth) {
+ await PhotoManager.clearFileCache();
+ // await PhotoManager.presentLimited();
+ // Gather assets info
+ List list =
+ await PhotoManager.getAssetPathList(hasAll: true, onlyAll: true, type: RequestType.image);
+
+ if (list.isEmpty) {
+ debugPrint("No Asset On Device - Abort Backup Process");
+ return;
+ }
+
+ int totalAsset = list[0].assetCount;
+ List currentAssets = await list[0].getAssetListRange(start: 0, end: totalAsset);
+
+ // Get device assets info from database
+ // Compare and find different assets that has not been backing up
+ // Backup those assets
+ List backupAsset = await _backupService.getDeviceBackupAsset();
+
+ state = state.copyWith(totalAssetCount: totalAsset, assetOnDatabase: backupAsset.length);
+ // Remove item that has already been backed up
+ for (var backupAssetId in backupAsset) {
+ currentAssets.removeWhere((e) => e.id == backupAssetId);
+ }
+
+ if (currentAssets.isEmpty) {
+ state = state.copyWith(backupProgress: BackUpProgressEnum.idle);
+ }
+
+ state = state.copyWith(backingUpAssetCount: currentAssets.length);
+
+ // Perform Packup
+ state = state.copyWith(cancelToken: CancelToken());
+ _backupService.backupAsset(currentAssets, state.cancelToken, _onAssetUploaded, _onUploadProgress);
+ } else {
+ PhotoManager.openSetting();
+ }
+ }
+
+ void cancelBackup() {
+ state.cancelToken.cancel('Cancel Backup');
+ state = state.copyWith(backupProgress: BackUpProgressEnum.idle);
+ }
+
+ void _onAssetUploaded() {
+ state =
+ state.copyWith(backingUpAssetCount: state.backingUpAssetCount - 1, assetOnDatabase: state.assetOnDatabase + 1);
+
+ if (state.backingUpAssetCount == 0) {
+ state = state.copyWith(backupProgress: BackUpProgressEnum.done, progressInPercentage: 0.0);
+ }
+
+ _updateServerInfo();
+ }
+
+ void _onUploadProgress(int sent, int total) {
+ state = state.copyWith(progressInPercentage: (sent.toDouble() / total.toDouble() * 100));
+ }
+
+ void _updateServerInfo() async {
+ var serverInfo = await _serverInfoService.getServerInfo();
+
+ // Update server info
+ state = state.copyWith(
+ serverInfo: ServerInfo(
+ diskSize: serverInfo.diskSize,
+ diskUse: serverInfo.diskUse,
+ diskAvailable: serverInfo.diskAvailable,
+ diskSizeRaw: serverInfo.diskSizeRaw,
+ diskUseRaw: serverInfo.diskUseRaw,
+ diskAvailableRaw: serverInfo.diskAvailableRaw,
+ diskUsagePercentage: serverInfo.diskUsagePercentage,
+ ),
+ );
+ }
+}
+
+final backupProvider = StateNotifierProvider((ref) {
+ return BackupNotifier();
+});
diff --git a/mobile/lib/shared/services/backup.service.dart b/mobile/lib/shared/services/backup.service.dart
new file mode 100644
index 0000000000..0058dfadef
--- /dev/null
+++ b/mobile/lib/shared/services/backup.service.dart
@@ -0,0 +1,124 @@
+import 'dart:convert';
+import 'dart:io';
+
+import 'package:dio/dio.dart';
+import 'package:flutter/material.dart';
+import 'package:hive/hive.dart';
+import 'package:immich_mobile/constants/hive_box.dart';
+import 'package:immich_mobile/shared/services/network.service.dart';
+import 'package:immich_mobile/shared/models/device_info.model.dart';
+import 'package:immich_mobile/utils/dio_http_interceptor.dart';
+import 'package:immich_mobile/utils/files_helper.dart';
+import 'package:photo_manager/photo_manager.dart';
+import 'package:http_parser/http_parser.dart';
+import 'package:path/path.dart' as p;
+import 'package:exif/exif.dart';
+
+class BackupService {
+ final NetworkService _networkService = NetworkService();
+
+ Future> getDeviceBackupAsset() async {
+ String deviceId = Hive.box(userInfoBox).get(deviceIdKey);
+
+ Response response = await _networkService.getRequest(url: "asset/$deviceId");
+ List result = jsonDecode(response.toString());
+
+ return result.cast();
+ }
+
+ backupAsset(List assetList, CancelToken cancelToken, Function singleAssetDoneCb,
+ Function(int, int) uploadProgress) async {
+ var dio = Dio();
+ dio.interceptors.add(AuthenticatedRequestInterceptor());
+ String deviceId = Hive.box(userInfoBox).get(deviceIdKey);
+ String savedEndpoint = Hive.box(userInfoBox).get(serverEndpointKey);
+ File? file;
+
+ for (var entity in assetList) {
+ try {
+ file = await entity.file.timeout(const Duration(seconds: 5));
+
+ if (file != null) {
+ // reading exif
+ // var exifData = await readExifFromFile(file);
+
+ // for (String key in exifData.keys) {
+ // debugPrint("- $key (${exifData[key]?.tagType}): ${exifData[key]}");
+ // }
+
+ // debugPrint("------------------");
+ String originalFileName = await entity.titleAsync;
+ String fileNameWithoutPath = originalFileName.toString().split(".")[0];
+ var fileExtension = p.extension(file.path);
+ LatLng coordinate = await entity.latlngAsync();
+ var mimeType = FileHelper.getMimeType(file.path);
+ var formData = FormData.fromMap({
+ 'deviceAssetId': entity.id,
+ 'deviceId': deviceId,
+ 'assetType': _getAssetType(entity.type),
+ 'createdAt': entity.createDateTime.toIso8601String(),
+ 'modifiedAt': entity.modifiedDateTime.toIso8601String(),
+ 'isFavorite': entity.isFavorite,
+ 'fileExtension': fileExtension,
+ 'lat': coordinate.latitude,
+ 'lon': coordinate.longitude,
+ 'files': [
+ await MultipartFile.fromFile(
+ file.path,
+ filename: fileNameWithoutPath,
+ contentType: MediaType(
+ mimeType["type"],
+ mimeType["subType"],
+ ),
+ ),
+ ]
+ });
+
+ Response res = await dio.post(
+ '$savedEndpoint/asset/upload',
+ data: formData,
+ cancelToken: cancelToken,
+ onSendProgress: (sent, total) => uploadProgress(sent, total),
+ );
+
+ if (res.statusCode == 201) {
+ singleAssetDoneCb();
+ }
+ }
+ } on DioError catch (e) {
+ debugPrint("DioError backupAsset: ${e.response}");
+ break;
+ } catch (e) {
+ debugPrint("ERROR backupAsset: ${e.toString()}");
+ continue;
+ } finally {
+ if (Platform.isIOS) {
+ file?.deleteSync();
+ }
+ }
+ }
+ }
+
+ String _getAssetType(AssetType assetType) {
+ switch (assetType) {
+ case AssetType.audio:
+ return "AUDIO";
+ case AssetType.image:
+ return "IMAGE";
+ case AssetType.video:
+ return "VIDEO";
+ case AssetType.other:
+ return "OTHER";
+ }
+ }
+
+ Future setAutoBackup(bool status, String deviceId, String deviceType) async {
+ var res = await _networkService.patchRequest(url: 'device-info', data: {
+ "isAutoBackup": status,
+ "deviceId": deviceId,
+ "deviceType": deviceType,
+ });
+
+ return DeviceInfoRemote.fromJson(res.toString());
+ }
+}
diff --git a/mobile/lib/shared/services/device_info.service.dart b/mobile/lib/shared/services/device_info.service.dart
new file mode 100644
index 0000000000..c665200dd8
--- /dev/null
+++ b/mobile/lib/shared/services/device_info.service.dart
@@ -0,0 +1,30 @@
+import 'package:device_info_plus/device_info_plus.dart';
+import 'package:flutter/material.dart';
+
+class DeviceInfoService {
+ Future