Skip to content

Commit 5755fd6

Browse files
committed
Merge branch 'develop' into documentation
2 parents 349814d + c85d5d8 commit 5755fd6

File tree

503 files changed

+5540
-24062
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

503 files changed

+5540
-24062
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

-75
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.yml

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Bug report
2+
description: File a bug report to help improve the Readium toolkit
3+
title: "[Bug] "
4+
labels: ["bug", "triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thank you for filing a bug report! Please [search for existing issues](https://github.com/readium/swift-toolkit/issues?q=is:issue) before submitting.
10+
- type: textarea
11+
id: bug-description
12+
attributes:
13+
label: Describe the bug
14+
description: Also, please let us know what your expectations were.
15+
placeholder: A clear and concise description of what the bug is.
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: bug-steps
20+
attributes:
21+
label: How to reproduce?
22+
description: |
23+
Step by step explanation to reproduce the issue in the Test App.
24+
25+
If you can, drag and drop:
26+
- the publication used to reproduce the problem, after zipping it.
27+
- screenshots or a screencast showing the issue
28+
29+
placeholder: |
30+
1. Open book X
31+
2. Go to chapter Y
32+
3. Swipe left twice
33+
4. See error
34+
...
35+
validations:
36+
required: true
37+
- type: input
38+
id: bug-readium-version
39+
attributes:
40+
label: Readium version
41+
description: What version of the Readium toolkit are you running?
42+
validations:
43+
required: true
44+
- type: input
45+
id: bug-os-version
46+
attributes:
47+
label: OS version
48+
description: On which OS version(s) did you reproduce the problem?
49+
placeholder: iOS 17.0.1
50+
validations:
51+
required: true
52+
- type: input
53+
id: bug-device
54+
attributes:
55+
label: Testing device
56+
description: On which Apple device did you reproduce the problem?
57+
placeholder: iPhone 15 Pro Max (emulator)
58+
validations:
59+
required: true
60+
- type: textarea
61+
id: bug-environment
62+
attributes:
63+
label: Environment
64+
description: |
65+
Run the following shell commands and paste the result here:
66+
```shell
67+
echo "macOS: `sw_vers -productVersion`"
68+
echo "platform: `uname -m`"
69+
echo "carthage: `carthage version`"
70+
xcodebuild -version
71+
```
72+
placeholder: |
73+
macOS: 14.1.2
74+
platform: arm64
75+
carthage: 0.39.1
76+
Xcode 15.1
77+
Build version 15C65
78+
render: bash
79+
- type: textarea
80+
id: bug-additional
81+
attributes:
82+
label: Additional context
83+
description: |
84+
Share additional code showing how you use Readium, if relevant. Output logs are useful as well.
85+
If you already went through the codebase to find the bug, you can explain your findings here.

.github/ISSUE_TEMPLATE/config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false

.github/workflows/checks.yml

+34-17
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v2
24+
uses: actions/checkout@v3
2525
- name: Install dependencies
2626
run: |
2727
brew update
@@ -33,10 +33,12 @@ jobs:
3333
git diff --exit-code Support/Carthage/Readium.xcodeproj
3434
- name: Build
3535
run: |
36-
xcodebuild build-for-testing -scheme "$scheme" -destination "platform=$platform,name=$device"
36+
set -eo pipefail
37+
xcodebuild build-for-testing -scheme "$scheme" -destination "platform=$platform,name=$device" | if command -v xcpretty &> /dev/null; then xcpretty; else cat; fi
3738
- name: Test
3839
run: |
39-
xcodebuild test-without-building -scheme "$scheme" -destination "platform=$platform,name=$device"
40+
set -eo pipefail
41+
xcodebuild test-without-building -scheme "$scheme" -destination "platform=$platform,name=$device" | if command -v xcpretty &> /dev/null; then xcpretty; else cat; fi
4042
4143
lint:
4244
name: Lint
@@ -47,13 +49,24 @@ jobs:
4749

4850
steps:
4951
- name: Checkout
50-
uses: actions/checkout@v2
52+
uses: actions/checkout@v3
53+
- name: Install pnpm
54+
uses: pnpm/action-setup@v2
55+
with:
56+
package_json_file: Sources/Navigator/EPUB/Scripts/package.json
57+
run_install: false
58+
- name: Setup cache
59+
uses: actions/setup-node@v3
60+
with:
61+
node-version: 20
62+
cache: 'pnpm'
63+
cache-dependency-path: Sources/Navigator/EPUB/Scripts/pnpm-lock.yaml
5164
- name: Install dependencies
52-
run: yarn --cwd "$scripts" install --frozen-lockfile
53-
- name: Lint JavaScript
54-
run: yarn --cwd "$scripts" run lint
55-
- name: Check JavaScript formatting
56-
run: yarn --cwd "$scripts" run checkformat
65+
run: pnpm --dir "$scripts" install --frozen-lockfile
66+
- name: Lint
67+
run: pnpm --dir "$scripts" run lint
68+
- name: Check formatting
69+
run: pnpm --dir "$scripts" run checkformat
5770
- name: Check if bundled scripts are up-to-date
5871
run: |
5972
make scripts
@@ -71,7 +84,7 @@ jobs:
7184
environment: LCP
7285
steps:
7386
- name: Checkout
74-
uses: actions/checkout@v2
87+
uses: actions/checkout@v3
7588
- name: Install dependencies
7689
run: |
7790
brew update
@@ -80,7 +93,8 @@ jobs:
8093
run: make dev lcp=${{ secrets.LCP_URL_SPM }}
8194
- name: Build
8295
run: |
83-
xcodebuild build -scheme TestApp -destination "platform=$platform,name=$device"
96+
set -eo pipefail
97+
xcodebuild build -scheme TestApp -destination "platform=$platform,name=$device" | if command -v xcpretty &> /dev/null; then xcpretty; else cat; fi
8498
8599
int-spm:
86100
name: Integration (Swift Package Manager)
@@ -92,7 +106,7 @@ jobs:
92106
environment: LCP
93107
steps:
94108
- name: Checkout
95-
uses: actions/checkout@v2
109+
uses: actions/checkout@v3
96110
# We can't use the current github.sha with pull_request event, because they will
97111
# reference the merge commit which cannot be fetched with SPM.
98112
- name: Set commit SHA
@@ -107,7 +121,8 @@ jobs:
107121
run: make spm lcp=${{ secrets.LCP_URL_SPM }} commit=$commit_sha
108122
- name: Build
109123
run: |
110-
xcodebuild build -scheme TestApp -destination "platform=$platform,name=$device"
124+
set -eo pipefail
125+
xcodebuild build -scheme TestApp -destination "platform=$platform,name=$device" | if command -v xcpretty &> /dev/null; then xcpretty; else cat; fi
111126
112127
int-carthage:
113128
name: Integration (Carthage)
@@ -119,7 +134,7 @@ jobs:
119134
environment: LCP
120135
steps:
121136
- name: Checkout
122-
uses: actions/checkout@v2
137+
uses: actions/checkout@v3
123138
# We can't use the current github.sha with pull_request event, because they will
124139
# reference the merge commit which cannot be fetched with Carthage.
125140
- name: Set commit SHA
@@ -134,7 +149,8 @@ jobs:
134149
run: make carthage lcp=${{ secrets.LCP_URL_CARTHAGE }} commit=$commit_sha
135150
- name: Build
136151
run: |
137-
xcodebuild build -scheme TestApp -destination "platform=$platform,name=$device"
152+
set -eo pipefail
153+
xcodebuild build -scheme TestApp -destination "platform=$platform,name=$device" | if command -v xcpretty &> /dev/null; then xcpretty; else cat; fi
138154
139155
# Warning: This job cannot actually test the state of the current commit,
140156
# but will check that the latest branch/tag set in the Podspecs are valid.
@@ -148,7 +164,7 @@ jobs:
148164
environment: LCP
149165
steps:
150166
- name: Checkout
151-
uses: actions/checkout@v2
167+
uses: actions/checkout@v3
152168
- name: Install dependencies
153169
run: |
154170
brew update
@@ -157,4 +173,5 @@ jobs:
157173
run: make cocoapods lcp=${{ secrets.LCP_URL_COCOAPODS }} commit=$commit_sha
158174
- name: Build
159175
run: |
160-
xcodebuild build -workspace TestApp.xcworkspace -scheme TestApp -destination "platform=$platform,name=$device"
176+
set -eo pipefail
177+
xcodebuild build -workspace TestApp.xcworkspace -scheme TestApp -destination "platform=$platform,name=$device" | if command -v xcpretty &> /dev/null; then xcpretty; else cat; fi

BuildTools/Empty.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2023 Readium Foundation. All rights reserved.
2+
// Copyright 2024 Readium Foundation. All rights reserved.
33
// Use of this source code is governed by the BSD-style license
44
// available in the top-level LICENSE file of the project.
55
//

CHANGELOG.md

+22-1
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,35 @@ All notable changes to this project will be documented in this file. Take a look
44

55
**Warning:** Features marked as *alpha* may change or be removed in a future release without notice. Use with caution.
66

7-
## [Unreleased]
7+
<!-- ## [Unreleased] -->
8+
9+
## [2.7.0]
10+
11+
### Added
12+
13+
#### Shared
14+
15+
* You can now use `DefaultHTTPClientDelegate.httpClient(_:request:didReceive:completion:)` to handle authentication challenges (e.g. Basic) with `DefaultHTTPClient`.
16+
17+
#### Navigator
18+
19+
* The `AudioNavigator` API has been promoted to stable and ships with a new Preferences API.
20+
* The new `NavigatorDelegate.didFailToLoadResourceAt(_:didFailToLoadResourceAt:withError:)` delegate API notifies when an error occurs while loading a publication resource (contributed by [@ettore](https://github.com/readium/swift-toolkit/pull/400)).
821

922
### Fixed
1023

24+
* [#390](https://github.com/readium/swift-toolkit/issues/390) Fixed logger not logging above the minimum severity level (contributed by [@ettore](https://github.com/readium/swift-toolkit/pull/391)).
25+
1126
#### Navigator
1227

1328
* From iOS 13 to 15, PDF text selection is disabled on protected publications disabling the **Copy** editing action.
1429
* The **Share** editing action is disabled for any protected publication.
1530
* Fixed starting the TTS from the current EPUB position.
31+
* [#396](https://github.com/readium/swift-toolkit/issues/396) Ensure we stop the activity indicator when an EPUB resource fails to load correctly (contributed by [@ettore](https://github.com/readium/swift-toolkit/pull/397)).
32+
33+
#### Streamer
34+
35+
* [#399](https://github.com/readium/swift-toolkit/discussions/399) Zipped Audio Books and standalone audio files are now recognized.
1636

1737

1838
## [2.6.1]
@@ -643,3 +663,4 @@ progression. Now if no reading progression is set, the `effectiveReadingProgress
643663
[2.5.1]: https://github.com/readium/swift-toolkit/compare/2.5.0...2.5.1
644664
[2.6.0]: https://github.com/readium/swift-toolkit/compare/2.5.1...2.6.0
645665
[2.6.1]: https://github.com/readium/swift-toolkit/compare/2.6.0...2.6.1
666+
[2.7.0]: https://github.com/readium/swift-toolkit/compare/2.6.1...2.7.0

Cartfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ github "cezheng/Fuzi" ~> 3.1.3
22
github "dexman/Minizip" ~> 1.4.0
33
github "krzyzanowskim/CryptoSwift" == 1.5.1 # From 1.6.0, the build fails in GitHub actions
44
github "ra1028/DifferenceKit" ~> 1.3.0
5-
github "readium/GCDWebServer" ~> 3.7.4
5+
github "readium/GCDWebServer" ~> 4.0.0
66
github "scinfu/SwiftSoup" == 2.5.3 # 2.6.0 requires Xcode 14
77
github "stephencelis/SQLite.swift" == 0.13.3 # 0.14 introduces a breaking change
88
github "weichsel/ZIPFoundation" == 0.9.11 # 0.9.12 requires iOS 12+

Documentation/Migration Guide.md

+23
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,29 @@
22

33
All migration steps necessary in reading apps to upgrade to major versions of the Swift Readium toolkit will be documented in this file.
44

5+
## 2.7.0
6+
7+
### `AudioNavigator` is now stable
8+
9+
`AudioNavigator` is now stable. Follow the deprecation errors to automatically rename the types.
10+
11+
All the setting properties (e.g. `navigator.rate`) are now in `navigator.settings`.
12+
13+
### GCDWebServer was renamed
14+
15+
To avoid [name collision with GCDWebServer](https://github.com/readium/swift-toolkit/issues/402), we renamed [our fork](https://github.com/readium/gcdwebserver) to `ReadiumGCDWebServer`. You will need to update your project to replace the old dependency:
16+
17+
* Swift Package Manager: There's nothing to do.
18+
* Carthage:
19+
* Update the Carthage dependencies and make sure the new `ReadiumGCDWebServer.xcframework` was built.
20+
* Replace `GCDWebServer.xcframework` with `ReadiumGCDWebServer.xcframework` in your project.
21+
* CocoaPods:
22+
* Replace the `pod 'GCDWebServer'` statement in your `Podfile` with the following, before running `pod install`.
23+
```
24+
pod 'ReadiumGCDWebServer', podspec: 'https://raw.githubusercontent.com/readium/GCDWebServer/4.0.0/GCDWebServer.podspec'
25+
```
26+
27+
528
## 2.5.0
629

730
In the following migration steps, only the `ReadiumInternal` one is mandatory with 2.5.0.

0 commit comments

Comments
 (0)