Skip to content

Commit 5f9fda8

Browse files
committed
Fixes
• Fix travis • Apparently we’re iOS 9 and above only • Fix watchOS
1 parent b8801cf commit 5f9fda8

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

.travis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ matrix:
1414
- {osx_image: xcode9.2, env: 'PLAT=iOS SWFT=4.0 DST="OS=11.2,name=iPhone SE"'}
1515
- {osx_image: xcode9.2, env: 'PLAT=watchOS SWFT=4.0 DST="OS=4.2,name=Apple Watch - 38mm"'}
1616

17-
- {osx_image: xcode9.3, env: 'PLAT=iOS SWFT=4.1 DST="OS=8.4,name=iPhone 5s"'}
1817
- {osx_image: xcode9.3, env: 'PLAT=iOS SWFT=4.1 DST="OS=9.3,name=iPhone 5s"'}
1918
- {osx_image: xcode9.4, env: 'PLAT=iOS SWFT=4.1 DST="OS=10.3.1,name=iPhone 5s"'}
2019
- {osx_image: xcode9.4, env: 'PLAT=iOS SWFT=4.1 DST="OS=11.4,name=iPhone 5s" TEST=1'}
@@ -30,11 +29,11 @@ cache:
3029
before_install:
3130
- carthage bootstrap --cache-builds --no-use-binaries --platform $PLAT --verbose
3231
install:
33-
- xcodebuild -scheme PMKWatchConnectivity -target PMKWatchConnectivity -quiet -destination "$DST" SWIFT_VERSION=$SWFT SWIFT_TREAT_WARNINGS_AS_ERRORS=YES build
32+
- xcodebuild -scheme PMKHealthKit -target PMKHealthKit -quiet -destination "$DST" SWIFT_VERSION=$SWFT SWIFT_TREAT_WARNINGS_AS_ERRORS=YES build
3433
- if [ "$TEST" == "1" ]; then
35-
xcodebuild -scheme PMKWatchConnectivity -target PMKWCTests -quiet -destination "$DST" build;
34+
xcodebuild -scheme PMKHealthKit -target PMKHKTests -quiet -destination "$DST" build;
3635
fi
3736
script:
3837
- if [ "$TEST" == "1" ]; then
39-
xcodebuild -scheme PMKWatchConnectivity -quiet -destination "$DST" test;
38+
xcodebuild -scheme PMKHealthKit -quiet -destination "$DST" test;
4039
fi

PMKHealthKit.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@
273273
GCC_WARN_UNUSED_FUNCTION = YES;
274274
GCC_WARN_UNUSED_VARIABLE = YES;
275275
INFOPLIST_FILE = Info.plist;
276-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
276+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
277277
MACOSX_DEPLOYMENT_TARGET = 10.10;
278278
MTL_ENABLE_DEBUG_INFO = YES;
279279
ONLY_ACTIVE_ARCH = YES;
@@ -335,7 +335,7 @@
335335
GCC_WARN_UNUSED_FUNCTION = YES;
336336
GCC_WARN_UNUSED_VARIABLE = YES;
337337
INFOPLIST_FILE = Info.plist;
338-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
338+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
339339
MACOSX_DEPLOYMENT_TARGET = 10.10;
340340
MTL_ENABLE_DEBUG_INFO = NO;
341341
PRODUCT_BUNDLE_IDENTIFIER = org.promisekit.Foundation;

Sources/HealthKit+Promise.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ public extension HKHealthStore {
1010
}
1111
}
1212

13+
#if os(iOS)
1314
func enableBackgroundDelivery(for type: HKObjectType, frequency: HKUpdateFrequency) -> Promise<Bool> {
1415
return Promise { seal in
1516
enableBackgroundDelivery(for: type, frequency: frequency, withCompletion: seal.resolve)
1617
}
1718
}
19+
#endif
1820
}
1921

2022
public extension HKStatisticsQuery {

0 commit comments

Comments
 (0)