Skip to content

Commit 182a141

Browse files
authored
Merge pull request #1257 from cph-cachet/health-13
Health 13.1.4
2 parents be4a50e + d52bf66 commit 182a141

File tree

9 files changed

+589
-465
lines changed

9 files changed

+589
-465
lines changed

packages/health/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 13.1.4
2+
3+
* Fix adding mindfulness resulted in crash in iOS
4+
* Support SPM for iOS
5+
16
## 13.1.3
27

38
* Fix permissions issues with iOS
@@ -24,6 +29,7 @@
2429
## 13.0.1
2530

2631
* Refactored Swift native implementation - See PR [#1175](https://github.com/cph-cachet/flutter-plugins/pull/1175) and [#1208](https://github.com/cph-cachet/flutter-plugins/pull/1208) for more information:
32+
2733
```
2834
SwiftHealthPlugin (Main Plugin Class)
2935
├── HealthDataReader (Reading health data)
@@ -54,10 +60,12 @@ SwiftHealthPlugin (Main Plugin Class)
5460
* iOS: Parse metadata to remove unsupported types - PR [#1120](https://github.com/cph-cachet/flutter-plugins/pull/1120)
5561
* iOS: Add UV Index Types
5662
* Android: Add request access to historic data [#1126](https://github.com/cph-cachet/flutter-plugins/issues/1126) - PR [#1127](https://github.com/cph-cachet/flutter-plugins/pull/1127)
63+
5764
```XML
5865
<!-- Add the following permission into AndroidManifest.xml -->
5966
<uses-permission android:name="android.permission.health.READ_HEALTH_DATA_HISTORY"/>
6067
```
68+
6169
* Android:
6270
* Update `androidx.compose:compose-bom` to `2025.02.00`
6371
* Update `androidx.health.connect:connect-client` to `1.1.0-alpha11`
@@ -85,10 +93,12 @@ SwiftHealthPlugin (Main Plugin Class)
8593
* Fix [#984](https://github.com/cph-cachet/flutter-plugins/issues/984) - PR [#1055](https://github.com/cph-cachet/flutter-plugins/pull/1055)
8694
* Add `LEAN_BODY_MASS` data type [#1078](https://github.com/cph-cachet/flutter-plugins/issues/1078) - PR [#1097](https://github.com/cph-cachet/flutter-plugins/pull/1097)
8795
* The following AndroidManifest values are required to READ/WRITE `LEAN_BODY_MASS`:
96+
8897
```XML
8998
<uses-permission android:name="android.permission.health.READ_LEAN_BODY_MASS"/>
9099
<uses-permission android:name="android.permission.health.WRITE_LEAN_BODY_MASS"/>
91100
```
101+
92102
* iOS: Add `WATER_TEMPERATURE` and `UNDERWATER_DEPTH` health values [#1096](https://github.com/cph-cachet/flutter-plugins/issues/1096)
93103
* iOS: Add support for `Underwater Diving` workout [#1096](https://github.com/cph-cachet/flutter-plugins/issues/1096)
94104
* Fix [#1072](https://github.com/cph-cachet/flutter-plugins/issues/1072) and [#1074](https://github.com/cph-cachet/flutter-plugins/issues/1074)

packages/health/example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>12.0</string>
24+
<string>13.0</string>
2525
</dict>
2626
</plist>

packages/health/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
ABEE568C2D6B9E4300551983 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
6969
F97011D03CBC7A35D177D127 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
7070
FCEA0A19EEB97E6889BA5240 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
71+
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
7172
/* End PBXFileReference section */
7273

7374
/* Begin PBXFrameworksBuildPhase section */
@@ -112,6 +113,7 @@
112113
9740EEB11CF90186004384FC /* Flutter */ = {
113114
isa = PBXGroup;
114115
children = (
116+
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */,
115117
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
116118
9740EEB21CF90195004384FC /* Debug.xcconfig */,
117119
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
@@ -249,6 +251,7 @@
249251
);
250252
mainGroup = 97C146E51CF9000F007C117D;
251253
packageReferences = (
254+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
252255
ABB05D852D6BB16700FA4740 /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */,
253256
);
254257
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
@@ -485,7 +488,7 @@
485488
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
486489
GCC_WARN_UNUSED_FUNCTION = YES;
487490
GCC_WARN_UNUSED_VARIABLE = YES;
488-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
491+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
489492
MTL_ENABLE_DEBUG_INFO = NO;
490493
SDKROOT = iphoneos;
491494
SUPPORTED_PLATFORMS = iphoneos;
@@ -616,7 +619,7 @@
616619
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
617620
GCC_WARN_UNUSED_FUNCTION = YES;
618621
GCC_WARN_UNUSED_VARIABLE = YES;
619-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
622+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
620623
MTL_ENABLE_DEBUG_INFO = YES;
621624
ONLY_ACTIVE_ARCH = YES;
622625
SDKROOT = iphoneos;
@@ -667,7 +670,7 @@
667670
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
668671
GCC_WARN_UNUSED_FUNCTION = YES;
669672
GCC_WARN_UNUSED_VARIABLE = YES;
670-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
673+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
671674
MTL_ENABLE_DEBUG_INFO = NO;
672675
SDKROOT = iphoneos;
673676
SUPPORTED_PLATFORMS = iphoneos;
@@ -765,6 +768,10 @@
765768
isa = XCLocalSwiftPackageReference;
766769
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
767770
};
771+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
772+
isa = XCLocalSwiftPackageReference;
773+
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
774+
};
768775
/* End XCLocalSwiftPackageReference section */
769776

770777
/* Begin XCSwiftPackageProductDependency section */

packages/health/example/lib/main.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,15 @@ class HealthAppState extends State<HealthApp> {
409409
type: HealthDataType.HEART_RATE_VARIABILITY_RMSSD,
410410
startTime: earlier,
411411
endTime: now);
412+
413+
// Mindfulness value should be counted based on start and end time
414+
success &= await health.writeHealthData(
415+
value: 10,
416+
type: HealthDataType.MINDFULNESS,
417+
startTime: earlier,
418+
endTime: now,
419+
recordingMethod: RecordingMethod.automatic,
420+
);
412421
}
413422

414423
// Available on iOS or iOS 16.0+ only

0 commit comments

Comments
 (0)