Skip to content

Commit 97846ea

Browse files
author
Clément Le Provost
committed
Fix podspec
- The Offline subspec does not support OS X. - Online sources are now duplicated in the Offline subspec. - Cocoapods won’t let us target iOS 7 because we are using Swift and Cocoapods uses dynamic frameworks. Although the code should work on iOS 7 when used in source form (this is why the deployment target remains unchanged in Xcode), we set the deployment target to iOS 8 when using Cocoapods.
1 parent 5f38654 commit 97846ea

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

AlgoliaSearch-Client-Swift.podspec

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ Pod::Spec.new do |s|
88
s.author = { 'Algolia' => 'contact@algolia.com' }
99
s.source = { :git => 'https://github.com/algolia/algoliasearch-client-swift.git', :tag => s.version }
1010

11-
s.ios.deployment_target = '7.0'
12-
s.osx.deployment_target = '10.10'
11+
s.ios.deployment_target = '8.0'
1312

1413
# By default, do not require the offline Core.
1514
s.default_subspec = 'Online'
1615

1716
# Online-only API client.
1817
s.subspec 'Online' do |online|
18+
online.ios.deployment_target = '8.0'
19+
online.osx.deployment_target = '10.10'
1920
# No additional dependency.
2021
# WARNING: Cocoapods complains when a subspec is empty, so we must define something additional here to keep
2122
# it satisfied.
@@ -35,6 +36,10 @@ Pod::Spec.new do |s|
3536
'GCC_PREPROCESSOR_DEFINITIONS' => 'ALGOLIA_SDK=1',
3637
'OTHER_SWIFT_FLAGS' => '-DALGOLIA_SDK'
3738
}
38-
offline.source_files = 'Source/Offline/*.swift'
39+
offline.source_files = [
40+
'Source/*.swift',
41+
'Source/Helpers/*.swift',
42+
'Source/Offline/*.swift'
43+
]
3944
end
4045
end

0 commit comments

Comments
 (0)