-
Notifications
You must be signed in to change notification settings - Fork 72
New datatypes in v1.1.1 have broken compatibility w/ older versions of iOS #36
Comments
I got the exact same error. HKQuantityTypeIdentifier' has no member 'appleStandTime', on the Extensions.swift file |
Also android raises error with the same comment. |
Same here. PlatformException(FitKit, type stand_time is not supported, null) - on Android device. Any idea? |
@janosdupai In the example folder it has this line,
It doesn't work on Android because Standtime is not supported. The README.md shows the supported types. DataType.values is a List of all the possible values which includes the ones supported in iOS. The way to go about this, is to declare a new list and then pass in these values instead for Android.
|
Starting from version 1.1.2 it's advised to wrap all read methods inside try catch as void read() async {
try {
final results = await FitKit.read(
DataType.HEART_RATE,
dateFrom: DateTime.now().subtract(Duration(days: 5)),
dateTo: DateTime.now(),
);
} on UnsupportedException catch (e) {
// thrown in case e.dataType is unsupported
}
}
|
The addition of "STAND_TIME" appears to have made this package incompatible with iOS 12.4 (presumably other older iOS versions also).
FitKit.requestPermissions(DataType.values) always throws the following error:
PlatformException(FitKit, Error type "stand time" is not supported, null)
Removing "STAND_TIME" from fit_kit.dart solves the problem.
Oddly, "EXERCISE_TIME" doesn't generate an error.
The text was updated successfully, but these errors were encountered: