diff --git a/backend/Admin/Staff/add.php b/backend/Admin/Staff/add.php index e5fce339..cf4c46fb 100644 --- a/backend/Admin/Staff/add.php +++ b/backend/Admin/Staff/add.php @@ -68,11 +68,13 @@ try { ]); } else { // الإضافة لجدول المستخدمين (خدمة العملاء) - $sql = "INSERT INTO users (id, phone, email, gender, password, birthdate, user_type, first_name, last_name, site, country, created_at) - VALUES (:id, :phone, :email, :gender, :pass, :bdate, 'service', :fname, :lname, :site, :country, NOW())"; + $sql = "INSERT INTO users (id, fingerprint, fingerprint_hash, phone, email, gender, password, birthdate, user_type, first_name, last_name, site, country, status, created_at) + VALUES (:id, :fp, :fp_hash, :phone, :email, :gender, :pass, :bdate, 'service', :fname, :lname, :site, :country, 'approved', NOW())"; $stmt = $con->prepare($sql); $stmt->execute([ ':id' => $uniqueId, + ':fp' => $encFp, + ':fp_hash' => $fpHash, ':phone' => $encPhone, ':email' => $encEmail, ':gender' => $gender, diff --git a/siro_service/ios/Flutter/AppFrameworkInfo.plist b/siro_service/ios/Flutter/AppFrameworkInfo.plist index 7c569640..391a902b 100644 --- a/siro_service/ios/Flutter/AppFrameworkInfo.plist +++ b/siro_service/ios/Flutter/AppFrameworkInfo.plist @@ -20,7 +20,5 @@ ???? CFBundleVersion 1.0 - MinimumOSVersion - 12.0 diff --git a/siro_service/ios/Podfile.lock b/siro_service/ios/Podfile.lock index d0800276..77636f7e 100644 --- a/siro_service/ios/Podfile.lock +++ b/siro_service/ios/Podfile.lock @@ -1,62 +1,52 @@ PODS: - - AppAuth (2.0.0): - - AppAuth/Core (= 2.0.0) - - AppAuth/ExternalUserAgent (= 2.0.0) - - AppAuth/Core (2.0.0) - - AppAuth/ExternalUserAgent (2.0.0): - - AppAuth/Core - - AppCheckCore (11.2.0): - - GoogleUtilities/Environment (~> 8.0) - - GoogleUtilities/UserDefaults (~> 8.0) - - PromisesObjC (~> 2.4) - device_info_plus (0.0.1): - Flutter - - Firebase/Auth (12.0.0): + - Firebase/Auth (12.14.0): - Firebase/CoreOnly - - FirebaseAuth (~> 12.0.0) - - Firebase/CoreOnly (12.0.0): - - FirebaseCore (~> 12.0.0) - - Firebase/Messaging (12.0.0): + - FirebaseAuth (~> 12.14.0) + - Firebase/CoreOnly (12.14.0): + - FirebaseCore (~> 12.14.0) + - Firebase/Messaging (12.14.0): - Firebase/CoreOnly - - FirebaseMessaging (~> 12.0.0) - - firebase_auth (6.0.0): - - Firebase/Auth (= 12.0.0) + - FirebaseMessaging (~> 12.14.0) + - firebase_auth (6.5.2): + - Firebase/Auth (= 12.14.0) - firebase_core - Flutter - - firebase_core (4.0.0): - - Firebase/CoreOnly (= 12.0.0) + - firebase_core (4.10.0): + - Firebase/CoreOnly (= 12.14.0) - Flutter - - firebase_messaging (16.0.0): - - Firebase/Messaging (= 12.0.0) + - firebase_messaging (16.3.0): + - Firebase/Messaging (= 12.14.0) - firebase_core - Flutter - - FirebaseAppCheckInterop (12.0.0) - - FirebaseAuth (12.0.0): - - FirebaseAppCheckInterop (~> 12.0.0) - - FirebaseAuthInterop (~> 12.0.0) - - FirebaseCore (~> 12.0.0) - - FirebaseCoreExtension (~> 12.0.0) + - FirebaseAppCheckInterop (12.14.0) + - FirebaseAuth (12.14.0): + - FirebaseAppCheckInterop (~> 12.14.0) + - FirebaseAuthInterop (~> 12.14.0) + - FirebaseCore (~> 12.14.0) + - FirebaseCoreExtension (~> 12.14.0) - GoogleUtilities/AppDelegateSwizzler (~> 8.1) - GoogleUtilities/Environment (~> 8.1) - GTMSessionFetcher/Core (< 6.0, >= 3.4) - RecaptchaInterop (~> 101.0) - - FirebaseAuthInterop (12.0.0) - - FirebaseCore (12.0.0): - - FirebaseCoreInternal (~> 12.0.0) + - FirebaseAuthInterop (12.14.0) + - FirebaseCore (12.14.0): + - FirebaseCoreInternal (~> 12.14.0) - GoogleUtilities/Environment (~> 8.1) - GoogleUtilities/Logger (~> 8.1) - - FirebaseCoreExtension (12.0.0): - - FirebaseCore (~> 12.0.0) - - FirebaseCoreInternal (12.0.0): + - FirebaseCoreExtension (12.14.0): + - FirebaseCore (~> 12.14.0) + - FirebaseCoreInternal (12.14.0): - "GoogleUtilities/NSData+zlib (~> 8.1)" - - FirebaseInstallations (12.0.0): - - FirebaseCore (~> 12.0.0) + - FirebaseInstallations (12.14.0): + - FirebaseCore (~> 12.14.0) - GoogleUtilities/Environment (~> 8.1) - GoogleUtilities/UserDefaults (~> 8.1) - PromisesObjC (~> 2.4) - - FirebaseMessaging (12.0.0): - - FirebaseCore (~> 12.0.0) - - FirebaseInstallations (~> 12.0.0) + - FirebaseMessaging (12.14.0): + - FirebaseCore (~> 12.14.0) + - FirebaseInstallations (~> 12.14.0) - GoogleDataTransport (~> 10.1) - GoogleUtilities/AppDelegateSwizzler (~> 8.1) - GoogleUtilities/Environment (~> 8.1) @@ -73,51 +63,34 @@ PODS: - Flutter - flutter_secure_storage (6.0.0): - Flutter - - google_sign_in_ios (0.0.1): - - Flutter - - FlutterMacOS - - GoogleSignIn (~> 9.0) - - GTMSessionFetcher (>= 3.4.0) - GoogleDataTransport (10.1.0): - nanopb (~> 3.30910.0) - PromisesObjC (~> 2.4) - - GoogleSignIn (9.0.0): - - AppAuth (~> 2.0) - - AppCheckCore (~> 11.0) - - GTMAppAuth (~> 5.0) - - GTMSessionFetcher/Core (~> 3.3) - - GoogleUtilities/AppDelegateSwizzler (8.1.0): + - GoogleUtilities/AppDelegateSwizzler (8.1.1): - GoogleUtilities/Environment - GoogleUtilities/Logger - GoogleUtilities/Network - GoogleUtilities/Privacy - - GoogleUtilities/Environment (8.1.0): + - GoogleUtilities/Environment (8.1.1): - GoogleUtilities/Privacy - - GoogleUtilities/Logger (8.1.0): + - GoogleUtilities/Logger (8.1.1): - GoogleUtilities/Environment - GoogleUtilities/Privacy - - GoogleUtilities/Network (8.1.0): + - GoogleUtilities/Network (8.1.1): - GoogleUtilities/Logger - "GoogleUtilities/NSData+zlib" - GoogleUtilities/Privacy - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (8.1.0)": + - "GoogleUtilities/NSData+zlib (8.1.1)": - GoogleUtilities/Privacy - - GoogleUtilities/Privacy (8.1.0) - - GoogleUtilities/Reachability (8.1.0): + - GoogleUtilities/Privacy (8.1.1) + - GoogleUtilities/Reachability (8.1.1): - GoogleUtilities/Logger - GoogleUtilities/Privacy - - GoogleUtilities/UserDefaults (8.1.0): + - GoogleUtilities/UserDefaults (8.1.1): - GoogleUtilities/Logger - GoogleUtilities/Privacy - - GTMAppAuth (5.0.0): - - AppAuth/Core (~> 2.0) - - GTMSessionFetcher/Core (< 4.0, >= 3.3) - - GTMSessionFetcher (3.5.0): - - GTMSessionFetcher/Full (= 3.5.0) - - GTMSessionFetcher/Core (3.5.0) - - GTMSessionFetcher/Full (3.5.0): - - GTMSessionFetcher/Core + - GTMSessionFetcher/Core (5.3.0) - image_cropper (0.0.4): - Flutter - TOCropViewController (~> 2.7.4) @@ -146,9 +119,9 @@ PODS: - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS - - permission_handler_apple (9.3.0): + - permission_handler_apple (9.4.8): - Flutter - - PromisesObjC (2.4.0) + - PromisesObjC (2.4.1) - RecaptchaInterop (101.0.0) - SDWebImage (5.21.2): - SDWebImage/Core (= 5.21.2) @@ -176,7 +149,6 @@ DEPENDENCIES: - flutter_image_compress_common (from `.symlinks/plugins/flutter_image_compress_common/ios`) - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`) - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) - - google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`) - image_cropper (from `.symlinks/plugins/image_cropper/ios`) - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) @@ -188,8 +160,6 @@ DEPENDENCIES: SPEC REPOS: trunk: - - AppAuth - - AppCheckCore - Firebase - FirebaseAppCheckInterop - FirebaseAuth @@ -200,9 +170,7 @@ SPEC REPOS: - FirebaseInstallations - FirebaseMessaging - GoogleDataTransport - - GoogleSignIn - GoogleUtilities - - GTMAppAuth - GTMSessionFetcher - libwebp - Mantle @@ -230,8 +198,6 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/flutter_local_notifications/ios" flutter_secure_storage: :path: ".symlinks/plugins/flutter_secure_storage/ios" - google_sign_in_ios: - :path: ".symlinks/plugins/google_sign_in_ios/darwin" image_cropper: :path: ".symlinks/plugins/image_cropper/ios" image_picker_ios: @@ -250,39 +216,34 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/vibration/ios" SPEC CHECKSUMS: - AppAuth: 1c1a8afa7e12f2ec3a294d9882dfa5ab7d3cb063 - AppCheckCore: cc8fd0a3a230ddd401f326489c99990b013f0c4f device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe - Firebase: 800d487043c0557d9faed71477a38d9aafb08a41 - firebase_auth: 5a5603bbe7fc673f88b7c652bf9c41d6c742b545 - firebase_core: 633e1851ffe1b9ab875f6467a4f574c79cef02e4 - firebase_messaging: d17feef781edc84ebefe62624fb384358ad96361 - FirebaseAppCheckInterop: c848d06a04030c9858ef0ae555b82035dbe470d0 - FirebaseAuth: 654e4de84787c45d7265599a651038e854ccb439 - FirebaseAuthInterop: 002da671896af5e8879ae117dc604ed240b86e80 - FirebaseCore: 055f4ab117d5964158c833f3d5e7ec6d91648d4a - FirebaseCoreExtension: 639afb3de6abd611952be78a794c54a47fa0f361 - FirebaseCoreInternal: dedc28e569a4be85f38f3d6af1070a2e12018d55 - FirebaseInstallations: d4c7c958f99c8860d7fcece786314ae790e2f988 - FirebaseMessaging: af49f8d7c0a3d2a017d9302c80946f45a7777dde - Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + Firebase: 7cc10425300768ec86292688af5cb228f0604bde + firebase_auth: d4091ec40b52cc2ea56171ea521c30b388844acb + firebase_core: 383e19b49a08df5d7a6cf5017616de6a357ed7af + firebase_messaging: ab03d6090864c0fb8136521231df6a66cb13be49 + FirebaseAppCheckInterop: f123c0261a7b46f060e98fc2961651f1ac68f384 + FirebaseAuth: 01a77d472aec77ec008141e7d859d1b9cb8dc2cf + FirebaseAuthInterop: 63056ef7f9602e79a8f8d756d4cb35f38e2927c3 + FirebaseCore: 4939b340b9c598dc1f965d68f8fe57e630b65407 + FirebaseCoreExtension: ee3e3697acea1062288b1900bcdcab4d59ab93b4 + FirebaseCoreInternal: 090369a5fffd7423cf88006ab4d2ccc2173a8db9 + FirebaseInstallations: 7cdc919e29dc54306edeffdbdc1eed1a40d7d1e7 + FirebaseMessaging: 4803888ce3002188f24e19faa8d2326261538426 + Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467 flutter_image_compress_common: 1697a328fd72bfb335507c6bca1a65fa5ad87df1 flutter_local_notifications: a5a732f069baa862e728d839dd2ebb904737effb flutter_secure_storage: 1ed9476fba7e7a782b22888f956cce43e2c62f13 - google_sign_in_ios: 205742c688aea0e64db9da03c33121694a365109 GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7 - GoogleSignIn: c7f09cfbc85a1abf69187be091997c317cc33b77 - GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1 - GTMAppAuth: 217a876b249c3c585a54fd6f73e6b58c4f5c4238 - GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6 + GoogleUtilities: 4f2618a4a1e762a1ee134a1e2323bba9843e06da + GTMSessionFetcher: 127211aeec0b1e904fc49f4f6f895dcc535b0ecf image_cropper: c4326ea50132b1e1564499e5d32a84f01fb03537 image_picker_ios: 7fe1ff8e34c1790d6fff70a32484959f563a928a libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8 Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564 - permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d - PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 + permission_handler_apple: 92d754bbaa7361d436db2d6c3c1c2a0fdcec462e + PromisesObjC: 752c3227f599e3467650e47ea36f433eeb10c273 RecaptchaInterop: 11e0b637842dfb48308d242afc3f448062325aba SDWebImage: 9f177d83116802728e122410fb25ad88f5c7608a SDWebImageWebPCoder: e38c0a70396191361d60c092933e22c20d5b1380 @@ -290,7 +251,7 @@ SPEC CHECKSUMS: sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0 TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654 url_launcher_ios: 694010445543906933d732453a59da0a173ae33d - vibration: 69774ad57825b11c951ee4c46155f455d7a592ce + vibration: ca8104a8875b9c493e15b21b04e456befd0ff6eb PODFILE CHECKSUM: 53a6aebc29ccee84c41f92f409fc20cd4ca011f1 diff --git a/siro_service/ios/Runner.xcodeproj/project.pbxproj b/siro_service/ios/Runner.xcodeproj/project.pbxproj index ba8ce36e..b91c6eab 100644 --- a/siro_service/ios/Runner.xcodeproj/project.pbxproj +++ b/siro_service/ios/Runner.xcodeproj/project.pbxproj @@ -477,7 +477,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -607,7 +607,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -658,7 +658,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/siro_service/lib/controller/functions/crud.dart b/siro_service/lib/controller/functions/crud.dart index 9b10d104..29b090d6 100644 --- a/siro_service/lib/controller/functions/crud.dart +++ b/siro_service/lib/controller/functions/crud.dart @@ -244,7 +244,13 @@ class CRUD { } // Initialize app signature if null - _appSignature ??= await SecurityHelper.getAppSignature(); + if (_appSignature == null) { + try { + _appSignature = await SecurityHelper.getAppSignature(); + } catch (_) { + _appSignature = ''; + } + } final headers = { 'Content-Type': 'application/x-www-form-urlencoded', @@ -277,7 +283,13 @@ class CRUD { }; // Initialize app signature if null - _appSignature ??= await SecurityHelper.getAppSignature(); + if (_appSignature == null) { + try { + _appSignature = await SecurityHelper.getAppSignature(); + } catch (_) { + _appSignature = ''; + } + } final headers = { 'Content-Type': 'application/x-www-form-urlencoded', diff --git a/siro_service/lib/controller/functions/security_helper.dart b/siro_service/lib/controller/functions/security_helper.dart index bd30e377..0717c32d 100644 --- a/siro_service/lib/controller/functions/security_helper.dart +++ b/siro_service/lib/controller/functions/security_helper.dart @@ -14,6 +14,9 @@ class SecurityHelper { Log.print('----------------------------------------------------'); return signature; + } on MissingPluginException { + Log.print('⚠️ getAppSignature not implemented on this platform'); + return null; } on PlatformException catch (e) { Log.print('❌ Failed to get app signature: ${e.message}'); return null; @@ -24,6 +27,8 @@ class SecurityHelper { try { final bool isRooted = await platform.invokeMethod('isNativeRooted'); return isRooted; + } on MissingPluginException { + return false; } on PlatformException catch (e) { Log.print('❌ Failed to check root: ${e.message}'); return false;