From fe2ea45d5fdf908f8b6b1f0b1c365a3e493b598c Mon Sep 17 00:00:00 2001 From: sachin Date: Thu, 26 Nov 2020 13:26:11 +0530 Subject: [PATCH 1/6] cam permission --- ios/Runner/Info.plist | 114 +++++++++++++++++++++--------------------- 1 file changed, 58 insertions(+), 56 deletions(-) diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 51c08bd..25e3b87 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -1,60 +1,62 @@ - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleDisplayName - MyHealth Sri Lanka - CFBundleName - MyHealth Sri Lanka - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - NSLocationAlwaysAndWhenInUseUsageDescription - We need your location information to check whether you were present in any contaminated area - NSLocationAlwaysUsageDescription - We need your location information to check whether you were present in any contaminated area - NSLocationWhenInUseUsageDescription - We need your location information to check whether you were present in any contaminated area - UIBackgroundModes - - location - remote-notification - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - io.flutter.embedded_views_preview - - + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleDisplayName + MyHealth Sri Lanka + CFBundleName + MyHealth Sri Lanka + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + NSLocationAlwaysAndWhenInUseUsageDescription + We need your location information to check whether you were present in any contaminated area + NSLocationAlwaysUsageDescription + We need your location information to check whether you were present in any contaminated area + NSLocationWhenInUseUsageDescription + We need your location information to check whether you were present in any contaminated area + UIBackgroundModes + + location + remote-notification + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + io.flutter.embedded_views_preview + + NSCameraUsageDescription + Myhealth camera permission for qr scanner + From d250e4cfb24ef0b1bc03c763b1f8b67833b57a20 Mon Sep 17 00:00:00 2001 From: Dasun Hegoda Date: Mon, 30 Nov 2020 16:39:29 +0530 Subject: [PATCH 2/6] verioning --- ios/Podfile.lock | 94 ++++++++++++++++------ ios/Runner.xcodeproj/project.pbxproj | 38 +++++---- ios/Runner/Info.plist | 116 +++++++++++++-------------- 3 files changed, 150 insertions(+), 98 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 08e67bd..2a93227 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2,6 +2,8 @@ PODS: - connectivity (0.0.1): - Flutter - Reachability + - connectivity_for_web (0.1.0): + - Flutter - connectivity_macos (0.0.1): - Flutter - Firebase/Core (6.10.0): @@ -70,14 +72,12 @@ PODS: - "GoogleUtilities/NSData+zlib (~> 6.2)" - Protobuf (>= 3.9.2, ~> 3.9) - Flutter (1.0.0) - - flutter_plugin_android_lifecycle (0.0.1): - - Flutter - FMDB (2.7.5): - FMDB/standard (= 2.7.5) - FMDB/standard (2.7.5) - - geolocator (5.3.0): + - "geolocator (5.3.2+2)": - Flutter - - google_api_availability (2.0.3): + - google_api_availability (2.0.4): - Flutter - google_maps_flutter (0.0.1): - Flutter @@ -115,8 +115,9 @@ PODS: - GoogleUtilities/Logger - GoogleUtilities/UserDefaults (6.3.1): - GoogleUtilities/Logger - - location_permissions (2.0.5): + - "location_permissions (3.0.0+1)": - Flutter + - MTBBarcodeScanner (5.0.11) - nanopb (0.3.901): - nanopb/decode (= 0.3.901) - nanopb/encode (= 0.3.901) @@ -126,52 +127,74 @@ PODS: - Flutter - path_provider (0.0.1): - Flutter + - path_provider_linux (0.0.1): + - Flutter - path_provider_macos (0.0.1): - Flutter + - path_provider_windows (0.0.1): + - Flutter - Protobuf (3.10.0) + - qr_code_scanner (0.0.2): + - Flutter + - MTBBarcodeScanner - Reachability (3.2) - - share (0.5.2): + - share (0.0.1): - Flutter - shared_preferences (0.0.1): - Flutter + - shared_preferences_linux (0.0.1): + - Flutter - shared_preferences_macos (0.0.1): - Flutter - shared_preferences_web (0.0.1): - Flutter + - shared_preferences_windows (0.0.1): + - Flutter - sqflite (0.0.1): - Flutter - FMDB (~> 2.7.2) - url_launcher (0.0.1): - Flutter + - url_launcher_linux (0.0.1): + - Flutter - url_launcher_macos (0.0.1): - Flutter - url_launcher_web (0.0.1): - Flutter + - url_launcher_windows (0.0.1): + - Flutter - webview_flutter (0.0.1): - Flutter DEPENDENCIES: - connectivity (from `.symlinks/plugins/connectivity/ios`) + - connectivity_for_web (from `.symlinks/plugins/connectivity_for_web/ios`) - connectivity_macos (from `.symlinks/plugins/connectivity_macos/ios`) - firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`) - firebase_remote_config (from `.symlinks/plugins/firebase_remote_config/ios`) - Flutter (from `Flutter`) - - flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`) - geolocator (from `.symlinks/plugins/geolocator/ios`) - google_api_availability (from `.symlinks/plugins/google_api_availability/ios`) - google_maps_flutter (from `.symlinks/plugins/google_maps_flutter/ios`) - location_permissions (from `.symlinks/plugins/location_permissions/ios`) - package_info (from `.symlinks/plugins/package_info/ios`) - path_provider (from `.symlinks/plugins/path_provider/ios`) + - path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`) - path_provider_macos (from `.symlinks/plugins/path_provider_macos/ios`) + - path_provider_windows (from `.symlinks/plugins/path_provider_windows/ios`) + - qr_code_scanner (from `.symlinks/plugins/qr_code_scanner/ios`) - share (from `.symlinks/plugins/share/ios`) - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) + - shared_preferences_linux (from `.symlinks/plugins/shared_preferences_linux/ios`) - shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`) - shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`) + - shared_preferences_windows (from `.symlinks/plugins/shared_preferences_windows/ios`) - sqflite (from `.symlinks/plugins/sqflite/ios`) - url_launcher (from `.symlinks/plugins/url_launcher/ios`) + - url_launcher_linux (from `.symlinks/plugins/url_launcher_linux/ios`) - url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`) - url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`) + - url_launcher_windows (from `.symlinks/plugins/url_launcher_windows/ios`) - webview_flutter (from `.symlinks/plugins/webview_flutter/ios`) SPEC REPOS: @@ -192,6 +215,7 @@ SPEC REPOS: - GoogleDataTransportCCTSupport - GoogleMaps - GoogleUtilities + - MTBBarcodeScanner - nanopb - Protobuf - Reachability @@ -199,6 +223,8 @@ SPEC REPOS: EXTERNAL SOURCES: connectivity: :path: ".symlinks/plugins/connectivity/ios" + connectivity_for_web: + :path: ".symlinks/plugins/connectivity_for_web/ios" connectivity_macos: :path: ".symlinks/plugins/connectivity_macos/ios" firebase_messaging: @@ -207,8 +233,6 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/firebase_remote_config/ios" Flutter: :path: Flutter - flutter_plugin_android_lifecycle: - :path: ".symlinks/plugins/flutter_plugin_android_lifecycle/ios" geolocator: :path: ".symlinks/plugins/geolocator/ios" google_api_availability: @@ -221,33 +245,48 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/package_info/ios" path_provider: :path: ".symlinks/plugins/path_provider/ios" + path_provider_linux: + :path: ".symlinks/plugins/path_provider_linux/ios" path_provider_macos: :path: ".symlinks/plugins/path_provider_macos/ios" + path_provider_windows: + :path: ".symlinks/plugins/path_provider_windows/ios" + qr_code_scanner: + :path: ".symlinks/plugins/qr_code_scanner/ios" share: :path: ".symlinks/plugins/share/ios" shared_preferences: :path: ".symlinks/plugins/shared_preferences/ios" + shared_preferences_linux: + :path: ".symlinks/plugins/shared_preferences_linux/ios" shared_preferences_macos: :path: ".symlinks/plugins/shared_preferences_macos/ios" shared_preferences_web: :path: ".symlinks/plugins/shared_preferences_web/ios" + shared_preferences_windows: + :path: ".symlinks/plugins/shared_preferences_windows/ios" sqflite: :path: ".symlinks/plugins/sqflite/ios" url_launcher: :path: ".symlinks/plugins/url_launcher/ios" + url_launcher_linux: + :path: ".symlinks/plugins/url_launcher_linux/ios" url_launcher_macos: :path: ".symlinks/plugins/url_launcher_macos/ios" url_launcher_web: :path: ".symlinks/plugins/url_launcher_web/ios" + url_launcher_windows: + :path: ".symlinks/plugins/url_launcher_windows/ios" webview_flutter: :path: ".symlinks/plugins/webview_flutter/ios" SPEC CHECKSUMS: - connectivity: 6e94255659cc86dcbef1d452ad3e0491bb1b3e75 + connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467 + connectivity_for_web: 2b8584556930d4bd490d82b836bcf45067ce345b connectivity_macos: e2e9731b6b22dda39eb1b128f6969d574460e191 Firebase: 5e6b7b12bf9adb90986688edc06b156c37e109cd - firebase_messaging: cffb57ce40958c6204f03fb0c81713e4cd1e240c - firebase_remote_config: f3581c5addecc691a968f2a7f2bcdf0878509bfd + firebase_messaging: 21344b3b3a7d9d325d63a70e3750c0c798fe1e03 + firebase_remote_config: 7297b33f88ca82beacff00cc60cc1230bd9fc4c5 FirebaseABTesting: 821a3a3e4a145987e80fee3657c4de1cb9adf693 FirebaseAnalytics: 0e3ecff2c5d86070f7d4325e21f1edabfbd558dc FirebaseAnalyticsInterop: d48b6ab67bcf016a05e55b71fc39c61c0cb6b7f3 @@ -258,33 +297,40 @@ SPEC CHECKSUMS: FirebaseMessaging: 35edef69a6af9b34e9e44624089f054be3c09089 FirebaseRemoteConfig: 47abf7a04a9082091955ea555aa79cfdd249b19c Flutter: 0e3d915762c693b495b44d77113d4970485de6ec - flutter_plugin_android_lifecycle: 47de533a02850f070f5696a623995e93eddcdb9b FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a - geolocator: 7cdcf71180b80913b3cd84ab715d3b5365b378af - google_api_availability: 526574c9a5a0ae541e18c65f98e47afc11f53c8b - google_maps_flutter: d0dd62f5a7d39bae61057eb9f52dd778d99c7c6c + geolocator: f7622e0e7e2a24718285b73916d60c4a54b9f5b6 + google_api_availability: 15fa42a8cd83c0a6738507ffe6e87096f12abcb8 + google_maps_flutter: 78a52114c898b42ea647919679a4c58b70abe876 GoogleAppMeasurement: 434cc7be25e71dc04b8d0e3079125127b330e84a GoogleDataTransport: 166f9b9f82cbf60a204e8fe2daa9db3e3ec1fb15 GoogleDataTransportCCTSupport: f6ab1962e9dc05ab1fb938b795e5b310209edeec GoogleMaps: f79af95cb24d869457b1f961c93d3ce8b2f3b848 GoogleUtilities: f895fde57977df4e0233edda0dbeac490e3703b6 - location_permissions: 4a49d4e5bec5b653643e551ab77963cc99bb0e4a + location_permissions: 7e0f9aa0f60deb8ff93ddf0e2a164c7e8197bc94 + MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb nanopb: 2901f78ea1b7b4015c860c2fdd1ea2fee1a18d48 - package_info: 48b108e75b8802c2d5e126f208ef540561c98aef - path_provider: fb74bd0465e96b594bb3b5088ee4a4e7bb1f2a9d + package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 + path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c + path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4 path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0 + path_provider_windows: a2b81600c677ac1959367280991971cb9a1edb3b Protobuf: a4dc852ad69c027ca2166ed287b856697814375b + qr_code_scanner: 16107718bdad7d708cdf6a5eacdca24b56cdf471 Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 - share: bae0a282aab4483288913fc4dc0b935d4b491f2e - shared_preferences: 430726339841afefe5142b9c1f50cb6bd7793e01 + share: 0b2c3e82132f5888bccca3351c504d0003b3b410 + shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d + shared_preferences_linux: afefbfe8d921e207f01ede8b60373d9e3b566b78 shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087 shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9 + shared_preferences_windows: 36b76d6f54e76ead957e60b49e2f124b4cd3e6ae sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0 - url_launcher: a1c0cc845906122c4784c542523d8cacbded5626 + url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef + url_launcher_linux: ac237cb7a8058736e4aae38bdbcc748a4b394cc0 url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313 url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c - webview_flutter: bec7599de6bfbe8008a739aa3ebd7b364ea9d0cd + url_launcher_windows: 683d7c283894db8d1914d3ab2223b20cc1ad95d5 + webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96 PODFILE CHECKSUM: 1b66dae606f75376c5f2135a8290850eeb09ae83 -COCOAPODS: 1.9.0 +COCOAPODS: 1.9.1 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index abc7f94..3f53821 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -194,7 +194,7 @@ CreatedOnToolsVersion = 7.3.1; DevelopmentTeam = Z8TR4CWL9F; LastSwiftMigration = 1100; - ProvisioningStyle = Manual; + ProvisioningStyle = Automatic; }; }; }; @@ -382,6 +382,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + "EXCLUDED_ARCHS[sdk=*]" = armv7; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -406,10 +407,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CODE_SIGN_IDENTITY = "iPhone Distribution"; - CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = Z8TR4CWL9F; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 41; + DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -421,9 +422,10 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); + MARKETING_VERSION = 1.17.4; PRODUCT_BUNDLE_IDENTIFIER = app.ceylon.selftrackingapp; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = "COVID-Provisioning"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; @@ -464,6 +466,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + "EXCLUDED_ARCHS[sdk=*]" = armv7; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -520,6 +523,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + "EXCLUDED_ARCHS[sdk=*]" = armv7; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -545,10 +549,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CODE_SIGN_IDENTITY = "iPhone Distribution"; - CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = Z8TR4CWL9F; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 41; + DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -560,9 +564,10 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); + MARKETING_VERSION = 1.17.4; PRODUCT_BUNDLE_IDENTIFIER = app.ceylon.selftrackingapp; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = "COVID-Provisioning"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -577,10 +582,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CODE_SIGN_IDENTITY = "iPhone Distribution"; - CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = Z8TR4CWL9F; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 41; + DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -592,9 +597,10 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); + MARKETING_VERSION = 1.17.4; PRODUCT_BUNDLE_IDENTIFIER = app.ceylon.selftrackingapp; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = "COVID-Provisioning"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 25e3b87..500741f 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -1,62 +1,62 @@ - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleDisplayName - MyHealth Sri Lanka - CFBundleName - MyHealth Sri Lanka - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - NSLocationAlwaysAndWhenInUseUsageDescription - We need your location information to check whether you were present in any contaminated area - NSLocationAlwaysUsageDescription - We need your location information to check whether you were present in any contaminated area - NSLocationWhenInUseUsageDescription - We need your location information to check whether you were present in any contaminated area - UIBackgroundModes - - location - remote-notification - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - io.flutter.embedded_views_preview - - NSCameraUsageDescription - Myhealth camera permission for qr scanner - + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + MyHealth Sri Lanka + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + MyHealth Sri Lanka + CFBundlePackageType + APPL + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + LSRequiresIPhoneOS + + NSCameraUsageDescription + Myhealth camera permission for qr scanner + NSLocationAlwaysAndWhenInUseUsageDescription + We need your location information to check whether you were present in any contaminated area + NSLocationAlwaysUsageDescription + We need your location information to check whether you were present in any contaminated area + NSLocationWhenInUseUsageDescription + We need your location information to check whether you were present in any contaminated area + UIBackgroundModes + + location + remote-notification + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + io.flutter.embedded_views_preview + + From c830ed16597623aa1bd92358832c628d1a039f25 Mon Sep 17 00:00:00 2001 From: sachin Date: Mon, 7 Dec 2020 11:15:33 +0530 Subject: [PATCH 3/6] removed unuse permission --- ios/Runner/Info.plist | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 500741f..7dcbb79 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -26,12 +26,6 @@ NSCameraUsageDescription Myhealth camera permission for qr scanner - NSLocationAlwaysAndWhenInUseUsageDescription - We need your location information to check whether you were present in any contaminated area - NSLocationAlwaysUsageDescription - We need your location information to check whether you were present in any contaminated area - NSLocationWhenInUseUsageDescription - We need your location information to check whether you were present in any contaminated area UIBackgroundModes location From d04772216c79a88d5a6872c6819e64ec2a720566 Mon Sep 17 00:00:00 2001 From: sachinPramodya Date: Fri, 18 Dec 2020 12:06:10 +0530 Subject: [PATCH 4/6] removed unwanted packages --- .../screen/selected_case_detail_screen.dart | 330 ++++++------- lib/widgets/case_item.dart | 434 +++++++++--------- pubspec.lock | 44 +- pubspec.yaml | 10 +- 4 files changed, 387 insertions(+), 431 deletions(-) diff --git a/lib/page/screen/selected_case_detail_screen.dart b/lib/page/screen/selected_case_detail_screen.dart index 50b757d..06059ac 100644 --- a/lib/page/screen/selected_case_detail_screen.dart +++ b/lib/page/screen/selected_case_detail_screen.dart @@ -1,165 +1,165 @@ -import 'dart:async'; -import 'dart:convert'; -import 'package:geolocator/geolocator.dart'; -import 'package:intl/intl.dart'; - -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:selftrackingapp/models/location.dart'; -import 'package:selftrackingapp/models/reported_case.dart'; - -DateFormat dateFormat = DateFormat("yyyy-MM-dd HH:mm:ss"); - -class SelectedCaseDetailScreen extends StatefulWidget { - final ReportedCase reportedCase; - - const SelectedCaseDetailScreen({Key key, this.reportedCase}) - : super(key: key); - - @override - _SelectedCaseDetailScreenState createState() => - _SelectedCaseDetailScreenState(); -} - -class _SelectedCaseDetailScreenState extends State { - static const MethodChannel _channel = MethodChannel('location'); - - Completer _controller = Completer(); - Position _currentLocation; - - List locationMarkers = []; - - @override - void initState() { - super.initState(); - -// initializing _currentLocation with first location of the reported case - try { - _currentLocation = Position( - latitude: widget.reportedCase.locations[0].latitude, - longitude: widget.reportedCase.locations[0].longitude); - } catch (e) { - print(e); - } - -// http://localhost:8000/application/dhis/patients - - BitmapDescriptor.fromAssetImage( - ImageConfiguration(devicePixelRatio: 0.1, size: Size(0.5, 0.5)), - "assets/images/user_icon.png") - .then((userIcon) { - BitmapDescriptor.fromAssetImage( - ImageConfiguration(devicePixelRatio: 0.1, size: Size(0.5, 0.5)), - "assets/images/suspected_icon.png") - .then((suspectIcon) { - getLocationUpdate().then((List locations) { - setState(() { - locationMarkers = widget.reportedCase.locations.map((l) { - return Marker( - icon: suspectIcon, - alpha: 0.5, - infoWindow: InfoWindow( - title: - "Suspected person is at ${dateFormat.format(l.date)}", - snippet: ""), - markerId: MarkerId("${l.date.millisecondsSinceEpoch}"), - position: LatLng(l.latitude, l.longitude)); - }).toList(); - -// locationMarkers.addAll(locations.map((l) { -// return Marker( -// icon: userIcon, -// alpha: 0.5, -// infoWindow: InfoWindow( -// title: "You where there at ${dateFormat.format(l.date)}", -// snippet: ""), -// markerId: MarkerId("${l.date.millisecondsSinceEpoch}"), -// position: LatLng(l.latitude, l.longitude)); -// }).toList(growable: false)); - }); - }); - }); - }); - } - - @override - void dispose() { - super.dispose(); -// if (_locationTimer != null) _locationTimer.cancel(); -// if (_currentLoctimer != null) _currentLoctimer.cancel(); - print("CANCELLING timers"); - } - - @override - Widget build(BuildContext context) { - return Container( - child: getMapView( - widget.reportedCase.locations), //initially this will be empty - ); - } - - Widget getMapView(List entries) { - return Scaffold( - appBar: AppBar( - backgroundColor: Colors.white, - iconTheme: IconThemeData(color: Colors.black), - title: Text("${widget.reportedCase.caseNumber}", - style: TextStyle(color: Colors.black)), - ), - body: GoogleMap( - mapType: MapType.terrain, - markers: getMapEntries(), - circles: widget.reportedCase.locations.map((l) { - return Circle( - circleId: CircleId("${l.date.millisecondsSinceEpoch}"), - center: LatLng(l.latitude, l.longitude), - radius: 50, - fillColor: Colors.red.withOpacity(0.5), - strokeColor: Colors.transparent, - strokeWidth: 0); - }).toSet(), - initialCameraPosition: CameraPosition( - target: _currentLocation != null - ? LatLng(_currentLocation.latitude, _currentLocation.longitude) - : LatLng(6.9271, 79.8612), - zoom: 12, - ), - myLocationButtonEnabled: true, - myLocationEnabled: true, - onMapCreated: (GoogleMapController controller) { - _controller.complete(controller); - }, - ), - ); - } - - Widget getListView(List entries) { - return ListView.builder( - padding: const EdgeInsets.all(8), - itemCount: entries.length, - itemBuilder: (BuildContext context, int index) { - return Text( - 'Entry ${entries[index].longitude},${entries[index].latitude},${entries[index].date}'); - }); - } - - Future> getLocationUpdate() async { - try { - final List locations = - await _channel.invokeMethod('getLocation'); - print("locations $locations"); - - return locations - .map((v) => Location.fromBackgroundJson(json.decode(v))) - .toList(); - } on Exception catch (e) { - print(e); - } - return null; - } - - getMapEntries() { - return locationMarkers.toSet(); - } -} +// import 'dart:async'; +// import 'dart:convert'; +// import 'package:geolocator/geolocator.dart'; +// import 'package:intl/intl.dart'; + +// import 'package:flutter/material.dart'; +// import 'package:flutter/services.dart'; +// import 'package:google_maps_flutter/google_maps_flutter.dart'; +// import 'package:selftrackingapp/models/location.dart'; +// import 'package:selftrackingapp/models/reported_case.dart'; + +// DateFormat dateFormat = DateFormat("yyyy-MM-dd HH:mm:ss"); + +// class SelectedCaseDetailScreen extends StatefulWidget { +// final ReportedCase reportedCase; + +// const SelectedCaseDetailScreen({Key key, this.reportedCase}) +// : super(key: key); + +// @override +// _SelectedCaseDetailScreenState createState() => +// _SelectedCaseDetailScreenState(); +// } + +// class _SelectedCaseDetailScreenState extends State { +// static const MethodChannel _channel = MethodChannel('location'); + +// Completer _controller = Completer(); +// Position _currentLocation; + +// List locationMarkers = []; + +// @override +// void initState() { +// super.initState(); + +// // initializing _currentLocation with first location of the reported case +// try { +// _currentLocation = Position( +// latitude: widget.reportedCase.locations[0].latitude, +// longitude: widget.reportedCase.locations[0].longitude); +// } catch (e) { +// print(e); +// } + +// // http://localhost:8000/application/dhis/patients + +// BitmapDescriptor.fromAssetImage( +// ImageConfiguration(devicePixelRatio: 0.1, size: Size(0.5, 0.5)), +// "assets/images/user_icon.png") +// .then((userIcon) { +// BitmapDescriptor.fromAssetImage( +// ImageConfiguration(devicePixelRatio: 0.1, size: Size(0.5, 0.5)), +// "assets/images/suspected_icon.png") +// .then((suspectIcon) { +// getLocationUpdate().then((List locations) { +// setState(() { +// locationMarkers = widget.reportedCase.locations.map((l) { +// return Marker( +// icon: suspectIcon, +// alpha: 0.5, +// infoWindow: InfoWindow( +// title: +// "Suspected person is at ${dateFormat.format(l.date)}", +// snippet: ""), +// markerId: MarkerId("${l.date.millisecondsSinceEpoch}"), +// position: LatLng(l.latitude, l.longitude)); +// }).toList(); + +// // locationMarkers.addAll(locations.map((l) { +// // return Marker( +// // icon: userIcon, +// // alpha: 0.5, +// // infoWindow: InfoWindow( +// // title: "You where there at ${dateFormat.format(l.date)}", +// // snippet: ""), +// // markerId: MarkerId("${l.date.millisecondsSinceEpoch}"), +// // position: LatLng(l.latitude, l.longitude)); +// // }).toList(growable: false)); +// }); +// }); +// }); +// }); +// } + +// @override +// void dispose() { +// super.dispose(); +// // if (_locationTimer != null) _locationTimer.cancel(); +// // if (_currentLoctimer != null) _currentLoctimer.cancel(); +// print("CANCELLING timers"); +// } + +// @override +// Widget build(BuildContext context) { +// return Container( +// child: getMapView( +// widget.reportedCase.locations), //initially this will be empty +// ); +// } + +// Widget getMapView(List entries) { +// return Scaffold( +// appBar: AppBar( +// backgroundColor: Colors.white, +// iconTheme: IconThemeData(color: Colors.black), +// title: Text("${widget.reportedCase.caseNumber}", +// style: TextStyle(color: Colors.black)), +// ), +// body: GoogleMap( +// mapType: MapType.terrain, +// markers: getMapEntries(), +// circles: widget.reportedCase.locations.map((l) { +// return Circle( +// circleId: CircleId("${l.date.millisecondsSinceEpoch}"), +// center: LatLng(l.latitude, l.longitude), +// radius: 50, +// fillColor: Colors.red.withOpacity(0.5), +// strokeColor: Colors.transparent, +// strokeWidth: 0); +// }).toSet(), +// initialCameraPosition: CameraPosition( +// target: _currentLocation != null +// ? LatLng(_currentLocation.latitude, _currentLocation.longitude) +// : LatLng(6.9271, 79.8612), +// zoom: 12, +// ), +// myLocationButtonEnabled: true, +// myLocationEnabled: true, +// onMapCreated: (GoogleMapController controller) { +// _controller.complete(controller); +// }, +// ), +// ); +// } + +// Widget getListView(List entries) { +// return ListView.builder( +// padding: const EdgeInsets.all(8), +// itemCount: entries.length, +// itemBuilder: (BuildContext context, int index) { +// return Text( +// 'Entry ${entries[index].longitude},${entries[index].latitude},${entries[index].date}'); +// }); +// } + +// Future> getLocationUpdate() async { +// try { +// final List locations = +// await _channel.invokeMethod('getLocation'); +// print("locations $locations"); + +// return locations +// .map((v) => Location.fromBackgroundJson(json.decode(v))) +// .toList(); +// } on Exception catch (e) { +// print(e); +// } +// return null; +// } + +// getMapEntries() { +// return locationMarkers.toSet(); +// } +// } diff --git a/lib/widgets/case_item.dart b/lib/widgets/case_item.dart index dc28f2b..c809cc4 100644 --- a/lib/widgets/case_item.dart +++ b/lib/widgets/case_item.dart @@ -1,221 +1,221 @@ -import 'package:date_format/date_format.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:selftrackingapp/app_localizations.dart'; -import 'package:selftrackingapp/models/reported_case.dart'; -import 'package:selftrackingapp/notifiers/registered_cases_model.dart'; -import 'package:selftrackingapp/page/screen/selected_case_detail_screen.dart'; -import 'package:selftrackingapp/page/screen/user_register_screen.dart'; -import 'package:selftrackingapp/utils/tracker_colors.dart'; +// import 'package:date_format/date_format.dart'; +// import 'package:flutter/material.dart'; +// import 'package:provider/provider.dart'; +// import 'package:selftrackingapp/app_localizations.dart'; +// import 'package:selftrackingapp/models/reported_case.dart'; +// import 'package:selftrackingapp/notifiers/registered_cases_model.dart'; +// import 'package:selftrackingapp/page/screen/selected_case_detail_screen.dart'; +// import 'package:selftrackingapp/page/screen/user_register_screen.dart'; +// import 'package:selftrackingapp/utils/tracker_colors.dart'; -class CaseItem extends StatelessWidget { - final ReportedCase _case; +// class CaseItem extends StatelessWidget { +// final ReportedCase _case; - CaseItem(this._case); +// CaseItem(this._case); - @override - Widget build(BuildContext context) { -// var source = _case.isLocal ? 'Local' : 'Imported'; -// source += ', from: ' + -// (_case.isFromFacility ? 'Quarantine Facility' : 'Community'); - return GestureDetector( - child: Container( - width: 100.0, - margin: EdgeInsets.symmetric(vertical: 16.0, horizontal: 24.0), - padding: EdgeInsets.all(16.0), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(12.0), - boxShadow: [ - BoxShadow( - color: Colors.black12, blurRadius: 12.0, offset: Offset(0, 4.0)) - ], - ), - child: Row( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Icon( - Icons.trip_origin, - size: 18.0, - ), - SizedBox(width: 20.0), - Expanded( - child: Container( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - _case.caseNumber, - style: TextStyle( - fontSize: 18.0, fontWeight: FontWeight.w800), - ), - SizedBox(height: 6.0), - Text( - formatDate(_case.createdAt, - [yy, '-', M, '-', d, ' ', h, ':', nn, ' ', am]), - style: TextStyle(fontSize: 12.0), - ), - SizedBox(height: 16.0), - Wrap( - spacing: 8.0, // gap between adjacent chips - runSpacing: 4.0, - children: [ - Container( - decoration: BoxDecoration( - color: - _case.isLocal ? Colors.green : Colors.amber, - borderRadius: - BorderRadius.all(Radius.circular(5))), - child: Padding( - padding: EdgeInsets.all(8.0), - child: Text( - _case.isLocal - ? AppLocalizations.of(context) - .translate("case_item_local") - : AppLocalizations.of(context) - .translate("case_item_foreign"), - style: TextStyle(color: Colors.white), - ), - ), - ), - Container( - decoration: BoxDecoration( - color: - _case.isLocal ? Colors.purple : Colors.blue, - borderRadius: - BorderRadius.all(Radius.circular(5))), - child: Padding( - padding: EdgeInsets.all(8.0), - child: Text( - _case.isFromFacility - ? AppLocalizations.of(context) - .translate("case_item_community") - : AppLocalizations.of(context) - .translate("case_item_quarantine"), - style: TextStyle(color: Colors.white), - ), - ), - ), - ], - ), - SizedBox(height: 16.0), - Text( - _case.message, - ), - SizedBox(height: 16.0), - Text( - AppLocalizations.of(context) - .translate("case_item_reported_locations"), - style: TextStyle( - fontSize: 14.0, fontWeight: FontWeight.w900), - ), - SizedBox(height: 6.0), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: _case.locations - .map((location) => Container( - width: MediaQuery.of(context).size.width / 2, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(location.address), - Text( - formatDate(location.from, [ - yy, - '-', - M, - '-', - d, - ' ', - h, - ':', - nn, - ' ', - am - ]) + - " to " + - formatDate(location.to, [ - yy, - '-', - M, - '-', - d, - ' ', - h, - ':', - nn, - ' ', - am - ]), - style: TextStyle( - fontSize: 12.0, - fontStyle: FontStyle.italic), - ), - SizedBox( - height: 6.0, - ) - ], - ))) - .toList(), - ), - Align( - alignment: Alignment.bottomRight, - child: !Provider.of(context) - .reportedCases - .contains(_case) - ? RaisedButton( - color: TrackerColors.primaryColor, - child: Text( - AppLocalizations.of(context) - .translate("case_item_register"), - style: TextStyle(color: Colors.white), - ), - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.all(Radius.circular(5.0))), - onPressed: () { - Provider.of(context, - listen: false) - .add( - _case, - ); - RegisteredCasesModel model = - Provider.of(context, - listen: false); - Navigator.of(context).push(MaterialPageRoute( - builder: (context) => - ChangeNotifierProvider.value( - value: model, - child: UserRegisterScreen(), - ), - )); - }, - ) - : Text( - AppLocalizations.of(context) - .translate("case_item_already_register"), - style: TextStyle( - color: Colors.grey, - ), - )) - ], - ), - ), - ), - ], - ), - ), - onTap: () => _showCasDetails(context, _case.id), - ); - } +// @override +// Widget build(BuildContext context) { +// // var source = _case.isLocal ? 'Local' : 'Imported'; +// // source += ', from: ' + +// // (_case.isFromFacility ? 'Quarantine Facility' : 'Community'); +// return GestureDetector( +// child: Container( +// width: 100.0, +// margin: EdgeInsets.symmetric(vertical: 16.0, horizontal: 24.0), +// padding: EdgeInsets.all(16.0), +// decoration: BoxDecoration( +// color: Colors.white, +// borderRadius: BorderRadius.circular(12.0), +// boxShadow: [ +// BoxShadow( +// color: Colors.black12, blurRadius: 12.0, offset: Offset(0, 4.0)) +// ], +// ), +// child: Row( +// mainAxisSize: MainAxisSize.min, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Icon( +// Icons.trip_origin, +// size: 18.0, +// ), +// SizedBox(width: 20.0), +// Expanded( +// child: Container( +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// _case.caseNumber, +// style: TextStyle( +// fontSize: 18.0, fontWeight: FontWeight.w800), +// ), +// SizedBox(height: 6.0), +// Text( +// formatDate(_case.createdAt, +// [yy, '-', M, '-', d, ' ', h, ':', nn, ' ', am]), +// style: TextStyle(fontSize: 12.0), +// ), +// SizedBox(height: 16.0), +// Wrap( +// spacing: 8.0, // gap between adjacent chips +// runSpacing: 4.0, +// children: [ +// Container( +// decoration: BoxDecoration( +// color: +// _case.isLocal ? Colors.green : Colors.amber, +// borderRadius: +// BorderRadius.all(Radius.circular(5))), +// child: Padding( +// padding: EdgeInsets.all(8.0), +// child: Text( +// _case.isLocal +// ? AppLocalizations.of(context) +// .translate("case_item_local") +// : AppLocalizations.of(context) +// .translate("case_item_foreign"), +// style: TextStyle(color: Colors.white), +// ), +// ), +// ), +// Container( +// decoration: BoxDecoration( +// color: +// _case.isLocal ? Colors.purple : Colors.blue, +// borderRadius: +// BorderRadius.all(Radius.circular(5))), +// child: Padding( +// padding: EdgeInsets.all(8.0), +// child: Text( +// _case.isFromFacility +// ? AppLocalizations.of(context) +// .translate("case_item_community") +// : AppLocalizations.of(context) +// .translate("case_item_quarantine"), +// style: TextStyle(color: Colors.white), +// ), +// ), +// ), +// ], +// ), +// SizedBox(height: 16.0), +// Text( +// _case.message, +// ), +// SizedBox(height: 16.0), +// Text( +// AppLocalizations.of(context) +// .translate("case_item_reported_locations"), +// style: TextStyle( +// fontSize: 14.0, fontWeight: FontWeight.w900), +// ), +// SizedBox(height: 6.0), +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: _case.locations +// .map((location) => Container( +// width: MediaQuery.of(context).size.width / 2, +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text(location.address), +// Text( +// formatDate(location.from, [ +// yy, +// '-', +// M, +// '-', +// d, +// ' ', +// h, +// ':', +// nn, +// ' ', +// am +// ]) + +// " to " + +// formatDate(location.to, [ +// yy, +// '-', +// M, +// '-', +// d, +// ' ', +// h, +// ':', +// nn, +// ' ', +// am +// ]), +// style: TextStyle( +// fontSize: 12.0, +// fontStyle: FontStyle.italic), +// ), +// SizedBox( +// height: 6.0, +// ) +// ], +// ))) +// .toList(), +// ), +// Align( +// alignment: Alignment.bottomRight, +// child: !Provider.of(context) +// .reportedCases +// .contains(_case) +// ? RaisedButton( +// color: TrackerColors.primaryColor, +// child: Text( +// AppLocalizations.of(context) +// .translate("case_item_register"), +// style: TextStyle(color: Colors.white), +// ), +// shape: RoundedRectangleBorder( +// borderRadius: +// BorderRadius.all(Radius.circular(5.0))), +// onPressed: () { +// Provider.of(context, +// listen: false) +// .add( +// _case, +// ); +// RegisteredCasesModel model = +// Provider.of(context, +// listen: false); +// Navigator.of(context).push(MaterialPageRoute( +// builder: (context) => +// ChangeNotifierProvider.value( +// value: model, +// child: UserRegisterScreen(), +// ), +// )); +// }, +// ) +// : Text( +// AppLocalizations.of(context) +// .translate("case_item_already_register"), +// style: TextStyle( +// color: Colors.grey, +// ), +// )) +// ], +// ), +// ), +// ), +// ], +// ), +// ), +// onTap: () => _showCasDetails(context, _case.id), +// ); +// } - void _showCasDetails(BuildContext context, int id) { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => SelectedCaseDetailScreen( - reportedCase: _case, - ))); - } -} +// void _showCasDetails(BuildContext context, int id) { +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (context) => SelectedCaseDetailScreen( +// reportedCase: _case, +// ))); +// } +// } diff --git a/pubspec.lock b/pubspec.lock index c0a1027..84786d4 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -57,13 +57,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.1" - clustering_google_maps: - dependency: "direct main" - description: - name: clustering_google_maps - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.2" collection: dependency: transitive description: @@ -224,20 +217,6 @@ packages: description: flutter source: sdk version: "0.0.0" - geohash: - dependency: transitive - description: - name: geohash - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.1" - geolocator: - dependency: "direct main" - description: - name: geolocator - url: "https://pub.dartlang.org" - source: hosted - version: "5.3.2+2" get_it: dependency: "direct main" description: @@ -245,13 +224,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.0.4" - google_api_availability: - dependency: transitive - description: - name: google_api_availability - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" google_fonts: dependency: "direct main" description: @@ -259,13 +231,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.3.10" - google_maps_flutter: - dependency: "direct main" - description: - name: google_maps_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.21+3" html: dependency: transitive description: @@ -308,13 +273,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.3.4" - location_permissions: - dependency: transitive - description: - name: location_permissions - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0+1" logger: dependency: "direct main" description: @@ -693,4 +651,4 @@ packages: version: "3.5.0" sdks: dart: ">=2.7.0 <3.0.0" - flutter: ">=1.12.13+hotfix.6 <2.0.0" + flutter: ">=1.12.13+hotfix.5 <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 76845bf..04f4f67 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -24,7 +24,7 @@ dependencies: share: ^0.6.3+6 firebase_messaging: ^6.0.13 firebase_remote_config: ^0.3.0+3 - google_maps_flutter: ^0.5.21+3 + shared_preferences: ^0.5.6+3 url_launcher: ^5.4.2 http: ^0.12.0+4 @@ -35,7 +35,6 @@ dependencies: date_format: ^1.0.8 provider: ^4.0.4 equatable: ^1.1.1 - geolocator: ^5.3.1 async: ^2.4.0 package_info: ^0.4.0+16 connectivity: ^0.4.8+2 @@ -46,10 +45,9 @@ dependencies: flutter_html: ^0.11.1 flutter_colorpicker: ^0.3.4 qr_code_scanner: ^0.0.12 - - - - clustering_google_maps: ^0.1.2 + # google_maps_flutter: ^0.5.21+3 + # geolocator: ^5.3.1 + # clustering_google_maps: ^0.1.2 flutter_localizations: sdk: flutter From a6952c0975331a80544864e1aadb411eb9f549b7 Mon Sep 17 00:00:00 2001 From: Pavan Welihinda Date: Tue, 22 Dec 2020 13:06:38 +0530 Subject: [PATCH 5/6] Fixed build issues on iOS. --- ios/Podfile.lock | 190 ++++++++++++--------------- ios/Runner.xcodeproj/project.pbxproj | 16 --- ios/Runner/AppDelegate.swift | 4 - 3 files changed, 84 insertions(+), 126 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 2a93227..409eddd 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -6,17 +6,17 @@ PODS: - Flutter - connectivity_macos (0.0.1): - Flutter - - Firebase/Core (6.10.0): + - Firebase/Core (6.19.0): - Firebase/CoreOnly - - FirebaseAnalytics (= 6.1.3) - - Firebase/CoreOnly (6.10.0): - - FirebaseCore (= 6.3.1) - - Firebase/Messaging (6.10.0): + - FirebaseAnalytics (= 6.3.1) + - Firebase/CoreOnly (6.19.0): + - FirebaseCore (= 6.6.4) + - Firebase/Messaging (6.19.0): - Firebase/CoreOnly - - FirebaseMessaging (~> 4.1.6) - - Firebase/RemoteConfig (6.10.0): + - FirebaseMessaging (~> 4.3.0) + - Firebase/RemoteConfig (6.19.0): - Firebase/CoreOnly - - FirebaseRemoteConfig (~> 4.4.2) + - FirebaseRemoteConfig (~> 4.4.9) - firebase_messaging (0.0.1): - Firebase/Core - Firebase/Messaging @@ -28,46 +28,51 @@ PODS: - FirebaseAnalyticsInterop (~> 1.3) - FirebaseCore (~> 6.1) - Protobuf (>= 3.9.2, ~> 3.9) - - FirebaseAnalytics (6.1.3): - - FirebaseCore (~> 6.3) - - FirebaseInstanceID (~> 4.2) - - GoogleAppMeasurement (= 6.1.3) + - FirebaseAnalytics (6.3.1): + - FirebaseCore (~> 6.6) + - FirebaseInstallations (~> 1.1) + - GoogleAppMeasurement (= 6.3.1) - GoogleUtilities/AppDelegateSwizzler (~> 6.0) - GoogleUtilities/MethodSwizzler (~> 6.0) - GoogleUtilities/Network (~> 6.0) - "GoogleUtilities/NSData+zlib (~> 6.0)" + - nanopb (= 0.3.9011) + - FirebaseAnalyticsInterop (1.5.0) + - FirebaseCore (6.6.4): + - FirebaseCoreDiagnostics (~> 1.2) + - FirebaseCoreDiagnosticsInterop (~> 1.2) + - GoogleUtilities/Environment (~> 6.5) + - GoogleUtilities/Logger (~> 6.5) + - FirebaseCoreDiagnostics (1.2.2): + - FirebaseCoreDiagnosticsInterop (~> 1.2) + - GoogleDataTransportCCTSupport (~> 2.0) + - GoogleUtilities/Environment (~> 6.5) + - GoogleUtilities/Logger (~> 6.5) - nanopb (~> 0.3.901) - - FirebaseAnalyticsInterop (1.4.0) - - FirebaseCore (6.3.1): - - FirebaseCoreDiagnostics (~> 1.0) - - FirebaseCoreDiagnosticsInterop (~> 1.0) - - GoogleUtilities/Environment (~> 6.2) - - GoogleUtilities/Logger (~> 6.2) - - FirebaseCoreDiagnostics (1.1.1): - - FirebaseCoreDiagnosticsInterop (~> 1.0) - - GoogleDataTransportCCTSupport (~> 1.0) - - GoogleUtilities/Environment (~> 6.2) - - GoogleUtilities/Logger (~> 6.2) - - nanopb (~> 0.3.901) - - FirebaseCoreDiagnosticsInterop (1.0.0) - - FirebaseInstanceID (4.2.5): - - FirebaseCore (~> 6.0) - - GoogleUtilities/Environment (~> 6.0) - - GoogleUtilities/UserDefaults (~> 6.0) - - FirebaseMessaging (4.1.6): - - FirebaseAnalyticsInterop (~> 1.3) - - FirebaseCore (~> 6.2) - - FirebaseInstanceID (~> 4.1) - - GoogleUtilities/AppDelegateSwizzler (~> 6.2) - - GoogleUtilities/Environment (~> 6.2) - - GoogleUtilities/Reachability (~> 6.2) - - GoogleUtilities/UserDefaults (~> 6.2) + - FirebaseCoreDiagnosticsInterop (1.2.0) + - FirebaseInstallations (1.1.0): + - FirebaseCore (~> 6.6) + - GoogleUtilities/UserDefaults (~> 6.5) + - PromisesObjC (~> 1.2) + - FirebaseInstanceID (4.3.2): + - FirebaseCore (~> 6.6) + - FirebaseInstallations (~> 1.0) + - GoogleUtilities/Environment (~> 6.5) + - GoogleUtilities/UserDefaults (~> 6.5) + - FirebaseMessaging (4.3.1): + - FirebaseAnalyticsInterop (~> 1.5) + - FirebaseCore (~> 6.6) + - FirebaseInstanceID (~> 4.3) + - GoogleUtilities/AppDelegateSwizzler (~> 6.5) + - GoogleUtilities/Environment (~> 6.5) + - GoogleUtilities/Reachability (~> 6.5) + - GoogleUtilities/UserDefaults (~> 6.5) - Protobuf (>= 3.9.2, ~> 3.9) - - FirebaseRemoteConfig (4.4.9): + - FirebaseRemoteConfig (4.4.11): - FirebaseABTesting (~> 3.1) - FirebaseAnalyticsInterop (~> 1.4) - FirebaseCore (~> 6.2) - - FirebaseInstanceID (~> 4.2) + - FirebaseInstallations (~> 1.1) - GoogleUtilities/Environment (~> 6.2) - "GoogleUtilities/NSData+zlib (~> 6.2)" - Protobuf (>= 3.9.2, ~> 3.9) @@ -75,54 +80,40 @@ PODS: - FMDB (2.7.5): - FMDB/standard (= 2.7.5) - FMDB/standard (2.7.5) - - "geolocator (5.3.2+2)": - - Flutter - - google_api_availability (2.0.4): - - Flutter - - google_maps_flutter (0.0.1): - - Flutter - - GoogleMaps - - GoogleAppMeasurement (6.1.3): + - GoogleAppMeasurement (6.3.1): - GoogleUtilities/AppDelegateSwizzler (~> 6.0) - GoogleUtilities/MethodSwizzler (~> 6.0) - GoogleUtilities/Network (~> 6.0) - "GoogleUtilities/NSData+zlib (~> 6.0)" + - nanopb (= 0.3.9011) + - GoogleDataTransport (5.0.0) + - GoogleDataTransportCCTSupport (2.0.0): + - GoogleDataTransport (~> 5.0) - nanopb (~> 0.3.901) - - GoogleDataTransport (3.0.1) - - GoogleDataTransportCCTSupport (1.2.1): - - GoogleDataTransport (~> 3.0) - - nanopb (~> 0.3.901) - - GoogleMaps (2.7.0): - - GoogleMaps/Maps (= 2.7.0) - - GoogleMaps/Base (2.7.0) - - GoogleMaps/Maps (2.7.0): - - GoogleMaps/Base - - GoogleUtilities/AppDelegateSwizzler (6.3.1): + - GoogleUtilities/AppDelegateSwizzler (6.5.1): - GoogleUtilities/Environment - GoogleUtilities/Logger - GoogleUtilities/Network - - GoogleUtilities/Environment (6.3.1) - - GoogleUtilities/Logger (6.3.1): + - GoogleUtilities/Environment (6.5.1) + - GoogleUtilities/Logger (6.5.1): - GoogleUtilities/Environment - - GoogleUtilities/MethodSwizzler (6.3.1): + - GoogleUtilities/MethodSwizzler (6.5.1): - GoogleUtilities/Logger - - GoogleUtilities/Network (6.3.1): + - GoogleUtilities/Network (6.5.1): - GoogleUtilities/Logger - "GoogleUtilities/NSData+zlib" - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (6.3.1)" - - GoogleUtilities/Reachability (6.3.1): + - "GoogleUtilities/NSData+zlib (6.5.1)" + - GoogleUtilities/Reachability (6.5.1): - GoogleUtilities/Logger - - GoogleUtilities/UserDefaults (6.3.1): + - GoogleUtilities/UserDefaults (6.5.1): - GoogleUtilities/Logger - - "location_permissions (3.0.0+1)": - - Flutter - MTBBarcodeScanner (5.0.11) - - nanopb (0.3.901): - - nanopb/decode (= 0.3.901) - - nanopb/encode (= 0.3.901) - - nanopb/decode (0.3.901) - - nanopb/encode (0.3.901) + - nanopb (0.3.9011): + - nanopb/decode (= 0.3.9011) + - nanopb/encode (= 0.3.9011) + - nanopb/decode (0.3.9011) + - nanopb/encode (0.3.9011) - package_info (0.0.1): - Flutter - path_provider (0.0.1): @@ -133,7 +124,8 @@ PODS: - Flutter - path_provider_windows (0.0.1): - Flutter - - Protobuf (3.10.0) + - PromisesObjC (1.2.10) + - Protobuf (3.13.0) - qr_code_scanner (0.0.2): - Flutter - MTBBarcodeScanner @@ -173,10 +165,6 @@ DEPENDENCIES: - firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`) - firebase_remote_config (from `.symlinks/plugins/firebase_remote_config/ios`) - Flutter (from `Flutter`) - - geolocator (from `.symlinks/plugins/geolocator/ios`) - - google_api_availability (from `.symlinks/plugins/google_api_availability/ios`) - - google_maps_flutter (from `.symlinks/plugins/google_maps_flutter/ios`) - - location_permissions (from `.symlinks/plugins/location_permissions/ios`) - package_info (from `.symlinks/plugins/package_info/ios`) - path_provider (from `.symlinks/plugins/path_provider/ios`) - path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`) @@ -206,6 +194,7 @@ SPEC REPOS: - FirebaseCore - FirebaseCoreDiagnostics - FirebaseCoreDiagnosticsInterop + - FirebaseInstallations - FirebaseInstanceID - FirebaseMessaging - FirebaseRemoteConfig @@ -213,10 +202,10 @@ SPEC REPOS: - GoogleAppMeasurement - GoogleDataTransport - GoogleDataTransportCCTSupport - - GoogleMaps - GoogleUtilities - MTBBarcodeScanner - nanopb + - PromisesObjC - Protobuf - Reachability @@ -233,14 +222,6 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/firebase_remote_config/ios" Flutter: :path: Flutter - geolocator: - :path: ".symlinks/plugins/geolocator/ios" - google_api_availability: - :path: ".symlinks/plugins/google_api_availability/ios" - google_maps_flutter: - :path: ".symlinks/plugins/google_maps_flutter/ios" - location_permissions: - :path: ".symlinks/plugins/location_permissions/ios" package_info: :path: ".symlinks/plugins/package_info/ios" path_provider: @@ -284,37 +265,34 @@ SPEC CHECKSUMS: connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467 connectivity_for_web: 2b8584556930d4bd490d82b836bcf45067ce345b connectivity_macos: e2e9731b6b22dda39eb1b128f6969d574460e191 - Firebase: 5e6b7b12bf9adb90986688edc06b156c37e109cd + Firebase: d55ddb0e0bb3207166cddc028647833d8a1b5b6f firebase_messaging: 21344b3b3a7d9d325d63a70e3750c0c798fe1e03 firebase_remote_config: 7297b33f88ca82beacff00cc60cc1230bd9fc4c5 FirebaseABTesting: 821a3a3e4a145987e80fee3657c4de1cb9adf693 - FirebaseAnalytics: 0e3ecff2c5d86070f7d4325e21f1edabfbd558dc - FirebaseAnalyticsInterop: d48b6ab67bcf016a05e55b71fc39c61c0cb6b7f3 - FirebaseCore: 064c2dd92a8ca5974bbdcb080df9921e46bd34cd - FirebaseCoreDiagnostics: af29e43048607588c050889d19204f4d7b758c9f - FirebaseCoreDiagnosticsInterop: 6829da2b8d1fc795ff1bd99df751d3788035d2cb - FirebaseInstanceID: 550df9be1f99f751d8fcde3ac342a1e21a0e6c42 - FirebaseMessaging: 35edef69a6af9b34e9e44624089f054be3c09089 - FirebaseRemoteConfig: 47abf7a04a9082091955ea555aa79cfdd249b19c + FirebaseAnalytics: 572e467f3d977825266e8ccd52674aa3e6f47eac + FirebaseAnalyticsInterop: 3f86269c38ae41f47afeb43ebf32a001f58fcdae + FirebaseCore: ed0a24c758a57c2b88c5efa8e6a8195e868af589 + FirebaseCoreDiagnostics: e9b4cd8ba60dee0f2d13347332e4b7898cca5b61 + FirebaseCoreDiagnosticsInterop: 296e2c5f5314500a850ad0b83e9e7c10b011a850 + FirebaseInstallations: 575cd32f2aec0feeb0e44f5d0110a09e5e60b47b + FirebaseInstanceID: 7ee0d6777013bb952f377b41965bf132b6a075be + FirebaseMessaging: 828e66eb357a893e3cebd9ee0f6bc1941447cc94 + FirebaseRemoteConfig: 3d189cf0c3c5abc0c924ef1cce60c4add8d3262c Flutter: 0e3d915762c693b495b44d77113d4970485de6ec FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a - geolocator: f7622e0e7e2a24718285b73916d60c4a54b9f5b6 - google_api_availability: 15fa42a8cd83c0a6738507ffe6e87096f12abcb8 - google_maps_flutter: 78a52114c898b42ea647919679a4c58b70abe876 - GoogleAppMeasurement: 434cc7be25e71dc04b8d0e3079125127b330e84a - GoogleDataTransport: 166f9b9f82cbf60a204e8fe2daa9db3e3ec1fb15 - GoogleDataTransportCCTSupport: f6ab1962e9dc05ab1fb938b795e5b310209edeec - GoogleMaps: f79af95cb24d869457b1f961c93d3ce8b2f3b848 - GoogleUtilities: f895fde57977df4e0233edda0dbeac490e3703b6 - location_permissions: 7e0f9aa0f60deb8ff93ddf0e2a164c7e8197bc94 + GoogleAppMeasurement: c29d405ff76e18551b5d158eaba6753fda8c7542 + GoogleDataTransport: a857c6a002d201b524dd4bc2ed7e7355ed07e785 + GoogleDataTransportCCTSupport: 32f75fbe904c82772fcbb6b6bd4525bfb6f2a862 + GoogleUtilities: 06eb53bb579efe7099152735900dd04bf09e7275 MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb - nanopb: 2901f78ea1b7b4015c860c2fdd1ea2fee1a18d48 + nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4 path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0 path_provider_windows: a2b81600c677ac1959367280991971cb9a1edb3b - Protobuf: a4dc852ad69c027ca2166ed287b856697814375b + PromisesObjC: b14b1c6b68e306650688599de8a45e49fae81151 + Protobuf: 3dac39b34a08151c6d949560efe3f86134a3f748 qr_code_scanner: 16107718bdad7d708cdf6a5eacdca24b56cdf471 Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 share: 0b2c3e82132f5888bccca3351c504d0003b3b410 @@ -333,4 +311,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 1b66dae606f75376c5f2135a8290850eeb09ae83 -COCOAPODS: 1.9.1 +COCOAPODS: 1.10.0 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 3f53821..ce3e9f5 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -170,7 +170,6 @@ 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, AC26BFAD08ECEDF4E0CCABB7 /* [CP] Embed Pods Frameworks */, - 694B6B2073A9773F5B9B2150 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -246,21 +245,6 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - 694B6B2073A9773F5B9B2150 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 0299dbf..5d0becc 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -1,7 +1,6 @@ import UIKit import Flutter import CoreLocation -import GoogleMaps @UIApplicationMain @objc class AppDelegate: FlutterAppDelegate, CLLocationManagerDelegate { @@ -52,9 +51,6 @@ import GoogleMaps if #available(iOS 10.0, *) { UNUserNotificationCenter.current().delegate = self } - - // Google Maps - GMSServices.provideAPIKey("AIzaSyBQu2WwoTFKJQ1PM4w-hIRkLnEVDtWtFoo") GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) From 964f844f4525014a8f675973779f796efd720038 Mon Sep 17 00:00:00 2001 From: Pavan Welihinda Date: Wed, 23 Dec 2020 10:53:02 +0530 Subject: [PATCH 6/6] Removed unused location permissions from ios in #225 --- ios/Runner/AppDelegate.swift | 64 +----------------------------------- ios/Runner/Info.plist | 5 --- 2 files changed, 1 insertion(+), 68 deletions(-) diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 5d0becc..9014614 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -1,51 +1,13 @@ import UIKit import Flutter -import CoreLocation @UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate, CLLocationManagerDelegate { - let locationManager = CLLocationManager() - - var isSupportingLocationUpdates = false +@objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { - isSupportingLocationUpdates = CLLocationManager.significantLocationChangeMonitoringAvailable() - if (isSupportingLocationUpdates) { - locationManager.requestAlwaysAuthorization() - if #available(iOS 9.0, *) { - locationManager.allowsBackgroundLocationUpdates = true - } - locationManager.delegate = self - startLocationUpdate() - } - - let controller = window?.rootViewController as! FlutterViewController - let locationChannel = FlutterMethodChannel(name: "location", binaryMessenger: controller.binaryMessenger) - - locationChannel.setMethodCallHandler({ - [weak self] (call: FlutterMethodCall, result: FlutterResult) -> Void in - // Note: this method is invoked on the UI thread. - - if !(self?.isSupportingLocationUpdates ?? false) { - result(FlutterError(code: "Unavailable", - message: "Location is not available", - details: nil)) - return - } - - if call.method == "getLocation" { - result(self?.getLocation()) - } else if call.method == "startLocationUpdates" { - self?.startLocationUpdate() - } else if call.method == "stopLocationUpdates" { - self?.stopLocationUpdate() - } else { - result(FlutterMethodNotImplemented) - } - }) // Messaging if #available(iOS 10.0, *) { @@ -55,28 +17,4 @@ import CoreLocation GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } - - func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { - locations.forEach { (location) in - LocationsStorage.shared.saveLocationOnDisk(location: Location(location.coordinate, date: location.timestamp)) - } - } - - private func getLocation() -> [String] { - let encoder = JSONEncoder() - return LocationsStorage.shared.locations.map { (location) -> String in - guard let data = try? encoder.encode(location) else { - return "" - } - return String(data: data, encoding: .utf8)! - } - } - - private func startLocationUpdate() { - locationManager.startMonitoringSignificantLocationChanges() - } - - private func stopLocationUpdate() { - locationManager.stopMonitoringSignificantLocationChanges() - } } diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 7dcbb79..d2e0adb 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -26,11 +26,6 @@ NSCameraUsageDescription Myhealth camera permission for qr scanner - UIBackgroundModes - - location - remote-notification - UILaunchStoryboardName LaunchScreen UIMainStoryboardFile