diff --git a/.gitignore b/.gitignore index 37139f7..5256ca2 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ migrate_working_dir/ .packages .pub-cache/ .pub/ +.env /build/ # Symbolication related diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist index 9625e10..7c56964 100644 --- a/ios/Flutter/AppFrameworkInfo.plist +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.0 diff --git a/ios/Podfile.lock b/ios/Podfile.lock index a7c7631..bc5aa25 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,4 +1,38 @@ PODS: + - agora_rtc_engine (6.2.6): + - AgoraIrisRTC_iOS (= 4.2.6-build.3) + - AgoraRtcEngine_iOS (= 4.2.6) + - Flutter + - AgoraIrisRTC_iOS (4.2.6-build.3) + - AgoraRtcEngine_iOS (4.2.6): + - AgoraRtcEngine_iOS/AIAEC (= 4.2.6) + - AgoraRtcEngine_iOS/AINS (= 4.2.6) + - AgoraRtcEngine_iOS/AudioBeauty (= 4.2.6) + - AgoraRtcEngine_iOS/ClearVision (= 4.2.6) + - AgoraRtcEngine_iOS/ContentInspect (= 4.2.6) + - AgoraRtcEngine_iOS/DRM (= 4.2.6) + - AgoraRtcEngine_iOS/FaceDetection (= 4.2.6) + - AgoraRtcEngine_iOS/ReplayKit (= 4.2.6) + - AgoraRtcEngine_iOS/RtcBasic (= 4.2.6) + - AgoraRtcEngine_iOS/SpatialAudio (= 4.2.6) + - AgoraRtcEngine_iOS/VideoCodecDec (= 4.2.6) + - AgoraRtcEngine_iOS/VideoCodecEnc (= 4.2.6) + - AgoraRtcEngine_iOS/VirtualBackground (= 4.2.6) + - AgoraRtcEngine_iOS/VQA (= 4.2.6) + - AgoraRtcEngine_iOS/AIAEC (4.2.6) + - AgoraRtcEngine_iOS/AINS (4.2.6) + - AgoraRtcEngine_iOS/AudioBeauty (4.2.6) + - AgoraRtcEngine_iOS/ClearVision (4.2.6) + - AgoraRtcEngine_iOS/ContentInspect (4.2.6) + - AgoraRtcEngine_iOS/DRM (4.2.6) + - AgoraRtcEngine_iOS/FaceDetection (4.2.6) + - AgoraRtcEngine_iOS/ReplayKit (4.2.6) + - AgoraRtcEngine_iOS/RtcBasic (4.2.6) + - AgoraRtcEngine_iOS/SpatialAudio (4.2.6) + - AgoraRtcEngine_iOS/VideoCodecDec (4.2.6) + - AgoraRtcEngine_iOS/VideoCodecEnc (4.2.6) + - AgoraRtcEngine_iOS/VirtualBackground (4.2.6) + - AgoraRtcEngine_iOS/VQA (4.2.6) - AppAuth (1.6.2): - AppAuth/Core (= 1.6.2) - AppAuth/ExternalUserAgent (= 1.6.2) @@ -7,6 +41,8 @@ PODS: - AppAuth/Core - audio_session (0.0.1): - Flutter + - background_location (0.0.1): + - Flutter - camera_avfoundation (0.0.1): - Flutter - device_info_plus (0.0.1): @@ -48,6 +84,8 @@ PODS: - Flutter - flutter_secure_storage (6.0.0): - Flutter + - flutter_tts (0.0.1): + - Flutter - FMDB (2.7.5): - FMDB/standard (= 2.7.5) - FMDB/standard (2.7.5) @@ -124,6 +162,8 @@ PODS: - TOCropViewController (~> 2.6.1) - image_picker_ios (0.0.1): - Flutter + - iris_method_channel (0.0.1): + - Flutter - just_audio (0.0.1): - Flutter - local_auth_ios (0.0.1): @@ -162,6 +202,8 @@ PODS: - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS + - permission_handler_apple (9.3.0): + - Flutter - PromisesObjC (2.3.1) - sqflite (0.0.3): - Flutter @@ -205,6 +247,8 @@ PODS: - TOCropViewController (2.6.1) - url_launcher_ios (0.0.1): - Flutter + - vibration (1.7.5): + - Flutter - video_player_avfoundation (0.0.1): - Flutter - FlutterMacOS @@ -214,7 +258,9 @@ PODS: - Flutter DEPENDENCIES: + - agora_rtc_engine (from `.symlinks/plugins/agora_rtc_engine/ios`) - audio_session (from `.symlinks/plugins/audio_session/ios`) + - background_location (from `.symlinks/plugins/background_location/ios`) - camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`) - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - firebase_core (from `.symlinks/plugins/firebase_core/ios`) @@ -222,6 +268,7 @@ DEPENDENCIES: - Flutter (from `Flutter`) - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`) - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) + - flutter_tts (from `.symlinks/plugins/flutter_tts/ios`) - geolocator_apple (from `.symlinks/plugins/geolocator_apple/ios`) - google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`) - google_mlkit_commons (from `.symlinks/plugins/google_mlkit_commons/ios`) @@ -229,20 +276,25 @@ DEPENDENCIES: - google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/ios`) - image_cropper (from `.symlinks/plugins/image_cropper/ios`) - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) + - iris_method_channel (from `.symlinks/plugins/iris_method_channel/ios`) - just_audio (from `.symlinks/plugins/just_audio/ios`) - local_auth_ios (from `.symlinks/plugins/local_auth_ios/ios`) - location (from `.symlinks/plugins/location/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) + - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) - sqflite (from `.symlinks/plugins/sqflite/ios`) - stripe_ios (from `.symlinks/plugins/stripe_ios/ios`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) + - vibration (from `.symlinks/plugins/vibration/ios`) - video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`) - wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`) - webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`) SPEC REPOS: trunk: + - AgoraIrisRTC_iOS + - AgoraRtcEngine_iOS - AppAuth - Firebase - FirebaseCore @@ -277,8 +329,12 @@ SPEC REPOS: - TOCropViewController EXTERNAL SOURCES: + agora_rtc_engine: + :path: ".symlinks/plugins/agora_rtc_engine/ios" audio_session: :path: ".symlinks/plugins/audio_session/ios" + background_location: + :path: ".symlinks/plugins/background_location/ios" camera_avfoundation: :path: ".symlinks/plugins/camera_avfoundation/ios" device_info_plus: @@ -293,6 +349,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/flutter_local_notifications/ios" flutter_secure_storage: :path: ".symlinks/plugins/flutter_secure_storage/ios" + flutter_tts: + :path: ".symlinks/plugins/flutter_tts/ios" geolocator_apple: :path: ".symlinks/plugins/geolocator_apple/ios" google_maps_flutter_ios: @@ -307,6 +365,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/image_cropper/ios" image_picker_ios: :path: ".symlinks/plugins/image_picker_ios/ios" + iris_method_channel: + :path: ".symlinks/plugins/iris_method_channel/ios" just_audio: :path: ".symlinks/plugins/just_audio/ios" local_auth_ios: @@ -317,12 +377,16 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/package_info_plus/ios" path_provider_foundation: :path: ".symlinks/plugins/path_provider_foundation/darwin" + permission_handler_apple: + :path: ".symlinks/plugins/permission_handler_apple/ios" sqflite: :path: ".symlinks/plugins/sqflite/ios" stripe_ios: :path: ".symlinks/plugins/stripe_ios/ios" url_launcher_ios: :path: ".symlinks/plugins/url_launcher_ios/ios" + vibration: + :path: ".symlinks/plugins/vibration/ios" video_player_avfoundation: :path: ".symlinks/plugins/video_player_avfoundation/darwin" wakelock_plus: @@ -331,8 +395,12 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/webview_flutter_wkwebview/ios" SPEC CHECKSUMS: + agora_rtc_engine: 5b2a7c221e1f3dfb8dee0fb0659f269be24fa81b + AgoraIrisRTC_iOS: 8346499b82968a4967e3d0bec2cf14bf7c0c3f76 + AgoraRtcEngine_iOS: ac647332ad8f86d79cf810601c9e62b28c3a4de0 AppAuth: 3bb1d1cd9340bd09f5ed189fb00b1cc28e1e8570 audio_session: 4f3e461722055d21515cf3261b64c973c062f345 + background_location: 1b80c1fe3abd9912bca298618f6e365abf6f588f camera_avfoundation: 3125e8cd1a4387f6f31c6c63abb8a55892a9eeeb device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6 Firebase: 414ad272f8d02dfbf12662a9d43f4bba9bec2a06 @@ -342,9 +410,10 @@ SPEC CHECKSUMS: FirebaseCoreInternal: b444828ea7cfd594fca83046b95db98a2be4f290 FirebaseInstallations: 033d199474164db20c8350736842a94fe717b960 FirebaseMessaging: 9bc34a98d2e0237e1b121915120d4d48ddcf301e - Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743 flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be + flutter_tts: 0f492aab6accf87059b72354fcb4ba934304771d FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a geolocator_apple: cc556e6844d508c95df1e87e3ea6fa4e58c50401 google_maps_flutter_ios: 590249c67f34f422122c232f2a626192adbc78ee @@ -362,6 +431,7 @@ SPEC CHECKSUMS: GTMSessionFetcher: 3a63d75eecd6aa32c2fc79f578064e1214dfdec2 image_cropper: a3291c624a953049bc6a02e1f8c8ceb162a24b25 image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5 + iris_method_channel: 0617c689164d8154c020c50f63ca79f92b8a7b9d just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa local_auth_ios: c6cf091ded637a88f24f86a8875d8b0f526e2605 location: d5cf8598915965547c3f36761ae9cc4f4e87d22e @@ -373,6 +443,7 @@ SPEC CHECKSUMS: nanopb: d4d75c12cd1316f4a64e3c6963f879ecd4b5e0d5 package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85 path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 + permission_handler_apple: 036b856153a2b1f61f21030ff725f3e6fece2b78 PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4 sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a Stripe: e046335ab6e3f25d39f1a55bd98620a85269cffa @@ -386,10 +457,11 @@ SPEC CHECKSUMS: StripeUICore: 090c4fe916d039616ce8f8de30392f4aeb33dd16 TOCropViewController: edfd4f25713d56905ad1e0b9f5be3fbe0f59c863 url_launcher_ios: bf5ce03e0e2088bad9cc378ea97fa0ed5b49673b + vibration: 7d883d141656a1c1a6d8d238616b2042a51a1241 video_player_avfoundation: e9e6f9cae7d7a6d9b43519b0aab382bca60fcfd1 wakelock_plus: 8b09852c8876491e4b6d179e17dfe2a0b5f60d47 webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a PODFILE CHECKSUM: 5dc3f53762f32b09fb6dbb6df4a961ce126c0d90 -COCOAPODS: 1.13.0 +COCOAPODS: 1.15.2 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 3482e2c..07e30a0 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -226,7 +226,8 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1430; + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 331C8080294A63A400263BE5 = { @@ -465,6 +466,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -475,6 +477,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -483,7 +486,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -503,7 +506,8 @@ DEVELOPMENT_TEAM = 63CVT8G5P8; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = Ride; + INFOPLIST_KEY_CFBundleDisplayName = Sefer; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.travel"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -589,6 +593,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -599,6 +604,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -613,7 +619,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -644,6 +650,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -654,6 +661,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -662,7 +670,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -684,7 +692,8 @@ DEVELOPMENT_TEAM = 63CVT8G5P8; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = Ride; + INFOPLIST_KEY_CFBundleDisplayName = Sefer; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.travel"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -709,7 +718,8 @@ DEVELOPMENT_TEAM = 63CVT8G5P8; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = Ride; + INFOPLIST_KEY_CFBundleDisplayName = Sefer; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.travel"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 87131a0..8e3ca5d 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ - - - GMSApiKey - YOUR_API_KEY - NSPhotoLibraryUsageDescription - Explanation of why your app needs access to the photo library. - - NSFaceIDUsageDescription - Use Face ID to securely authenticate payment accounts. - - - - NSLocationAlwaysUsageDescription - This app needs access to location. - - UIBackgroundModes - - fetch - location - - - NSMicrophoneUsageDescription - This app requires access to your microphone to record audio, allowing you to add voice recordings to your photos and videos and access to connect to a call. - NSCameraUsageDescription - Sefer app requires access to your camera in order to scan QR codes and capture images for uploading and access to connect to a call. - NSLocationAlwaysAndWhenInUseUsageDescription - This app needs access to your location to provide you with the best ride experience. Your location data will be used to find the nearest available cars and connect you with the closest captain for efficient and convenient rides. - FirebaseAppDelegateProxyEnabled - NO - CFBundleGetInfoString - - LSApplicationCategoryType - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - Sefer - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - Sefer - CFBundlePackageType - APPL - CFBundleShortVersionString - 17 - CFBundleSignature - ???? - CFBundleVersion - 1.37 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - CADisableMinimumFrameDurationOnPhone - - UIApplicationSupportsIndirectInputEvents - - NSLocationWhenInUseUsageDescription - This app needs access to your location to provide you with the best ride experience. Your location data will be used to find the nearest available cars and connect you with the closest captain for efficient and convenient rides. - - \ No newline at end of file + + CADisableMinimumFrameDurationOnPhone + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Sefer + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleGetInfoString + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Sefer + CFBundlePackageType + APPL + CFBundleShortVersionString + 17 + CFBundleSignature + ???? + CFBundleVersion + 1.37 + FirebaseAppDelegateProxyEnabled + NO + GMSApiKey + YOUR_API_KEY + LSApplicationCategoryType + + LSRequiresIPhoneOS + + NSCameraUsageDescription + Sefer app requires access to your camera in order to scan QR codes and capture images for uploading and access to connect to a call. + NSFaceIDUsageDescription + Use Face ID to securely authenticate payment accounts. + NSLocationAlwaysAndWhenInUseUsageDescription + This app needs access to your location to provide you with the best ride experience. Your location data will be used to find the nearest available cars and connect you with the closest captain for efficient and convenient rides. + NSLocationAlwaysUsageDescription + This app needs access to location. + NSLocationWhenInUseUsageDescription + This app needs access to your location to provide you with the best ride experience. Your location data will be used to find the nearest available cars and connect you with the closest captain for efficient and convenient rides. + NSMicrophoneUsageDescription + This app requires access to your microphone to record audio, allowing you to add voice recordings to your photos and videos and access to connect to a call. + NSPhotoLibraryUsageDescription + Explanation of why your app needs access to the photo library. + UIApplicationSupportsIndirectInputEvents + + UIBackgroundModes + + fetch + location + remote-notification + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/lib/constant/links.dart b/lib/constant/links.dart index 5d1a48c..5a00b91 100644 --- a/lib/constant/links.dart +++ b/lib/constant/links.dart @@ -127,6 +127,7 @@ class AppLink { // ===================================== static String addRateToPassenger = "$ride/rate/add.php"; static String addRateToDriver = "$ride/rate/addRateToDriver.php"; + static String getDriveRrate = "$ride/rate/getDriveRrate.php"; ////////////////emails ============// static String sendEmailToPassengerForTripDetails = diff --git a/lib/controller/functions/geolocation.dart b/lib/controller/functions/geolocation.dart new file mode 100644 index 0000000..2e191bf --- /dev/null +++ b/lib/controller/functions/geolocation.dart @@ -0,0 +1,34 @@ +import 'package:geolocator/geolocator.dart'; + +class GeoLocation { + Future getCurrentLocation() async { + bool serviceEnabled; + LocationPermission permission; + + // Check if location services are enabled. + serviceEnabled = await Geolocator.isLocationServiceEnabled(); + if (!serviceEnabled) { + // Location services are not enabled, so we request the user to enable it. + return Future.error('Location services are disabled.'); + } + + permission = await Geolocator.checkPermission(); + if (permission == LocationPermission.denied) { + permission = await Geolocator.requestPermission(); + if (permission == LocationPermission.denied) { + // Permissions are denied, we cannot fetch the location. + return Future.error('Location permissions are denied'); + } + } + + if (permission == LocationPermission.deniedForever) { + // Permissions are denied forever, we cannot request permissions. + return Future.error( + 'Location permissions are permanently denied, we cannot request permissions.'); + } + + // When we reach here, permissions are granted and we can fetch the location. + return await Geolocator.getCurrentPosition( + desiredAccuracy: LocationAccuracy.high); + } +} diff --git a/lib/controller/functions/location_background_controller.dart b/lib/controller/functions/location_background_controller.dart index 048c783..df58b11 100644 --- a/lib/controller/functions/location_background_controller.dart +++ b/lib/controller/functions/location_background_controller.dart @@ -60,6 +60,7 @@ // '''); // }); // } else { +// await Permission.locationAlways.request(); // print('Location permission not granted'); // } // } diff --git a/lib/controller/functions/location_controller.dart b/lib/controller/functions/location_controller.dart index 8ec283e..636353d 100644 --- a/lib/controller/functions/location_controller.dart +++ b/lib/controller/functions/location_controller.dart @@ -1,7 +1,6 @@ import 'dart:async'; import 'package:SEFER/constant/table_names.dart'; -import 'package:SEFER/controller/home/captin/map_driver_controller.dart'; import 'package:get/get.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:location/location.dart'; @@ -10,23 +9,26 @@ import 'package:SEFER/constant/links.dart'; import 'package:SEFER/controller/functions/crud.dart'; import 'package:SEFER/controller/home/payment/captain_wallet_controller.dart'; import 'package:SEFER/main.dart'; -import 'package:permission_handler/permission_handler.dart'; + +import '../home/captin/map_driver_controller.dart'; // LocationController.dart class LocationController extends GetxController { LocationData? _currentLocation; late Location location; bool isLoading = false; - bool isActive = false; - late LatLng myLocation; - late double heading; - late double accuracy; + late double heading = 0; + late double accuracy = 0; + LatLng? previousLocation; late double latitude; + late double totalDistance; late double longitude; late DateTime time; - late double speed; - late double speedAccuracy; - late double headingAccuracy; + late double speed = 0; + late double speedAccuracy = 0; + late double headingAccuracy = 0; + bool isActive = false; + late LatLng myLocation; String totalPoints = '0'; LocationData? get currentLocation => _currentLocation; Timer? _locationTimer; @@ -34,9 +36,6 @@ class LocationController extends GetxController { @override void onInit() async { super.onInit(); - - requestLocationPermission(); - location = Location(); getLocation(); // startLocationUpdates(); @@ -44,20 +43,6 @@ class LocationController extends GetxController { totalPoints = Get.put(CaptainWalletController()).totalPoints; } - Future requestLocationPermission() async { - if (box.read(BoxName.driverID) != null) { - var status = await Permission.locationAlways.status; - if (!status.isGranted) { - await Permission.locationAlways.request(); - } else { - var status = await Permission.locationWhenInUse.status; - if (!status.isGranted) { - await Permission.locationWhenInUse.request(); - } - } - } - } - Future startLocationUpdates() async { if (box.read(BoxName.driverID) != null) { _locationTimer = @@ -70,32 +55,32 @@ class LocationController extends GetxController { print('total point is $totalPoints'); await getLocation(); - if (box.read(BoxName.driverID) != null) { - await CRUD() - .post(link: AppLink.addCarsLocationByPassenger, payload: { - 'driver_id': box.read(BoxName.driverID).toString(), + // if (box.read(BoxName.driverID) != null) { + await CRUD() + .post(link: AppLink.addCarsLocationByPassenger, payload: { + 'driver_id': box.read(BoxName.driverID).toString(), + 'latitude': myLocation.latitude.toString(), + 'longitude': myLocation.longitude.toString(), + 'heading': heading.toString(), + 'speed': speed.toString(), + 'status': box.read(BoxName.statusDriverLocation).toString() + }); + if (Get.find().rideId == null) { + await sql.insertData({ + 'driver_id': box.read(BoxName.driverID), 'latitude': myLocation.latitude.toString(), 'longitude': myLocation.longitude.toString(), - 'heading': heading.toString(), - 'speed': speed.toString(), - 'status': box.read(BoxName.statusDriverLocation).toString() - }); - if (Get.find().rideId == null) { - await sql.insertData({ - 'driver_id': box.read(BoxName.driverID), - 'latitude': myLocation.latitude.toString(), - 'longitude': myLocation.longitude.toString(), - 'created_at': DateTime.now().toString(), - }, TableName.carLocations); - } else { - await sql.insertData({ - 'order_id': Get.find().rideId, - 'created_at': DateTime.now().toString(), - 'lat': myLocation.latitude.toString(), - 'lng': myLocation.longitude.toString(), - }, TableName.rideLocation); - } + 'created_at': DateTime.now().toString(), + }, TableName.carLocations); + } else { + await sql.insertData({ + 'order_id': Get.find().rideId, + 'created_at': DateTime.now().toString(), + 'lat': myLocation.latitude.toString(), + 'lng': myLocation.longitude.toString(), + }, TableName.rideLocation); } + // } // } @@ -114,32 +99,54 @@ class LocationController extends GetxController { } Future getLocation() async { - isLoading = true; - update(); + // isLoading = true; + // update(); + bool serviceEnabled; + PermissionStatus permissionGranted; + + // Check if location services are enabled + serviceEnabled = await location.serviceEnabled(); + if (!serviceEnabled) { + serviceEnabled = await location.requestService(); + if (!serviceEnabled) { + // Location services are still not enabled, handle the error + return; + } + } + + // Check if the app has permission to access location + permissionGranted = await location.hasPermission(); + if (permissionGranted == PermissionStatus.denied) { + permissionGranted = await location.requestPermission(); + if (permissionGranted != PermissionStatus.granted) { + // Location permission is still not granted, handle the error + return; + } + } + + // Configure location accuracy + // LocationAccuracy desiredAccuracy = LocationAccuracy.high; // Get the current location LocationData _locationData = await location.getLocation(); - myLocation = LatLng(_locationData.latitude!, _locationData.longitude!); - - accuracy = _locationData.accuracy!; - latitude = _locationData.latitude!; - longitude = _locationData.longitude!; - heading = _locationData.heading!; - speed = _locationData.speed!; - speedAccuracy = _locationData.speedAccuracy!; - headingAccuracy = _locationData.headingAccuracy!; + myLocation = + (_locationData.latitude != null && _locationData.longitude != null + ? LatLng(_locationData.latitude!, _locationData.longitude!) + : null)!; +// Calculate the distance between the current location and the previous location + if (previousLocation != null) { + // double distance = myLocation.distanceBetween(previousLocation); + // totalDistance += distance; + } + previousLocation = myLocation; // Print location details - // print('myLocation: $myLocation'); - // print('Accuracy: $accuracy'); - // print('Latitude: $latitude'); - // print('Longitude: $longitude'); - // print('heading: $heading'); - // print('speed: $speed'); - // print('speedAccuracy: $speedAccuracy'); - // print('headingAccuracy: $headingAccuracy'); - - isLoading = false; + // print('myLocation: ${myLocation}'); + // print('Accuracy: ${_locationData.accuracy}'); + // print('Latitude: ${_locationData.latitude}'); + // print('Longitude: ${_locationData.longitude}'); + // print('Time: ${_locationData.time}'); + // isLoading = false; update(); } } diff --git a/lib/controller/home/captin/home_captain_controller.dart b/lib/controller/home/captin/home_captain_controller.dart index 62376bf..db089ac 100644 --- a/lib/controller/home/captin/home_captain_controller.dart +++ b/lib/controller/home/captin/home_captain_controller.dart @@ -201,6 +201,7 @@ class HomeCaptainController extends GetxController { await getlocation(); onButtonSelected(); await getPaymentToday(); + await getDriverRate(); getCountRideToday(); getAllPayment(); startPeriodicExecution(); @@ -226,7 +227,7 @@ class HomeCaptainController extends GetxController { payload: {'driverID': box.read(BoxName.driverID).toString()}); data = jsonDecode(res); totalMoneyToday = data['message'][0]['todayAmount']; - rating = data['message'][0]['rating'].toString(); + update(); } @@ -241,6 +242,16 @@ class HomeCaptainController extends GetxController { update(); } + getDriverRate() async { + var res = await CRUD().get( + link: AppLink.getDriveRrate, + payload: {'driver_id': box.read(BoxName.driverID).toString()}); + data = jsonDecode(res); + + rating = data['message'][0]['rating'].toString(); + update(); + } + getAllPayment() async { var res = await CRUD().get( link: AppLink.getAllPaymentFromRide, diff --git a/lib/controller/home/map_passenger_controller.dart b/lib/controller/home/map_passenger_controller.dart index c71a180..226d0fc 100644 --- a/lib/controller/home/map_passenger_controller.dart +++ b/lib/controller/home/map_passenger_controller.dart @@ -1016,7 +1016,7 @@ class MapPassengerController extends GetxController { update(); } - Future getRideStatus(int rideId) async { + Future getRideStatus(String rideId) async { final response = await CRUD() .get(link: AppLink.getRideStatus, payload: {'order_id': rideId}); @@ -1026,9 +1026,10 @@ class MapPassengerController extends GetxController { late String driverCarModel, driverCarMake, driverLicensePlate, driverName; getUpdatedRideForDriverApply(String rideId) async { // if (isDriversTokensSend) { - final response = + final res = await CRUD().get(link: AppLink.getRideOrderID, payload: {'id': rideId}); - if (response != 'failure') { + if (res != 'failure') { + var response = jsonDecode(res); driverId = response['data']['driver_id']; driverPhone = response['data']['phone']; driverCarMake = response['data']['make']; diff --git a/lib/main.dart b/lib/main.dart index d660a43..d767c77 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,6 +1,5 @@ import 'dart:io'; -import 'package:SEFER/constant/box_name.dart'; import 'package:background_location/background_location.dart'; import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; @@ -16,7 +15,7 @@ import 'constant/credential.dart'; import 'constant/info.dart'; import 'controller/firebase/firbase_messge.dart'; import 'controller/firebase/local_notification.dart'; -import 'controller/functions/location_background_controller.dart'; +import 'controller/functions/location_controller.dart'; import 'controller/local/local_controller.dart'; import 'controller/local/translations.dart'; import 'firebase_options.dart'; @@ -44,7 +43,7 @@ Future backgroundMessageHandler(RemoteMessage message) async { void main() async { WidgetsFlutterBinding.ensureInitialized(); WakelockPlus.enable(); - await BackgroundLocation.startLocationService(); + // await LocationController().startLocationUpdates(); if (Platform.isAndroid) { await NotificationController().initNotifications(); } @@ -58,7 +57,7 @@ void main() async { print(Get.deviceLocale!.countryCode); Stripe.publishableKey = AK.publishableKey; // if (box.read(BoxName.driverID) != null) { - // Get.put(LocationBackgroundController()); + // Get.put(LocationBackgroundController()); // } if (Platform.isAndroid || Platform.isIOS) { await Firebase.initializeApp( @@ -71,6 +70,8 @@ void main() async { List initializationTasks = [ FirebaseMessagesController().getNotificationSettings(), FirebaseMessagesController().getToken(), + // Get.put(LocationController()).startLocationUpdates(), + // Get.put(LocationBackgroundController()).startBackLocation(), ]; // cameras = await availableCameras(); await Future.wait(initializationTasks);