We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent efe4dd4 commit 036f035Copy full SHA for 036f035
packages/health/lib/src/health_factory.dart
@@ -83,8 +83,16 @@ class HealthFactory {
83
///
84
/// Not implemented on iOS as there is no way to programmatically remove access.
85
Future<void> revokePermissions() async {
86
- await _channel.invokeMethod('revokePermissions');
87
- return;
+ try {
+ if (_platformType == PlatformType.IOS) {
88
+ throw UnsupportedError(
89
+ 'Revoke permissions is not supported on iOS. Please revoke permissions manually in the settings.');
90
+ }
91
+ await _channel.invokeMethod('revokePermissions');
92
+ return;
93
+ } catch (e) {
94
+ print(e);
95
96
}
97
98
/// Requests permissions to access data types in Apple Health or Google Fit.
0 commit comments