I had used the health package in flutter for steps and running data in android the google fit and physical activity permission are set perfectly but in iOS, it is not asking for health kit permission all other permissions are working perfectly fine here is the code which I had written for permission request
Future<void> requestActivityPermission() async {
if (Platform.isAndroid) {
final permissionStatus = await Permission.activityRecognition.request();
if (permissionStatus.isDenied || permissionStatus.isPermanentlyDenied) {
_activityPermanenetlyDeniedCase();
return;
} else {
permissionStatus.isGranted;
fetchTotalStepData();
}
} else {
final permissionStatus = await Permission.activityRecognition.request();
if (permissionStatus.isDenied || permissionStatus.isPermanentlyDenied) {
_activityPermanenetlyDeniedCase();
return;
} else {
permissionStatus.isGranted;
fetchTotalStepData();
}
}
}
The requestActivityPermission function is called in the initState Method.
The _activityPermanenetlyDeniedCase function directly opens up, in that function i had a dialog box showing open setting, but in the setting there is no healthkit permission.
I am expecting a popup permission for healthKit