Skip to content

Commit a4b7720

Browse files
committed
Fix build with Xcode 14 and Carthage / CocoaPods (#247)
1 parent fd8ad22 commit a4b7720

File tree

13 files changed

+26
-24
lines changed

13 files changed

+26
-24
lines changed

.github/workflows/checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: macos-latest
1717
env:
1818
scheme: ${{ 'Readium-Package' }}
19-
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
19+
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
2020

2121
steps:
2222
- name: Checkout

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ All notable changes to this project will be documented in this file. Take a look
2525

2626
### Fixed
2727

28+
* [#244](https://github.com/readium/swift-toolkit/issues/244) Fixed build with Xcode 14 and Carthage/CocoaPods.
29+
2830
#### Navigator
2931

3032
* Fixed memory leaks in the EPUB and PDF navigators.

Cartfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
github "cezheng/Fuzi" ~> 3.1.3
22
github "dexman/Minizip" ~> 1.4.0
33
github "krzyzanowskim/CryptoSwift" ~> 1.3.8
4-
github "ra1028/DifferenceKit" ~> 1.2.0
5-
github "readium/GCDWebServer" ~> 3.6.3
6-
github "scinfu/SwiftSoup" ~> 2.3.2
7-
github "stephencelis/SQLite.swift" ~> 0.12.2
4+
github "ra1028/DifferenceKit" ~> 1.3.0
5+
github "readium/GCDWebServer" ~> 3.7.3
6+
github "scinfu/SwiftSoup" ~> 2.4.3
7+
github "stephencelis/SQLite.swift" ~> 0.13.3
88
github "weichsel/ZIPFoundation" == 0.9.11 # 0.9.12 requires iOS 12+

Package.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ let package = Package(
2121
dependencies: [
2222
.package(url: "https://github.com/cezheng/Fuzi.git", from: "3.1.3"),
2323
.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", from: "1.3.8"),
24-
.package(url: "https://github.com/marmelroy/Zip.git", from: "2.1.1"),
25-
.package(url: "https://github.com/ra1028/DifferenceKit.git", from: "1.2.0"),
26-
.package(url: "https://github.com/readium/GCDWebServer.git", from: "3.7.0"),
27-
.package(url: "https://github.com/scinfu/SwiftSoup.git", from: "2.3.2"),
28-
.package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.12.2"),
24+
.package(url: "https://github.com/marmelroy/Zip.git", from: "2.1.2"),
25+
.package(url: "https://github.com/ra1028/DifferenceKit.git", from: "1.3.0"),
26+
.package(url: "https://github.com/readium/GCDWebServer.git", from: "3.7.3"),
27+
.package(url: "https://github.com/scinfu/SwiftSoup.git", from: "2.4.3"),
28+
.package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.13.3"),
2929
// 0.9.12 requires iOS 12+
3030
.package(url: "https://github.com/weichsel/ZIPFoundation.git", "0.9.0"..<"0.9.12"),
3131
],

Sources/Shared/Publication/Services/Content/Iterators/HTMLResourceContentIterator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public class HTMLResourceContentIterator: ContentIterator {
154154
locator: baseLocator.copy(
155155
locations: {
156156
$0 = Locator.Locations(
157-
otherLocations: ["cssSelector": try? elem.cssSelector()]
157+
otherLocations: ["cssSelector": (try? elem.cssSelector()) as Any]
158158
)
159159
}
160160
),

Sources/Shared/Toolkit/Extensions/String.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ extension String {
6161
}
6262

6363
/// Same as `index(_,offsetBy:)` but without crashing when reaching the end of the string.
64-
func clampedIndex(_ i: String.Index, offsetBy n: String.IndexDistance) -> String.Index {
64+
func clampedIndex(_ i: String.Index, offsetBy n: Int) -> String.Index {
6565
precondition(n != 0)
6666
let limit = (n > 0) ? endIndex : startIndex
6767
guard let index = index(i, offsetBy: n, limitedBy: limit) else {

Support/CocoaPods/ReadiumLCP.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ Pod::Spec.new do |s|
2222
s.dependency 'R2Shared'
2323

2424
s.dependency 'ZIPFoundation', '<= 0.9.11' # 0.9.12 requires iOS 12+
25-
s.dependency 'SQLite.swift', '~> 0.12.2'
25+
s.dependency 'SQLite.swift', '~> 0.13'
2626
s.dependency 'CryptoSwift', '~> 1.3.8'
2727
end

Support/CocoaPods/ReadiumNavigator.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Pod::Spec.new do |s|
1818
s.platform = :ios
1919
s.ios.deployment_target = "10.0"
2020
s.dependency 'R2Shared'
21-
s.dependency 'DifferenceKit'
22-
s.dependency 'SwiftSoup', '~> 2.3'
21+
s.dependency 'DifferenceKit', '~> 1.0'
22+
s.dependency 'SwiftSoup', '~> 2.0'
2323

2424
end

Support/CocoaPods/ReadiumOPDS.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ Pod::Spec.new do |s|
1717
s.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2' }
1818

1919
s.dependency 'R2Shared'
20-
s.dependency 'Fuzi', '~> 3.1.3'
20+
s.dependency 'Fuzi', '~> 3.0'
2121

2222
end

Support/CocoaPods/ReadiumShared.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Pod::Spec.new do |s|
1919
s.libraries = 'xml2'
2020
s.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2' }
2121

22-
s.dependency 'Fuzi', '~> 3.1.3'
23-
s.dependency 'Minizip', '~> 1.0.0'
24-
s.dependency 'SwiftSoup', '~> 2.3'
22+
s.dependency 'Fuzi', '~> 3.0'
23+
s.dependency 'Minizip', '~> 1.0'
24+
s.dependency 'SwiftSoup', '~> 2.0'
2525

2626
end

0 commit comments

Comments
 (0)