diff --git a/ios/GoogleService-Info.plist b/ios/GoogleService-Info.plist
index 0c093a2a..633037cb 100644
--- a/ios/GoogleService-Info.plist
+++ b/ios/GoogleService-Info.plist
@@ -3,21 +3,23 @@
CLIENT_ID
- 864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r.apps.googleusercontent.com
+ 815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt.apps.googleusercontent.com
REVERSED_CLIENT_ID
- com.googleusercontent.apps.864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r
+ com.googleusercontent.apps.815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt
+ ANDROID_CLIENT_ID
+ 815750722565-m14h8mkosm7cnq6uh6rhqr54dn02d705.apps.googleusercontent.com
API_KEY
- AIzaSyA_6ayGCk4fly7o7eTVBrj9kuHBYHMAOfs
+ AIzaSyDiXnCO00li4V7Ioa2YZ_M4ECxRsu_P9tA
GCM_SENDER_ID
- 864393916058
+ 815750722565
PLIST_VERSION
1
BUNDLE_ID
- com.cloud.diplomaticquarterapp
+ com.HMG.HMG-Smartphone
PROJECT_ID
- diplomaticquarter-d2385
+ api-project-815750722565
STORAGE_BUCKET
- diplomaticquarter-d2385.appspot.com
+ api-project-815750722565.appspot.com
IS_ADS_ENABLED
IS_ANALYTICS_ENABLED
@@ -29,8 +31,8 @@
IS_SIGNIN_ENABLED
GOOGLE_APP_ID
- 1:864393916058:ios:13f787bbfe6051f8b97923
+ 1:815750722565:ios:328ec247a81a2ca23c186c
DATABASE_URL
- https://diplomaticquarter-d2385.firebaseio.com
+ https://api-project-815750722565.firebaseio.com
\ No newline at end of file
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index d65de659..668711ce 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -20,7 +20,7 @@ PODS:
- Firebase/Messaging (6.33.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 4.7.0)
- - firebase_core (0.5.3):
+ - firebase_core (0.5.2):
- Firebase/CoreOnly (~> 6.33.0)
- Flutter
- firebase_core_web (0.1.0):
@@ -70,7 +70,7 @@ PODS:
- Flutter
- flutter_tts (0.0.1):
- Flutter
- - geolocator (6.1.9):
+ - "geolocator (6.0.0+4)":
- Flutter
- google_maps_flutter (0.0.1):
- Flutter
@@ -375,7 +375,7 @@ SPEC CHECKSUMS:
device_calendar: 23b28a5f1ab3bf77e34542fb1167e1b8b29a98f5
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
Firebase: 8db6f2d1b2c5e2984efba4949a145875a8f65fe5
- firebase_core: 5d6a02f3d85acd5f8321c2d6d62877626a670659
+ firebase_core: 350ba329d1641211bc6183a3236893cafdacfea7
firebase_core_web: d501d8b946b60c8af265428ce483b0fff5ad52d1
firebase_messaging: 0aea2cd5885b65e19ede58ee3507f485c992cc75
FirebaseCore: d889d9e12535b7f36ac8bfbf1713a0836a3012cd
@@ -390,7 +390,7 @@ SPEC CHECKSUMS:
flutter_local_notifications: 9e4738ce2471c5af910d961a6b7eadcf57c50186
flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35
flutter_tts: 0f492aab6accf87059b72354fcb4ba934304771d
- geolocator: 057a0c63a43e9c5296d8ad845a3ac8e6df23d899
+ geolocator: 1ae40084cc6c1586ce5ad12cfc3fd38c64d05f2f
google_maps_flutter: c7f9c73576de1fbe152a227bfd6e6c4ae8088619
GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833
GoogleMaps: 4b5346bddfe6911bb89155d43c903020170523ac
@@ -440,4 +440,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 5a17be3f8af73a757fa4439c77cf6ab2db29a6e7
-COCOAPODS: 1.8.4
+COCOAPODS: 1.10.0
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 009006ed..77d42044 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -28,6 +28,7 @@
E923EFD62587443800E3E751 /* HMGPlatformBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = E923EFD52587443800E3E751 /* HMGPlatformBridge.swift */; };
E923EFD82588D17700E3E751 /* gpx.gpx in Resources */ = {isa = PBXBuildFile; fileRef = E923EFD72588D17700E3E751 /* gpx.gpx */; };
E9620805255C2ED100D3A35D /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9620804255C2ED100D3A35D /* NetworkExtension.framework */; };
+ E9A35329258B8E8F00CBA688 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = E9A35328258B8E8F00CBA688 /* GoogleService-Info.plist */; };
E9C8C136256BACDA00EFFB62 /* HMG_Guest.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C8C135256BACDA00EFFB62 /* HMG_Guest.swift */; };
E9E27168256E3A4000F49B69 /* LocalizedFromFlutter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9E27167256E3A4000F49B69 /* LocalizedFromFlutter.swift */; };
/* End PBXBuildFile section */
@@ -78,6 +79,7 @@
E923EFD72588D17700E3E751 /* gpx.gpx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = gpx.gpx; sourceTree = ""; };
E9620803255C2ED100D3A35D /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; };
E9620804255C2ED100D3A35D /* NetworkExtension.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NetworkExtension.framework; path = System/Library/Frameworks/NetworkExtension.framework; sourceTree = SDKROOT; };
+ E9A35328258B8E8F00CBA688 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; };
E9C8C135256BACDA00EFFB62 /* HMG_Guest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMG_Guest.swift; sourceTree = ""; };
E9E27167256E3A4000F49B69 /* LocalizedFromFlutter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalizedFromFlutter.swift; sourceTree = ""; };
/* End PBXFileReference section */
@@ -128,6 +130,7 @@
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
+ E9A35328258B8E8F00CBA688 /* GoogleService-Info.plist */,
E923EFD72588D17700E3E751 /* gpx.gpx */,
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
@@ -265,6 +268,7 @@
files = (
E91B53A0256AAC1400E96549 /* GuestPOC_Certificate.cer in Resources */,
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+ E9A35329258B8E8F00CBA688 /* GoogleService-Info.plist in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
E923EFD82588D17700E3E751 /* gpx.gpx in Resources */,
E91B539F256AAC1400E96549 /* GuestPOC_Certificate.p12 in Resources */,
@@ -472,7 +476,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
- DEVELOPMENT_TEAM = "";
+ DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -611,7 +615,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
- DEVELOPMENT_TEAM = "";
+ DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -644,7 +648,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
- DEVELOPMENT_TEAM = "";
+ DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
diff --git a/ios/Runner/Helper/HMG_Geofence.swift b/ios/Runner/Helper/HMG_Geofence.swift
index fb469165..0c39fe5a 100644
--- a/ios/Runner/Helper/HMG_Geofence.swift
+++ b/ios/Runner/Helper/HMG_Geofence.swift
@@ -156,7 +156,7 @@ extension HMG_Geofence{
func notifyServer(forRegion:CLRegion, transition:Transition, location:CLLocation?){
df.dateFormat = "MMM/dd/yyyy hh:mm:ss"
- if let userProfileJson = UserDefaults.standard.string(forKey: "flutter.user-profile"),
+ if let userProfileJson = UserDefaults.standard.string(forKey: "flutter.imei-user-data"),
let userProfile = dictionary(from: userProfileJson), let patientId = userProfile["PatientID"] as? Int{
if let idString = forRegion.identifier.split(separator: "_").first, let idInt = Int(idString){
diff --git a/ios/gpx.gpx b/ios/gpx.gpx
index 9cc26956..6121e536 100644
--- a/ios/gpx.gpx
+++ b/ios/gpx.gpx
@@ -1 +1 @@
-
Sverrir Sigmundarson
Office
Office
Mahmoud Home
Mahmoud Home
Panorama Mall
Panorama Mall
Saudi Architects Crossing
Saudi Architects Crossing
Office
Office
\ No newline at end of file
+
Sverrir Sigmundarson
617.71
620.95
643.70
677.84
\ No newline at end of file
diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart
index acbf8d78..a45f24eb 100644
--- a/lib/pages/landing/landing_page.dart
+++ b/lib/pages/landing/landing_page.dart
@@ -146,7 +146,6 @@ class _LandingPageState extends State with WidgetsBindingObserver {
_firebaseMessaging.requestNotificationPermissions();
}
- // Flip Permission Checks [Zohaib Kambrani]
requestPermissions().then((results) {
if (results[Permission.notification].isGranted)
_firebaseMessaging.getToken().then((String token) {
@@ -436,7 +435,7 @@ class _LandingPageState extends State with WidgetsBindingObserver {
void checkUserStatus(token) async {
var result = await authService.selectDeviceImei(token);
- setUserValues(result);
+ await setUserValues(result);
registerGeofences();
if (await sharedPref.getObject(USER_PROFILE) != null) {
@@ -472,7 +471,7 @@ class _LandingPageState extends State with WidgetsBindingObserver {
}
Future getUserInformation() async {
- var userInfoJson = sharedPref.getObject(IMEI_USER_DATA);
+ var userInfoJson = await sharedPref.getObject(IMEI_USER_DATA);
return userInfoJson;
}
@@ -484,23 +483,22 @@ class _LandingPageState extends State with WidgetsBindingObserver {
registerGeofences() async {
await locator().getAllGeoZones(GeoZonesRequestModel());
+ var userInfo = await getUserInformation();
void doIt() {
- getUserInformation().then((value) {
- if (value != null) projectViewModel.platformBridge().registerHmgGeofences();
- });
+ projectViewModel.platformBridge().registerHmgGeofences();
}
- if (await Permission.location.isGranted) {
- doIt();
- } else {
- [Permission.location].request().then((value) async {
- if (await Permission.location.isGranted) {
- doIt();
- }
- });
+ if (userInfo != null) {
+ if (await Permission.location.isGranted) {
+ doIt();
+ } else {
+ [Permission.location].request().then((value) async {
+ if (await Permission.location.isGranted) {
+ doIt();
+ }
+ });
+ }
}
-
- requestPermissions().then((results) {});
}
}
diff --git a/lib/pages/medical/medical_profile_page.dart b/lib/pages/medical/medical_profile_page.dart
index 6dabf9d3..3260303c 100644
--- a/lib/pages/medical/medical_profile_page.dart
+++ b/lib/pages/medical/medical_profile_page.dart
@@ -430,7 +430,7 @@ class _MedicalProfilePageState extends State {
child: InkWell(
//TODO
onTap: () {
- if (authProvider.isLogin) {
+ if (projectViewModel.isLogin) {
String patientID = authProvider.getAuthenticatedUser().patientID.toString();
GifLoaderDialogUtils.showMyDialog(context);
projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)});
diff --git a/lib/widgets/drawer/app_drawer_widget.dart b/lib/widgets/drawer/app_drawer_widget.dart
index 9c6375e4..05ae92e3 100644
--- a/lib/widgets/drawer/app_drawer_widget.dart
+++ b/lib/widgets/drawer/app_drawer_widget.dart
@@ -331,7 +331,7 @@ class _AppDrawerState extends State {
await sharedPref.clear();
this.user = null;
Navigator.of(context).pushNamed(HOME);
- projectProvider.platformBridge().unRegisterHmgGeofences();
+ // projectProvider.platformBridge().unRegisterHmgGeofences();
}
login() async {