Skip to content

Commit 91c87f6

Browse files
author
Clément Le Provost
committed
Merge branch 'v3'
2 parents ec4811f + 87c457a commit 91c87f6

27 files changed

+4492
-2083
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ before_script:
1212
- gem install xcpretty -N
1313
script:
1414
- set -o pipefail
15-
- bash run_test.sh
15+
- travis_retry bash run_test.sh

AlgoliaSearch-Client-Swift.podspec

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,29 @@ Pod::Spec.new do |s|
1111
s.ios.deployment_target = '8.0'
1212
s.osx.deployment_target = '10.9'
1313

14-
s.source_files = 'Source/*.swift'
14+
# By default, do not require the offline SDK.
15+
s.default_subspec = 'Online'
16+
17+
# Online-only API client.
18+
s.subspec 'Online' do |online|
19+
# No additional dependency.
20+
# WARNING: Cocoapods complains when a subspec is empty, so we must define something additional here to keep
21+
# it satisfied.
22+
online.source_files = [
23+
'Source/*.swift',
24+
'Source/Helpers/*.swift',
25+
]
26+
end
27+
28+
# Offline-enabled API client.
29+
s.subspec 'Offline' do |offline|
30+
offline.dependency 'AlgoliaSearchSDK-iOS'
31+
# Activate SDK-dependent code.
32+
# WARNING: Specifying the preprocessor macro is not enough; it must be added to Swift flags as well.
33+
offline.pod_target_xcconfig = {
34+
'GCC_PREPROCESSOR_DEFINITIONS' => 'ALGOLIA_SDK=1',
35+
'OTHER_SWIFT_FLAGS' => '-DALGOLIA_SDK'
36+
}
37+
offline.source_files = 'Source/Offline/*.swift'
38+
end
1539
end

AlgoliaSearch.xcodeproj/project.pbxproj

Lines changed: 88 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,26 @@
2929
5DB2515E1AAD9F3F00945339 /* ClientTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D8FFA371AAB08830078869E /* ClientTests.swift */; };
3030
5DECA2DA1A960BC5001A6088 /* Index.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DECA2D91A960BC5001A6088 /* Index.swift */; };
3131
5DF8C1311A9CA354006E107B /* Type.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DF8C1301A9CA354006E107B /* Type.swift */; };
32+
BC01E66D1CA43CEE0067670B /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC01E66C1CA43CEE0067670B /* Request.swift */; };
33+
BC01E66E1CA43CEE0067670B /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC01E66C1CA43CEE0067670B /* Request.swift */; };
34+
BC09F7771CAE743900ABB395 /* BrowseIterator.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC09F7761CAE743900ABB395 /* BrowseIterator.swift */; };
35+
BC09F7781CAE743900ABB395 /* BrowseIterator.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC09F7761CAE743900ABB395 /* BrowseIterator.swift */; };
36+
BC09F77C1CAE80B200ABB395 /* BrowseIteratorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC09F7791CAE7FDF00ABB395 /* BrowseIteratorTests.swift */; };
37+
BC09F77D1CAE80B300ABB395 /* BrowseIteratorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC09F7791CAE7FDF00ABB395 /* BrowseIteratorTests.swift */; };
38+
BC0A015A1C9BEDB200CD4A7C /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC0A01591C9BEDB200CD4A7C /* Error.swift */; };
39+
BC0A015B1C9BEDB200CD4A7C /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC0A01591C9BEDB200CD4A7C /* Error.swift */; };
40+
BC0A01641C9C19CD00CD4A7C /* QueryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC0A01631C9C19CD00CD4A7C /* QueryTests.swift */; };
41+
BC0A01651C9C19CD00CD4A7C /* QueryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC0A01631C9C19CD00CD4A7C /* QueryTests.swift */; };
42+
BC4A7F391CB5308100AF1DCB /* AsyncOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC4A7F381CB5308100AF1DCB /* AsyncOperation.swift */; };
43+
BC4A7F3A1CB5308100AF1DCB /* AsyncOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC4A7F381CB5308100AF1DCB /* AsyncOperation.swift */; };
44+
BC4A7F3C1CB5373E00AF1DCB /* CancelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC4A7F3B1CB5373E00AF1DCB /* CancelTests.swift */; };
45+
BC4A7F3D1CB5373E00AF1DCB /* CancelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC4A7F3B1CB5373E00AF1DCB /* CancelTests.swift */; };
46+
BC68BC571CB69776007F9655 /* IndexQuery.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC68BC561CB69776007F9655 /* IndexQuery.swift */; };
47+
BC68BC581CB69776007F9655 /* IndexQuery.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC68BC561CB69776007F9655 /* IndexQuery.swift */; };
48+
BCDA73781CA546800082B197 /* NetworkTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCDA73771CA546800082B197 /* NetworkTests.swift */; };
49+
BCDA73791CA546800082B197 /* NetworkTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCDA73771CA546800082B197 /* NetworkTests.swift */; };
50+
BCDA737E1CA555070082B197 /* MockURLSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCDA737D1CA555070082B197 /* MockURLSession.swift */; };
51+
BCDA737F1CA555070082B197 /* MockURLSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCDA737D1CA555070082B197 /* MockURLSession.swift */; };
3252
/* End PBXBuildFile section */
3353

3454
/* Begin PBXContainerItemProxy section */
@@ -65,6 +85,19 @@
6585
5DB251471AAD9EE400945339 /* AlgoliaSearch iOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AlgoliaSearch iOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
6686
5DECA2D91A960BC5001A6088 /* Index.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Index.swift; sourceTree = "<group>"; };
6787
5DF8C1301A9CA354006E107B /* Type.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Type.swift; sourceTree = "<group>"; };
88+
BC01E66C1CA43CEE0067670B /* Request.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Request.swift; sourceTree = "<group>"; };
89+
BC09F7761CAE743900ABB395 /* BrowseIterator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BrowseIterator.swift; sourceTree = "<group>"; };
90+
BC09F7791CAE7FDF00ABB395 /* BrowseIteratorTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BrowseIteratorTests.swift; sourceTree = "<group>"; };
91+
BC0A01591C9BEDB200CD4A7C /* Error.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Error.swift; sourceTree = "<group>"; };
92+
BC0A01601C9BEDE000CD4A7C /* MirroredIndex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MirroredIndex.swift; sourceTree = "<group>"; };
93+
BC0A01611C9BEDE000CD4A7C /* MirrorSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MirrorSettings.swift; sourceTree = "<group>"; };
94+
BC0A01621C9BEDE000CD4A7C /* OfflineClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OfflineClient.swift; sourceTree = "<group>"; };
95+
BC0A01631C9C19CD00CD4A7C /* QueryTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QueryTests.swift; sourceTree = "<group>"; };
96+
BC4A7F381CB5308100AF1DCB /* AsyncOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AsyncOperation.swift; sourceTree = "<group>"; };
97+
BC4A7F3B1CB5373E00AF1DCB /* CancelTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CancelTests.swift; sourceTree = "<group>"; };
98+
BC68BC561CB69776007F9655 /* IndexQuery.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IndexQuery.swift; sourceTree = "<group>"; };
99+
BCDA73771CA546800082B197 /* NetworkTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkTests.swift; sourceTree = "<group>"; };
100+
BCDA737D1CA555070082B197 /* MockURLSession.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockURLSession.swift; sourceTree = "<group>"; };
68101
/* End PBXFileReference section */
69102

70103
/* Begin PBXFrameworksBuildPhase section */
@@ -124,13 +157,19 @@
124157
5D7495801A8E25A600B0263F /* Source */ = {
125158
isa = PBXGroup;
126159
children = (
160+
BC4A7F381CB5308100AF1DCB /* AsyncOperation.swift */,
161+
5D67400E1B4AA22600B326EC /* Cache.swift */,
127162
5D7495A01A8E277400B0263F /* Client.swift */,
128-
5D7495A61A8E499B00B0263F /* Query.swift */,
163+
BC0A01591C9BEDB200CD4A7C /* Error.swift */,
164+
5D74959F1A8E277400B0263F /* Helpers.swift */,
129165
5DECA2D91A960BC5001A6088 /* Index.swift */,
130-
5D67400E1B4AA22600B326EC /* Cache.swift */,
166+
BC68BC561CB69776007F9655 /* IndexQuery.swift */,
131167
5D09E1DB1AC0773A00B799A6 /* Network.swift */,
168+
5D7495A61A8E499B00B0263F /* Query.swift */,
169+
BC01E66C1CA43CEE0067670B /* Request.swift */,
132170
5DF8C1301A9CA354006E107B /* Type.swift */,
133-
5D74959F1A8E277400B0263F /* Helpers.swift */,
171+
BC09F7751CAE742800ABB395 /* Helpers */,
172+
BC0A015F1C9BEDE000CD4A7C /* Offline */,
134173
5D7495811A8E25A600B0263F /* Supporting Files */,
135174
);
136175
path = Source;
@@ -147,9 +186,14 @@
147186
5D74958D1A8E25A600B0263F /* Tests */ = {
148187
isa = PBXGroup;
149188
children = (
150-
5D8FFA391AAB0AB80078869E /* IndexTests.swift */,
189+
BC09F7791CAE7FDF00ABB395 /* BrowseIteratorTests.swift */,
190+
BC4A7F3B1CB5373E00AF1DCB /* CancelTests.swift */,
151191
5D8FFA371AAB08830078869E /* ClientTests.swift */,
152192
5D44D0261B362648008369AC /* Helpers.swift */,
193+
5D8FFA391AAB0AB80078869E /* IndexTests.swift */,
194+
BCDA737D1CA555070082B197 /* MockURLSession.swift */,
195+
BCDA73771CA546800082B197 /* NetworkTests.swift */,
196+
BC0A01631C9C19CD00CD4A7C /* QueryTests.swift */,
153197
5D74958E1A8E25A600B0263F /* Supporting Files */,
154198
);
155199
path = Tests;
@@ -163,6 +207,24 @@
163207
name = "Supporting Files";
164208
sourceTree = "<group>";
165209
};
210+
BC09F7751CAE742800ABB395 /* Helpers */ = {
211+
isa = PBXGroup;
212+
children = (
213+
BC09F7761CAE743900ABB395 /* BrowseIterator.swift */,
214+
);
215+
path = Helpers;
216+
sourceTree = "<group>";
217+
};
218+
BC0A015F1C9BEDE000CD4A7C /* Offline */ = {
219+
isa = PBXGroup;
220+
children = (
221+
BC0A01601C9BEDE000CD4A7C /* MirroredIndex.swift */,
222+
BC0A01611C9BEDE000CD4A7C /* MirrorSettings.swift */,
223+
BC0A01621C9BEDE000CD4A7C /* OfflineClient.swift */,
224+
);
225+
path = Offline;
226+
sourceTree = "<group>";
227+
};
166228
/* End PBXGroup section */
167229

168230
/* Begin PBXHeadersBuildPhase section */
@@ -328,21 +390,31 @@
328390
isa = PBXSourcesBuildPhase;
329391
buildActionMask = 2147483647;
330392
files = (
393+
BC0A015A1C9BEDB200CD4A7C /* Error.swift in Sources */,
394+
BC68BC571CB69776007F9655 /* IndexQuery.swift in Sources */,
331395
5D67400F1B4AA22600B326EC /* Cache.swift in Sources */,
396+
BC4A7F391CB5308100AF1DCB /* AsyncOperation.swift in Sources */,
332397
5DF8C1311A9CA354006E107B /* Type.swift in Sources */,
333398
5DECA2DA1A960BC5001A6088 /* Index.swift in Sources */,
334399
5D09E1DC1AC0773A00B799A6 /* Network.swift in Sources */,
335400
5D7495A21A8E277400B0263F /* Client.swift in Sources */,
336401
5D7495A71A8E499B00B0263F /* Query.swift in Sources */,
402+
BC01E66D1CA43CEE0067670B /* Request.swift in Sources */,
337403
5D7495A11A8E277400B0263F /* Helpers.swift in Sources */,
404+
BC09F7771CAE743900ABB395 /* BrowseIterator.swift in Sources */,
338405
);
339406
runOnlyForDeploymentPostprocessing = 0;
340407
};
341408
5D7495851A8E25A600B0263F /* Sources */ = {
342409
isa = PBXSourcesBuildPhase;
343410
buildActionMask = 2147483647;
344411
files = (
412+
BC09F77C1CAE80B200ABB395 /* BrowseIteratorTests.swift in Sources */,
413+
BC0A01641C9C19CD00CD4A7C /* QueryTests.swift in Sources */,
345414
5D8FFA381AAB08830078869E /* ClientTests.swift in Sources */,
415+
BCDA73781CA546800082B197 /* NetworkTests.swift in Sources */,
416+
BCDA737E1CA555070082B197 /* MockURLSession.swift in Sources */,
417+
BC4A7F3C1CB5373E00AF1DCB /* CancelTests.swift in Sources */,
346418
5D44D0271B362648008369AC /* Helpers.swift in Sources */,
347419
5D8FFA3A1AAB0AB80078869E /* IndexTests.swift in Sources */,
348420
);
@@ -352,21 +424,31 @@
352424
isa = PBXSourcesBuildPhase;
353425
buildActionMask = 2147483647;
354426
files = (
427+
BC0A015B1C9BEDB200CD4A7C /* Error.swift in Sources */,
428+
BC68BC581CB69776007F9655 /* IndexQuery.swift in Sources */,
355429
5D6740101B4AA22600B326EC /* Cache.swift in Sources */,
430+
BC4A7F3A1CB5308100AF1DCB /* AsyncOperation.swift in Sources */,
356431
5DB2515C1AAD9F3300945339 /* Helpers.swift in Sources */,
357432
5DB251591AAD9F2A00945339 /* Query.swift in Sources */,
358433
5D09E1DD1AC0773A00B799A6 /* Network.swift in Sources */,
359434
5DB251581AAD9F2700945339 /* Client.swift in Sources */,
360435
5DB2515A1AAD9F2D00945339 /* Index.swift in Sources */,
436+
BC01E66E1CA43CEE0067670B /* Request.swift in Sources */,
361437
5DB2515B1AAD9F2F00945339 /* Type.swift in Sources */,
438+
BC09F7781CAE743900ABB395 /* BrowseIterator.swift in Sources */,
362439
);
363440
runOnlyForDeploymentPostprocessing = 0;
364441
};
365442
5DB251431AAD9EE400945339 /* Sources */ = {
366443
isa = PBXSourcesBuildPhase;
367444
buildActionMask = 2147483647;
368445
files = (
446+
BC09F77D1CAE80B300ABB395 /* BrowseIteratorTests.swift in Sources */,
447+
BC0A01651C9C19CD00CD4A7C /* QueryTests.swift in Sources */,
369448
5DB2515E1AAD9F3F00945339 /* ClientTests.swift in Sources */,
449+
BCDA73791CA546800082B197 /* NetworkTests.swift in Sources */,
450+
BCDA737F1CA555070082B197 /* MockURLSession.swift in Sources */,
451+
BC4A7F3D1CB5373E00AF1DCB /* CancelTests.swift in Sources */,
370452
5D44D0281B362648008369AC /* Helpers.swift in Sources */,
371453
5DB2515D1AAD9F3B00945339 /* IndexTests.swift in Sources */,
372454
);
@@ -424,7 +506,7 @@
424506
GCC_WARN_UNUSED_FUNCTION = YES;
425507
GCC_WARN_UNUSED_VARIABLE = YES;
426508
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
427-
MACOSX_DEPLOYMENT_TARGET = 10.9;
509+
MACOSX_DEPLOYMENT_TARGET = 10.10;
428510
MTL_ENABLE_DEBUG_INFO = YES;
429511
ONLY_ACTIVE_ARCH = YES;
430512
SDKROOT = macosx;
@@ -464,7 +546,7 @@
464546
GCC_WARN_UNUSED_FUNCTION = YES;
465547
GCC_WARN_UNUSED_VARIABLE = YES;
466548
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
467-
MACOSX_DEPLOYMENT_TARGET = 10.9;
549+
MACOSX_DEPLOYMENT_TARGET = 10.10;
468550
MTL_ENABLE_DEBUG_INFO = NO;
469551
SDKROOT = macosx;
470552
VERSIONING_SYSTEM = "apple-generic";
@@ -482,12 +564,10 @@
482564
DYLIB_COMPATIBILITY_VERSION = 1;
483565
DYLIB_CURRENT_VERSION = 1;
484566
DYLIB_INSTALL_NAME_BASE = "@rpath";
485-
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
486567
FRAMEWORK_VERSION = A;
487568
INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
488569
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
489570
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
490-
MACOSX_DEPLOYMENT_TARGET = 10.9;
491571
PRODUCT_BUNDLE_IDENTIFIER = "com.algolia.$(PRODUCT_NAME:rfc1034identifier)";
492572
PRODUCT_NAME = AlgoliaSearch;
493573
SDKROOT = macosx;
@@ -506,12 +586,10 @@
506586
DYLIB_COMPATIBILITY_VERSION = 1;
507587
DYLIB_CURRENT_VERSION = 1;
508588
DYLIB_INSTALL_NAME_BASE = "@rpath";
509-
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
510589
FRAMEWORK_VERSION = A;
511590
INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
512591
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
513592
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
514-
MACOSX_DEPLOYMENT_TARGET = 10.9;
515593
PRODUCT_BUNDLE_IDENTIFIER = "com.algolia.$(PRODUCT_NAME:rfc1034identifier)";
516594
PRODUCT_NAME = AlgoliaSearch;
517595
SDKROOT = macosx;
@@ -523,10 +601,6 @@
523601
isa = XCBuildConfiguration;
524602
buildSettings = {
525603
COMBINE_HIDPI_IMAGES = YES;
526-
FRAMEWORK_SEARCH_PATHS = (
527-
"$(DEVELOPER_FRAMEWORKS_DIR)",
528-
"$(inherited)",
529-
);
530604
GCC_PREPROCESSOR_DEFINITIONS = (
531605
"DEBUG=1",
532606
"$(inherited)",
@@ -542,10 +616,6 @@
542616
isa = XCBuildConfiguration;
543617
buildSettings = {
544618
COMBINE_HIDPI_IMAGES = YES;
545-
FRAMEWORK_SEARCH_PATHS = (
546-
"$(DEVELOPER_FRAMEWORKS_DIR)",
547-
"$(inherited)",
548-
);
549619
INFOPLIST_FILE = Tests/Info.plist;
550620
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
551621
PRODUCT_BUNDLE_IDENTIFIER = "com.algolia.$(PRODUCT_NAME:rfc1034identifier)";
@@ -563,7 +633,6 @@
563633
DYLIB_COMPATIBILITY_VERSION = 1;
564634
DYLIB_CURRENT_VERSION = 1;
565635
DYLIB_INSTALL_NAME_BASE = "@rpath";
566-
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
567636
GCC_PREPROCESSOR_DEFINITIONS = (
568637
"DEBUG=1",
569638
"$(inherited)",
@@ -590,7 +659,6 @@
590659
DYLIB_COMPATIBILITY_VERSION = 1;
591660
DYLIB_CURRENT_VERSION = 1;
592661
DYLIB_INSTALL_NAME_BASE = "@rpath";
593-
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
594662
INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
595663
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
596664
IPHONEOS_DEPLOYMENT_TARGET = 8.0;

ChangeLog

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)