Bugfix/persistent UUID (#46)

* UUID is now persisted between reinstallation
This commit is contained in:
Alex 2022-03-11 13:38:52 -06:00 committed by GitHub
parent e085a10cf3
commit c624580596
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 31 additions and 9 deletions

View File

@ -2,6 +2,9 @@ PODS:
- device_info_plus (0.0.1):
- Flutter
- Flutter (1.0.0)
- flutter_udid (0.0.1):
- Flutter
- SAMKeychain
- fluttertoast (0.0.2):
- Flutter
- Toast
@ -22,6 +25,7 @@ PODS:
- photo_manager (1.0.0):
- Flutter
- FlutterMacOS
- SAMKeychain (1.5.3)
- sqflite (0.0.2):
- Flutter
- FMDB (>= 2.7.5)
@ -34,6 +38,7 @@ PODS:
DEPENDENCIES:
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- Flutter (from `Flutter`)
- flutter_udid (from `.symlinks/plugins/flutter_udid/ios`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
- mapbox_gl (from `.symlinks/plugins/mapbox_gl/ios`)
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
@ -48,6 +53,7 @@ SPEC REPOS:
- Mapbox-iOS-SDK
- MapboxAnnotationExtension
- MapboxMobileEvents
- SAMKeychain
- Toast
EXTERNAL SOURCES:
@ -55,6 +61,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/device_info_plus/ios"
Flutter:
:path: Flutter
flutter_udid:
:path: ".symlinks/plugins/flutter_udid/ios"
fluttertoast:
:path: ".symlinks/plugins/fluttertoast/ios"
mapbox_gl:
@ -73,6 +81,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
flutter_udid: 0848809dbed4c055175747ae6a45a8b4f6771e1c
fluttertoast: 6122fa75143e992b1d3470f61000f591a798cc58
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
Mapbox-iOS-SDK: f870f83cbdc7aa4a74afcee143aafb0dae390c82
@ -81,6 +90,7 @@ SPEC CHECKSUMS:
MapboxMobileEvents: 5a172cc9bbf8ac0e45ba86095cbee685ede248cc
path_provider_ios: 7d7ce634493af4477d156294792024ec3485acd5
photo_manager: 84fa94fbeb82e607333ea9a13c43b58e0903a463
SAMKeychain: 483e1c9f32984d50ca961e26818a534283b4cd5c
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
video_player_avfoundation: e489aac24ef5cf7af82702979ed16f2a5ef84cff

View File

@ -5,12 +5,17 @@
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.000353">
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.000279">
</testcase>
<testcase classname="fastlane.lanes" name="1: build_app" time="67.836809">
<testcase classname="fastlane.lanes" name="1: build_app" time="92.043245">
</testcase>
<testcase classname="fastlane.lanes" name="2: upload_to_testflight" time="390.776997">
</testcase>

View File

@ -13,8 +13,8 @@ class LoginForm extends HookConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final usernameController = useTextEditingController(text: '');
final passwordController = useTextEditingController(text: '');
final usernameController = useTextEditingController(text: 'testuser@email.com');
final passwordController = useTextEditingController(text: 'password');
final serverEndpointController = useTextEditingController(text: 'http://192.168.1.216:2283');
return Center(

View File

@ -1,4 +1,5 @@
import 'package:device_info_plus/device_info_plus.dart';
import 'package:flutter_udid/flutter_udid.dart';
import 'package:flutter/material.dart';
class DeviceInfoService {
@ -9,16 +10,14 @@ class DeviceInfoService {
String deviceType = "";
try {
AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo;
deviceId = androidInfo.androidId;
deviceId = await FlutterUdid.consistentUdid;
deviceType = "ANDROID";
} catch (e) {
debugPrint("Not an android device");
}
try {
IosDeviceInfo iosInfo = await deviceInfo.iosInfo;
deviceId = iosInfo.identifierForVendor;
deviceId = await FlutterUdid.consistentUdid;
deviceType = "IOS";
debugPrint("Device ID: $deviceId");
} catch (e) {

View File

@ -368,6 +368,13 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_udid:
dependency: "direct main"
description:
name: flutter_udid
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter

View File

@ -2,7 +2,7 @@ name: immich_mobile
description: A new Flutter project.
publish_to: "none"
version: 1.0.0+2
version: 1.0.1+3
environment:
sdk: ">=2.15.1 <3.0.0"
@ -35,6 +35,7 @@ dependencies:
photo_view: ^0.13.0
socket_io_client: ^2.0.0-beta.4-nullsafety.0
mapbox_gl: ^0.15.0
flutter_udid: ^2.0.0
dev_dependencies:
flutter_test: