Skip to content

Commit 8aac3da

Browse files
committed
Add workaround for swift package manager for the health package
1 parent 23a792f commit 8aac3da

11 files changed

Lines changed: 25 additions & 34 deletions

File tree

ios/Flutter/Debug.xcconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
21
#include "Generated.xcconfig"

ios/Flutter/Release.xcconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
21
#include "Generated.xcconfig"

ios/Runner.xcodeproj/project.pbxproj

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
9740EEB11CF90186004384FC /* Flutter */,
7878
97C146F01CF9000F007C117D /* Runner */,
7979
97C146EF1CF9000F007C117D /* Products */,
80-
BB0286322FD60C00014F981C /* Pods */,
8180
);
8281
sourceTree = "<group>";
8382
};
@@ -105,13 +104,6 @@
105104
path = Runner;
106105
sourceTree = "<group>";
107106
};
108-
BB0286322FD60C00014F981C /* Pods */ = {
109-
isa = PBXGroup;
110-
children = (
111-
);
112-
path = Pods;
113-
sourceTree = "<group>";
114-
};
115107
/* End PBXGroup section */
116108

117109
/* Begin PBXNativeTarget section */
@@ -295,7 +287,7 @@
295287
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
296288
GCC_WARN_UNUSED_FUNCTION = YES;
297289
GCC_WARN_UNUSED_VARIABLE = YES;
298-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
290+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
299291
MTL_ENABLE_DEBUG_INFO = NO;
300292
SDKROOT = iphoneos;
301293
SUPPORTED_PLATFORMS = iphoneos;
@@ -383,7 +375,7 @@
383375
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
384376
GCC_WARN_UNUSED_FUNCTION = YES;
385377
GCC_WARN_UNUSED_VARIABLE = YES;
386-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
378+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
387379
MTL_ENABLE_DEBUG_INFO = YES;
388380
ONLY_ACTIVE_ARCH = YES;
389381
SDKROOT = iphoneos;
@@ -432,7 +424,7 @@
432424
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
433425
GCC_WARN_UNUSED_FUNCTION = YES;
434426
GCC_WARN_UNUSED_VARIABLE = YES;
435-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
427+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
436428
MTL_ENABLE_DEBUG_INFO = NO;
437429
SDKROOT = iphoneos;
438430
SUPPORTED_PLATFORMS = iphoneos;

lib/features/health/models/health_metric.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

19-
import 'package:health/health.dart';
19+
import 'package:health_bridge/health.dart';
2020
import 'package:wger/features/measurements/models/measurement_category.dart';
2121

2222
/// A body metric that can be imported from Apple Health / Health Connect into a

lib/features/health/models/health_reading.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

19-
import 'package:health/health.dart';
19+
import 'package:health_bridge/health.dart';
2020

2121
/// A single reading pulled from a health platform, reduced to the fields the
2222
/// importer needs. Keeps the `health` package's [HealthDataPoint] out of the

lib/features/health/providers/health_repository.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import 'dart:io';
2020

2121
import 'package:flutter_riverpod/flutter_riverpod.dart';
22-
import 'package:health/health.dart';
22+
import 'package:health_bridge/health.dart';
2323
import 'package:logging/logging.dart';
2424
import 'package:wger/features/health/models/health_reading.dart';
2525

lib/features/health/providers/health_sync.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818

1919
import 'package:collection/collection.dart';
20-
import 'package:health/health.dart';
20+
import 'package:health_bridge/health.dart';
2121
import 'package:logging/logging.dart';
2222
import 'package:powersync/powersync.dart' as ps;
2323
import 'package:riverpod_annotation/riverpod_annotation.dart';

pubspec.lock

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,6 @@ packages:
193193
url: "https://pub.dev"
194194
source: hosted
195195
version: "5.1.2"
196-
carp_serializable:
197-
dependency: transitive
198-
description:
199-
name: carp_serializable
200-
sha256: f039f8ea22e9437aef13fe7e9743c3761c76d401288dcb702eadd273c3e4dcef
201-
url: "https://pub.dev"
202-
source: hosted
203-
version: "2.0.1"
204196
change:
205197
dependency: transitive
206198
description:
@@ -743,14 +735,15 @@ packages:
743735
url: "https://pub.dev"
744736
source: hosted
745737
version: "2.2.0"
746-
health:
738+
health_bridge:
747739
dependency: "direct main"
748740
description:
749-
name: health
750-
sha256: "2d9e119f3a1d281139f93149b41032b9f80b759960875bc784c5a25dd3c17524"
751-
url: "https://pub.dev"
752-
source: hosted
753-
version: "13.3.1"
741+
path: "."
742+
ref: "51a567db9a97ccb15a9c1138aa4bcbdaf3d6c7b1"
743+
resolved-ref: "51a567db9a97ccb15a9c1138aa4bcbdaf3d6c7b1"
744+
url: "https://github.com/ytsni/health_bridge.git"
745+
source: git
746+
version: "1.0.0"
754747
hooks:
755748
dependency: transitive
756749
description:

pubspec.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,15 @@ dependencies:
5151
flutter_zxing: ^2.3.0
5252
font_awesome_flutter: ^11.0.0
5353
freezed_annotation: ^3.1.0
54-
health: ^13.3.1
54+
# Temporarily swap `health` with a fork with Swift Package Manager support.
55+
# Once that is available on upstream (see e.g. https://github.com/carp-dk/carp-health-flutter/issues/480 )
56+
# we can switch back. Note that if this doesn't happen in the near future we
57+
# can just re-activate the cocoapods infrastructure.
58+
# health: ^13.3.1
59+
health_bridge:
60+
git:
61+
url: https://github.com/ytsni/health_bridge.git
62+
ref: 51a567db9a97ccb15a9c1138aa4bcbdaf3d6c7b1
5563
http: ^1.6.0
5664
image_picker: ^1.2.2
5765
intl: ^0.20.2

test/features/health/providers/health_sync_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import 'package:flutter_riverpod/flutter_riverpod.dart';
2020
import 'package:flutter_test/flutter_test.dart';
21-
import 'package:health/health.dart';
21+
import 'package:health_bridge/health.dart';
2222
import 'package:mockito/annotations.dart';
2323
import 'package:mockito/mockito.dart';
2424
import 'package:shared_preferences_platform_interface/in_memory_shared_preferences_async.dart';

0 commit comments

Comments
 (0)