From 3c3e1108e288a3df9dff89814befa06b0c1cd448 Mon Sep 17 00:00:00 2001 From: Doan Date: Mon, 10 Oct 2022 22:38:30 +0700 Subject: [PATCH 1/8] [#101] Add permission wrapper --- .../utils/wrappers/permission_wrapper.dart | 61 +++++++++++++++++++ .template/pubspec.yaml | 6 ++ 2 files changed, 67 insertions(+) create mode 100644 .template/lib/utils/wrappers/permission_wrapper.dart diff --git a/.template/lib/utils/wrappers/permission_wrapper.dart b/.template/lib/utils/wrappers/permission_wrapper.dart new file mode 100644 index 00000000..9fb6dbcf --- /dev/null +++ b/.template/lib/utils/wrappers/permission_wrapper.dart @@ -0,0 +1,61 @@ +import 'package:injectable/injectable.dart'; +import 'package:permission_handler/permission_handler.dart' + as permission_handler; + +abstract class PermissionWrapper { + Future requestCameraPermission(); + + Future isCameraPermissionDenied(); + + Future isCameraPermissionPermanentlyDenied(); + + Future requestGalleryPermission(); + + Future isGalleryPermissionDenied(); + + Future isGalleryPermissionPermanentlyDenied(); + + Future openAppSettings(); +} + +@Singleton(as: PermissionWrapper) +class PermissionWrapperImpl extends PermissionWrapper { + @override + Future requestCameraPermission() { + return permission_handler.Permission.camera + .request() + .then((value) => value == permission_handler.PermissionStatus.granted); + } + + @override + Future isCameraPermissionDenied() { + return permission_handler.Permission.camera.isDenied; + } + + @override + Future isCameraPermissionPermanentlyDenied() { + return permission_handler.Permission.camera.isPermanentlyDenied; + } + + @override + Future isGalleryPermissionDenied() { + return permission_handler.Permission.photos.isDenied; + } + + @override + Future isGalleryPermissionPermanentlyDenied() { + return permission_handler.Permission.photos.isPermanentlyDenied; + } + + @override + Future requestGalleryPermission() { + return permission_handler.Permission.photos + .request() + .then((value) => value == permission_handler.PermissionStatus.granted); + } + + @override + Future openAppSettings() { + return permission_handler.openAppSettings(); + } +} diff --git a/.template/pubspec.yaml b/.template/pubspec.yaml index 0562d404..8b18e48c 100644 --- a/.template/pubspec.yaml +++ b/.template/pubspec.yaml @@ -33,7 +33,13 @@ dependencies: intl: ^0.17.0 json_annotation: ^4.5.0 package_info_plus: ^1.4.2 + permission_handler: ^8.3.0 retrofit: ^3.0.1+1 + get_it: ^7.2.0 + hive: ^2.2.3 + injectable: ^1.5.3 + rxdart: ^0.27.3 + shared_preferences: ^2.0.13 dev_dependencies: build_runner: ^2.1.11 From 120cc99762666fb9383a1b182ebbbb8279024f00 Mon Sep 17 00:00:00 2001 From: Doan Date: Mon, 10 Oct 2022 22:44:01 +0700 Subject: [PATCH 2/8] [#101] Remove unused permission --- .template/pubspec.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.template/pubspec.yaml b/.template/pubspec.yaml index 8b18e48c..e216a79f 100644 --- a/.template/pubspec.yaml +++ b/.template/pubspec.yaml @@ -35,11 +35,6 @@ dependencies: package_info_plus: ^1.4.2 permission_handler: ^8.3.0 retrofit: ^3.0.1+1 - get_it: ^7.2.0 - hive: ^2.2.3 - injectable: ^1.5.3 - rxdart: ^0.27.3 - shared_preferences: ^2.0.13 dev_dependencies: build_runner: ^2.1.11 From a73a36851f1f24cfdc3208bcf08de907f12a2705 Mon Sep 17 00:00:00 2001 From: Doan Dinh Date: Fri, 28 Oct 2022 14:56:59 +0700 Subject: [PATCH 3/8] [#101] Update pubspec.lock --- .template/pubspec.lock | 160 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 143 insertions(+), 17 deletions(-) diff --git a/.template/pubspec.lock b/.template/pubspec.lock index f3d3ff87..0885ae09 100644 --- a/.template/pubspec.lock +++ b/.template/pubspec.lock @@ -21,7 +21,7 @@ packages: name: archive url: "https://pub.dartlang.org" source: hosted - version: "3.1.11" + version: "3.3.0" args: dependency: transitive description: @@ -35,7 +35,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.9.0" boolean_selector: dependency: transitive description: @@ -105,7 +105,7 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" charcode: dependency: transitive description: @@ -126,7 +126,7 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" code_builder: dependency: transitive description: @@ -161,7 +161,7 @@ packages: name: crypto url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" + version: "3.0.2" cupertino_icons: dependency: "direct main" description: @@ -196,7 +196,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" ffi: dependency: transitive description: @@ -297,6 +297,13 @@ packages: description: flutter source: sdk version: "0.0.0" + get_it: + dependency: "direct main" + description: + name: get_it + url: "https://pub.dartlang.org" + source: hosted + version: "7.2.0" glob: dependency: transitive description: @@ -318,6 +325,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" + hive: + dependency: "direct main" + description: + name: hive + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.3" http: dependency: transitive description: @@ -339,6 +353,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.0.0" + injectable: + dependency: "direct main" + description: + name: injectable + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.3" integration_test: dependency: "direct dev" description: flutter @@ -399,21 +420,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.11" + version: "0.12.12" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0" mime: dependency: transitive description: @@ -483,7 +504,42 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.7" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.5" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.7" + permission_handler: + dependency: "direct main" + description: + name: permission_handler + url: "https://pub.dartlang.org" + source: hosted + version: "8.3.0" + permission_handler_platform_interface: + dependency: transitive + description: + name: permission_handler_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "3.9.0" petitparser: dependency: transitive description: @@ -554,6 +610,69 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.0.1" + rxdart: + dependency: "direct main" + description: + name: rxdart + url: "https://pub.dartlang.org" + source: hosted + version: "0.27.5" + shared_preferences: + dependency: "direct main" + description: + name: shared_preferences + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.15" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.13" + shared_preferences_ios: + dependency: transitive + description: + name: shared_preferences_ios + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + shared_preferences_macos: + dependency: transitive + description: + name: shared_preferences_macos + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.4" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.4" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" shelf: dependency: transitive description: @@ -593,7 +712,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.2" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -621,28 +740,28 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" sync_http: dependency: transitive description: name: sync_http url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.3.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.9" + version: "0.4.12" time: dependency: transitive description: @@ -670,7 +789,7 @@ packages: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" vector_math: dependency: transitive description: @@ -684,7 +803,7 @@ packages: name: vm_service url: "https://pub.dartlang.org" source: hosted - version: "8.2.2" + version: "9.0.0" watcher: dependency: transitive description: @@ -713,6 +832,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.4.1" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0+2" xml: dependency: transitive description: From b793bfc2204c9b906f5f7640b8bc8a5ac7cacf72 Mon Sep 17 00:00:00 2001 From: Doan Dinh Date: Fri, 28 Oct 2022 14:59:28 +0700 Subject: [PATCH 4/8] [#101] Use Camera permission as sample --- .../utils/wrappers/permission_wrapper.dart | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/.template/lib/utils/wrappers/permission_wrapper.dart b/.template/lib/utils/wrappers/permission_wrapper.dart index 9fb6dbcf..e46a7515 100644 --- a/.template/lib/utils/wrappers/permission_wrapper.dart +++ b/.template/lib/utils/wrappers/permission_wrapper.dart @@ -8,14 +8,6 @@ abstract class PermissionWrapper { Future isCameraPermissionDenied(); Future isCameraPermissionPermanentlyDenied(); - - Future requestGalleryPermission(); - - Future isGalleryPermissionDenied(); - - Future isGalleryPermissionPermanentlyDenied(); - - Future openAppSettings(); } @Singleton(as: PermissionWrapper) @@ -36,26 +28,4 @@ class PermissionWrapperImpl extends PermissionWrapper { Future isCameraPermissionPermanentlyDenied() { return permission_handler.Permission.camera.isPermanentlyDenied; } - - @override - Future isGalleryPermissionDenied() { - return permission_handler.Permission.photos.isDenied; - } - - @override - Future isGalleryPermissionPermanentlyDenied() { - return permission_handler.Permission.photos.isPermanentlyDenied; - } - - @override - Future requestGalleryPermission() { - return permission_handler.Permission.photos - .request() - .then((value) => value == permission_handler.PermissionStatus.granted); - } - - @override - Future openAppSettings() { - return permission_handler.openAppSettings(); - } } From a3f265d0aa15d34423a6756ac06afa77fc3ade9b Mon Sep 17 00:00:00 2001 From: Doan Dinh Date: Fri, 28 Oct 2022 15:06:16 +0700 Subject: [PATCH 5/8] [#101] Update Pod file --- .template/ios/Podfile | 54 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/.template/ios/Podfile b/.template/ios/Podfile index 9411102b..7a0a993d 100644 --- a/.template/ios/Podfile +++ b/.template/ios/Podfile @@ -37,5 +37,59 @@ end post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) + target.build_configurations.each do |config| + # You can enable the permissions needed here. For example to enable camera + # permission, just remove the `#` character in front so it looks like this: + # + # ## dart: PermissionGroup.camera + 'PERMISSION_CAMERA=1' + # + # Preprocessor definitions can be found in: https://github.com/Baseflow/flutter-permission-handler/blob/master/permission_handler/ios/Classes/PermissionHandlerEnums.h + config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ + '$(inherited)', + + ## dart: PermissionGroup.calendar + # 'PERMISSION_EVENTS=1', + + ## dart: PermissionGroup.reminders + # 'PERMISSION_REMINDERS=1', + + ## dart: PermissionGroup.contacts + # 'PERMISSION_CONTACTS=1', + + ## dart: PermissionGroup.camera + 'PERMISSION_CAMERA=1', + + ## dart: PermissionGroup.microphone + # 'PERMISSION_MICROPHONE=1', + + ## dart: PermissionGroup.speech + # 'PERMISSION_SPEECH_RECOGNIZER=1', + + ## dart: PermissionGroup.photos + 'PERMISSION_PHOTOS=1', + + ## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse] + 'PERMISSION_LOCATION=1', + + ## dart: PermissionGroup.notification + # 'PERMISSION_NOTIFICATIONS=1', + + ## dart: PermissionGroup.mediaLibrary + # 'PERMISSION_MEDIA_LIBRARY=1', + + ## dart: PermissionGroup.sensors + # 'PERMISSION_SENSORS=1', + + ## dart: PermissionGroup.bluetooth + # 'PERMISSION_BLUETOOTH=1', + + ## dart: PermissionGroup.appTrackingTransparency + # 'PERMISSION_APP_TRACKING_TRANSPARENCY=1', + + ## dart: PermissionGroup.criticalAlerts + # 'PERMISSION_CRITICAL_ALERTS=1' + ] + end end end From aba9914709765a0d85ee79d9fccf7c055735622a Mon Sep 17 00:00:00 2001 From: "doan@nimblehq.co" Date: Fri, 28 Oct 2022 15:39:19 +0700 Subject: [PATCH 6/8] [#101] Update Podfile.lock --- .template/ios/Podfile.lock | 10 +++- .template/pubspec.lock | 112 ------------------------------------- 2 files changed, 8 insertions(+), 114 deletions(-) diff --git a/.template/ios/Podfile.lock b/.template/ios/Podfile.lock index 21cd2dc7..60a217a4 100644 --- a/.template/ios/Podfile.lock +++ b/.template/ios/Podfile.lock @@ -6,12 +6,15 @@ PODS: - Flutter - package_info_plus (0.4.5): - Flutter + - "permission_handler (5.1.0+2)": + - Flutter DEPENDENCIES: - Flutter (from `Flutter`) - flutter_config (from `.symlinks/plugins/flutter_config/ios`) - integration_test (from `.symlinks/plugins/integration_test/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) + - permission_handler (from `.symlinks/plugins/permission_handler/ios`) EXTERNAL SOURCES: Flutter: @@ -22,13 +25,16 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/integration_test/ios" package_info_plus: :path: ".symlinks/plugins/package_info_plus/ios" + permission_handler: + :path: ".symlinks/plugins/permission_handler/ios" SPEC CHECKSUMS: - Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a + Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 flutter_config: 2226c1df19c78fe34a05eb7f1363445f18e76fc1 integration_test: a1e7d09bd98eca2fc37aefd79d4f41ad37bdbbe5 package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e + permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0 -PODFILE CHECKSUM: a75497545d4391e2d394c3668e20cfb1c2bbd4aa +PODFILE CHECKSUM: de482529810d31c8802b6be0fd93c8c3e038be64 COCOAPODS: 1.11.3 diff --git a/.template/pubspec.lock b/.template/pubspec.lock index 0885ae09..ee95efc1 100644 --- a/.template/pubspec.lock +++ b/.template/pubspec.lock @@ -297,13 +297,6 @@ packages: description: flutter source: sdk version: "0.0.0" - get_it: - dependency: "direct main" - description: - name: get_it - url: "https://pub.dartlang.org" - source: hosted - version: "7.2.0" glob: dependency: transitive description: @@ -325,13 +318,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" - hive: - dependency: "direct main" - description: - name: hive - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.3" http: dependency: transitive description: @@ -353,13 +339,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.0.0" - injectable: - dependency: "direct main" - description: - name: injectable - url: "https://pub.dartlang.org" - source: hosted - version: "1.5.3" integration_test: dependency: "direct dev" description: flutter @@ -505,27 +484,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.2" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.7" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.7" permission_handler: dependency: "direct main" description: @@ -610,69 +568,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.0.1" - rxdart: - dependency: "direct main" - description: - name: rxdart - url: "https://pub.dartlang.org" - source: hosted - version: "0.27.5" - shared_preferences: - dependency: "direct main" - description: - name: shared_preferences - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.15" - shared_preferences_android: - dependency: transitive - description: - name: shared_preferences_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.13" - shared_preferences_ios: - dependency: transitive - description: - name: shared_preferences_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - shared_preferences_macos: - dependency: transitive - description: - name: shared_preferences_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" shelf: dependency: transitive description: @@ -832,13 +727,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.4.1" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0+2" xml: dependency: transitive description: From 07f80d411daee7abeef6c1f9a0eb19efd20f48d3 Mon Sep 17 00:00:00 2001 From: "doan@nimblehq.co" Date: Mon, 31 Oct 2022 15:43:28 +0700 Subject: [PATCH 7/8] [#101] Hide PERMISSION_CAMERA as we don't need to enable it now --- .template/ios/Podfile | 110 +++++++++++++++++++++--------------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/.template/ios/Podfile b/.template/ios/Podfile index 7a0a993d..c829aff3 100644 --- a/.template/ios/Podfile +++ b/.template/ios/Podfile @@ -15,7 +15,7 @@ def flutter_root unless File.exist?(generated_xcode_build_settings_path) raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" end - + File.foreach(generated_xcode_build_settings_path) do |line| matches = line.match(/FLUTTER_ROOT\=(.*)/) return matches[1].strip if matches @@ -30,7 +30,7 @@ flutter_ios_podfile_setup target 'Runner' do use_frameworks! use_modular_headers! - + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) end @@ -38,58 +38,58 @@ post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) target.build_configurations.each do |config| - # You can enable the permissions needed here. For example to enable camera - # permission, just remove the `#` character in front so it looks like this: - # - # ## dart: PermissionGroup.camera - 'PERMISSION_CAMERA=1' - # - # Preprocessor definitions can be found in: https://github.com/Baseflow/flutter-permission-handler/blob/master/permission_handler/ios/Classes/PermissionHandlerEnums.h - config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ - '$(inherited)', - - ## dart: PermissionGroup.calendar - # 'PERMISSION_EVENTS=1', - - ## dart: PermissionGroup.reminders - # 'PERMISSION_REMINDERS=1', - - ## dart: PermissionGroup.contacts - # 'PERMISSION_CONTACTS=1', - - ## dart: PermissionGroup.camera - 'PERMISSION_CAMERA=1', - - ## dart: PermissionGroup.microphone - # 'PERMISSION_MICROPHONE=1', - - ## dart: PermissionGroup.speech - # 'PERMISSION_SPEECH_RECOGNIZER=1', - - ## dart: PermissionGroup.photos - 'PERMISSION_PHOTOS=1', - - ## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse] - 'PERMISSION_LOCATION=1', - - ## dart: PermissionGroup.notification - # 'PERMISSION_NOTIFICATIONS=1', - - ## dart: PermissionGroup.mediaLibrary - # 'PERMISSION_MEDIA_LIBRARY=1', - - ## dart: PermissionGroup.sensors - # 'PERMISSION_SENSORS=1', - - ## dart: PermissionGroup.bluetooth - # 'PERMISSION_BLUETOOTH=1', - - ## dart: PermissionGroup.appTrackingTransparency - # 'PERMISSION_APP_TRACKING_TRANSPARENCY=1', - - ## dart: PermissionGroup.criticalAlerts - # 'PERMISSION_CRITICAL_ALERTS=1' - ] - end + # TODO You can enable the permissions needed here. + # permission, just remove the `#` character in front so it looks like this: + # + # ## dart: PermissionGroup.camera + #'PERMISSION_CAMERA=1' + # + # Preprocessor definitions can be found in: https://github.com/Baseflow/flutter-permission-handler/blob/master/permission_handler/ios/Classes/PermissionHandlerEnums.h + config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ + '$(inherited)', + + ## dart: PermissionGroup.calendar + # 'PERMISSION_EVENTS=1', + + ## dart: PermissionGroup.reminders + # 'PERMISSION_REMINDERS=1', + + ## dart: PermissionGroup.contacts + # 'PERMISSION_CONTACTS=1', + + ## dart: PermissionGroup.camera + 'PERMISSION_CAMERA=1', + + ## dart: PermissionGroup.microphone + # 'PERMISSION_MICROPHONE=1', + + ## dart: PermissionGroup.speech + # 'PERMISSION_SPEECH_RECOGNIZER=1', + + ## dart: PermissionGroup.photos + 'PERMISSION_PHOTOS=1', + + ## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse] + 'PERMISSION_LOCATION=1', + + ## dart: PermissionGroup.notification + # 'PERMISSION_NOTIFICATIONS=1', + + ## dart: PermissionGroup.mediaLibrary + # 'PERMISSION_MEDIA_LIBRARY=1', + + ## dart: PermissionGroup.sensors + # 'PERMISSION_SENSORS=1', + + ## dart: PermissionGroup.bluetooth + # 'PERMISSION_BLUETOOTH=1', + + ## dart: PermissionGroup.appTrackingTransparency + # 'PERMISSION_APP_TRACKING_TRANSPARENCY=1', + + ## dart: PermissionGroup.criticalAlerts + # 'PERMISSION_CRITICAL_ALERTS=1' + ] + end end end From 05c58775a074d8765ce6de593b01abe21684d13f Mon Sep 17 00:00:00 2001 From: "doan@nimblehq.co" Date: Wed, 28 Dec 2022 11:25:44 +0700 Subject: [PATCH 8/8] [#101] Turn of permission at the template level --- .template/ios/Podfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.template/ios/Podfile b/.template/ios/Podfile index c829aff3..b0f87ea9 100644 --- a/.template/ios/Podfile +++ b/.template/ios/Podfile @@ -58,7 +58,7 @@ post_install do |installer| # 'PERMISSION_CONTACTS=1', ## dart: PermissionGroup.camera - 'PERMISSION_CAMERA=1', + # 'PERMISSION_CAMERA=1', ## dart: PermissionGroup.microphone # 'PERMISSION_MICROPHONE=1', @@ -67,10 +67,10 @@ post_install do |installer| # 'PERMISSION_SPEECH_RECOGNIZER=1', ## dart: PermissionGroup.photos - 'PERMISSION_PHOTOS=1', + # 'PERMISSION_PHOTOS=1', ## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse] - 'PERMISSION_LOCATION=1', + # 'PERMISSION_LOCATION=1', ## dart: PermissionGroup.notification # 'PERMISSION_NOTIFICATIONS=1',