Skip to content

Commit ffe2edb

Browse files
author
Clément Le Provost
committed
Fix Cocoapods build on watchOS
Cocoapods will not allow us to have a different set of sources depending on the platform, so we rely on conditional compilation.
1 parent a4050a7 commit ffe2edb

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

AlgoliaSearch.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
BCD1F5721CC61DB80006E227 /* MockURLSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCDA737D1CA555070082B197 /* MockURLSession.swift */; };
133133
BCD1F5731CC61DB80006E227 /* NetworkTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCDA73771CA546800082B197 /* NetworkTests.swift */; };
134134
BCD1F5741CC61DB80006E227 /* QueryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC0A01631C9C19CD00CD4A7C /* QueryTests.swift */; };
135+
BCD4B5351E13FE5E00838E02 /* NetworkReachability.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC15FAC01E01C041005E3B56 /* NetworkReachability.swift */; };
135136
BCD57D1F1D89947500C5DE68 /* DisjunctiveFaceting.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCD57D1E1D89947500C5DE68 /* DisjunctiveFaceting.swift */; };
136137
BCD57D201D89947500C5DE68 /* DisjunctiveFaceting.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCD57D1E1D89947500C5DE68 /* DisjunctiveFaceting.swift */; };
137138
BCD57D211D89947500C5DE68 /* DisjunctiveFaceting.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCD57D1E1D89947500C5DE68 /* DisjunctiveFaceting.swift */; };
@@ -979,6 +980,7 @@
979980
BC23A6F51D63541500DF9034 /* Cache.swift in Sources */,
980981
BC4DDF0C1DD12BCC004D9A6E /* PlacesQuery.swift in Sources */,
981982
BC4DDEFA1DD10EBA004D9A6E /* Types.swift in Sources */,
983+
BCD4B5351E13FE5E00838E02 /* NetworkReachability.swift in Sources */,
982984
BC23A6FB1D63541500DF9034 /* Network.swift in Sources */,
983985
BC23A6F91D63541500DF9034 /* Index.swift in Sources */,
984986
BC4DDF001DD11527004D9A6E /* PlacesClient.swift in Sources */,

Source/NetworkReachability.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
// THE SOFTWARE.
2222
//
2323

24+
#if !os(watchOS)
25+
2426
import Foundation
2527
import SystemConfiguration
2628

@@ -70,3 +72,5 @@ class NetworkReachability {
7072
return address
7173
}()
7274
}
75+
76+
#endif // !os(watchOS)

0 commit comments

Comments
 (0)