Skip to content

Commit

Permalink
Merge pull request #67 from raphaelmor/1ec5-pipefail
Browse files Browse the repository at this point in the history
Fix watchOS compiler error about MapKit
  • Loading branch information
1ec5 committed Nov 5, 2020
2 parents bc99b17 + b29d440 commit cf0e3a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .travis/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -euo pipefail

if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
xcodebuild $ACTION -project Polyline.xcodeproj -scheme "$SCHEME" -destination "$DESTINATION" ONLY_ACTIVE_ARCH=NO
swift build
Expand Down
4 changes: 2 additions & 2 deletions Sources/Polyline/Polyline.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import Foundation
#if canImport(CoreLocation)
import CoreLocation
#endif
#if canImport(MapKit)
#if canImport(MapKit) && !os(watchOS)
import MapKit
#endif

Expand Down Expand Up @@ -61,7 +61,7 @@ public struct Polyline {
}
#endif

#if canImport(MapKit)
#if canImport(MapKit) && !os(watchOS)
/// Convert polyline to MKPolyline to use with MapKit (nil if polyline cannot be decoded)
@available(tvOS 9.2, *)
public var mkPolyline: MKPolyline? {
Expand Down

0 comments on commit cf0e3a1

Please sign in to comment.