From e1084028d68a28689d5aebaaf808fdcbe0c5630b Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 28 Oct 2026 11:52:32 +0300 Subject: [PATCH] LiveCare & iOS 27.1 updates --- ios/Podfile | 2 +- ios/Runner.xcodeproj/project.pbxproj | 3 +++ lib/core/api_consts.dart | 2 +- lib/core/utils/push_notification_handler.dart | 20 ++++++------------- .../book_appointments_repo.dart | 5 +++++ .../immediate_livecare_view_model.dart | 2 +- pubspec.yaml | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ios/Podfile b/ios/Podfile index e0283052..9ea6dc53 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -58,7 +58,7 @@ post_install do |installer| ## dart: PermissionGroup.notification 'PERMISSION_NOTIFICATIONS=1', ] - build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386' + build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'i386 x86_64' build_configuration.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0' build_configuration.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES' xcconfig_path = build_configuration.base_configuration_reference.real_path diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 3686ba52..526f2efb 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -593,6 +593,7 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "Dr. Alhabib"; IPHONEOS_DEPLOYMENT_TARGET = 15.6; @@ -780,6 +781,7 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "Dr. Alhabib"; IPHONEOS_DEPLOYMENT_TARGET = 15.6; @@ -810,6 +812,7 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "Dr. Alhabib"; IPHONEOS_DEPLOYMENT_TARGET = 15.6; diff --git a/lib/core/api_consts.dart b/lib/core/api_consts.dart index 00161451..5aee1311 100644 --- a/lib/core/api_consts.dart +++ b/lib/core/api_consts.dart @@ -6,7 +6,7 @@ import 'package:myfatoorah_flutter/myfatoorah_flutter.dart'; class ApiConsts { static const maxSmallScreen = 660; - static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod; + static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat; // static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT diff --git a/lib/core/utils/push_notification_handler.dart b/lib/core/utils/push_notification_handler.dart index 6c3e38cf..57efe7c6 100644 --- a/lib/core/utils/push_notification_handler.dart +++ b/lib/core/utils/push_notification_handler.dart @@ -404,6 +404,9 @@ class PushNotificationHandler { String callerId, ) async { log('🎈 example: onDidAcceptIncomingCall $uuid - $callerId'); + + String zoomSessionID = callerId.split("*")[0]; + await voIPKit.acceptIncomingCall(callerState: CallStateType.calling); await voIPKit.callConnected(); @@ -414,10 +417,11 @@ class PushNotificationHandler { _currentCallId = null; await Future.delayed(Duration(seconds: 2)).then((val) async { await voIPKit.endCall(); + await voIPKit.dispose(); await FlutterCallkitIncoming.endAllCalls(); }); - await Utils.saveStringFromPrefs(CacheConst.zoomRoomID, callerId); + await Utils.saveStringFromPrefs(CacheConst.zoomRoomID, zoomSessionID); Utils.removeFromPrefs(CacheConst.isAppOpenedFromCall); Navigator.of(GetIt.instance().navigatorKey.currentContext!).pushReplacement(FadePage(page: SplashAnimationScreen(routeWidget: LandingNavigation()))); @@ -426,21 +430,9 @@ class PushNotificationHandler { GetIt.instance().navigatorKey.currentContext!, AppRoutes.zoomCallPage, // arguments: CallArguments(appointmentID, "111", "Patient", "40", "1", true, 1), - arguments: CallArguments(callerId, "123", "Patient", "40", "0", true, int.parse("1")), + arguments: CallArguments(zoomSessionID, "123", "Patient", "40", "0", true, int.parse("1")), // arguments: CallArguments("SmallDailyStandup9875", "123", "Patient", "40", "0", false, int.parse(widget.incomingCallData!.appointmentNo!)), ); - - // Navigator.pushNamed( - // locator().navigatorKey.currentContext!, - // "zoom_call_page", - // arguments: CallArguments("hoover-dam", "123", "Patient", "40", "1", false), - // ); - - // Navigator.pushNamed(navigatorKey.currentContext!, VIDEO_CALL_SCREEN, - // arguments: VideoArgus( - // reservationId: int.parse(callerId), token: null, isVideo: true)); - - // timeOutTimer.cancel(); }; } diff --git a/lib/features/book_appointments/book_appointments_repo.dart b/lib/features/book_appointments/book_appointments_repo.dart index caf97cb8..c4bd08d0 100644 --- a/lib/features/book_appointments/book_appointments_repo.dart +++ b/lib/features/book_appointments/book_appointments_repo.dart @@ -1,12 +1,15 @@ +import 'dart:io'; import 'package:dartz/dartz.dart'; import 'package:hmg_patient_app_new/core/api/api_client.dart'; import 'package:hmg_patient_app_new/core/api_consts.dart'; import 'package:hmg_patient_app_new/core/app_state.dart'; +import 'package:hmg_patient_app_new/core/cache_consts.dart'; import 'package:hmg_patient_app_new/core/common_models/generic_api_model.dart'; import 'package:hmg_patient_app_new/core/dependencies.dart'; import 'package:hmg_patient_app_new/core/exceptions/api_failure.dart'; import 'package:hmg_patient_app_new/core/utils/date_util.dart'; +import 'package:hmg_patient_app_new/core/utils/utils.dart'; import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/appointment_nearest_gate_response_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/dental_chief_complaints_response_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/doctor_profile_response_model.dart'; @@ -757,6 +760,8 @@ class BookAppointmentsRepoImp implements BookAppointmentsRepo { "InitialSlotDuration": initialSlotDuration, "StrAppointmentDate": selectedDate, "IsVirtual": false, + "DeviceType": Platform.isIOS ? 'iOS' : 'Android', + "DeviceToken": await Utils.getStringFromPrefs(CacheConst.pushToken), "BookedBy": 102, "VisitType": 1, "VisitFor": 1, diff --git a/lib/features/immediate_livecare/immediate_livecare_view_model.dart b/lib/features/immediate_livecare/immediate_livecare_view_model.dart index 57bf6553..3fce9d22 100644 --- a/lib/features/immediate_livecare/immediate_livecare_view_model.dart +++ b/lib/features/immediate_livecare/immediate_livecare_view_model.dart @@ -236,7 +236,7 @@ class ImmediateLiveCareViewModel extends ChangeNotifier { Future addNewCallRequestForImmediateLiveCare(String transID, {Function(dynamic)? onSuccess, Function(String)? onError}) async { final result = await immediateLiveCareRepo.addNewCallRequestForImmediateLiveCare(_appState.getAuthenticatedUser()!.age!, _appState.getAuthenticatedUser()!.gender!, - immediateLiveCareSelectedClinic.serviceID!, transID, liveCareSelectedCallType, false, _appState.deviceToken, await Utils.getStringFromPrefs(CacheConst.voipToken)); + immediateLiveCareSelectedClinic.serviceID!, transID, liveCareSelectedCallType, false, await Utils.getStringFromPrefs(CacheConst.pushToken), await Utils.getStringFromPrefs(CacheConst.voipToken)); result.fold( (failure) async { diff --git a/pubspec.yaml b/pubspec.yaml index 64d4d22c..96a92965 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -64,7 +64,7 @@ dependencies: geolocator: ^14.0.2 dropdown_search: ^6.0.2 google_maps_flutter: ^2.13.1 - flutter_zoom_videosdk: 2.1.10 + flutter_zoom_videosdk: 2.6.0 dart_jsonwebtoken: ^3.2.0 dartz: ^0.10.1 equatable: ^2.0.7