Skip to content

SwiftUI updates #408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 88 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
65ef18d
Fix Test App's `Makefile` (#62)
mickael-menu Jun 16, 2022
213b4b2
LCP: Do not require the presence of a `hint` link in a license (#63)
mickael-menu Jun 28, 2022
5278ddc
Fix serving EPUB hrefs with anchor or query parameters (#66)
mickael-menu Aug 6, 2022
63a6ee7
Update Podspecs to use `resource_bundles` (#76)
jspizziri Aug 12, 2022
884063c
LCP: Add `Accept` header on status document fetch requests (#233)
hmoukaideche-vivlio Aug 19, 2022
a86e65d
Text-to-speech and content extraction (#48)
mickael-menu Aug 26, 2022
7c572dd
Fix performance with EPUB FXL spreads (#236)
mickael-menu Sep 8, 2022
fd8ad22
Fix vertically bouncing EPUB resources in iOS 16 (#241)
mickael-menu Sep 20, 2022
a4b7720
Fix build with Xcode 14 and Carthage / CocoaPods (#247)
mickael-menu Sep 23, 2022
8b95a2b
Use branch head commit SHA for package manager checks (#248)
mickael-menu Sep 23, 2022
2c09b7a
Parse EPUB and RWPM accessibility metadata (#235)
mickael-menu Sep 26, 2022
e173501
2.4.0 (#249)
mickael-menu Sep 26, 2022
fda711e
Revert Podspecs to `develop` branch
mickael-menu Sep 26, 2022
aa5b61f
Fix a race condition with `AVTTSEngine` (#250)
mickael-menu Oct 28, 2022
f853b3d
Fix broken SQLite.swift dependency (#252)
mickael-menu Nov 2, 2022
b3baf9d
Fix the EPUB parsing of accessibility profiles (#254)
mickael-menu Nov 9, 2022
ef59ad2
Add the `define` editing action for iOS 16 (#255)
mickael-menu Nov 14, 2022
1e5c551
Fix crash with `PublicationSpeechSynthesizer` (#258)
mickael-menu Nov 15, 2022
715fdb0
Create EPUB services for RWPM conforming to EPUB (#259)
mickael-menu Nov 21, 2022
8273c7e
Prevent navigation in the EPUB while it is being loaded (#260)
mickael-menu Nov 21, 2022
de0a198
Fix CGPDF returning unlocked PDF instead of error (#265)
nwilmet-vivlio Jan 3, 2023
4f082ee
Support for keyboard events in the navigators (#267)
lukeslu Feb 6, 2023
54090f6
Support for `esc` in keyboard events (#274)
lukeslu Feb 27, 2023
7ab518d
Fix EPUB tap event sent twice when using a mouse (#275)
mickael-menu Mar 3, 2023
bedc008
Deprecate the HTTP `PublicationServer` (#276)
mickael-menu Mar 13, 2023
728cf73
Merge branch 'develop' into swiftui
stevenzeck Mar 23, 2023
4f38347
Preferences API (#271)
mickael-menu Apr 14, 2023
9e03397
2.5.0 (#285)
mickael-menu Apr 14, 2023
b5fc9c6
Bump dependencies and requirements (#286)
mickael-menu Apr 14, 2023
dcd1582
Auto-format Swift sources (#287)
mickael-menu Apr 17, 2023
a9c2882
EPUB FXL `auto` spread setting (#288)
mickael-menu Apr 18, 2023
5abaff1
Prevent auto-playing videos in EPUB publications (#299)
mickael-menu May 22, 2023
3b5e7a6
Fix various memory leaks and data races (#300)
mickael-menu May 23, 2023
f1d6486
Make `WKWebView` inspectable on iOS 16.4 (#303)
mickael-menu Jun 1, 2023
cb62d6c
Fix crash in the `PublicationSpeechSynthesizer` (#305)
mickael-menu Jun 1, 2023
36ba38a
Fix navigating audiobooks with a single resource (#292)
grighakobian Jun 8, 2023
5636678
Close audio session when in the background and paused (#306)
mickael-menu Jun 9, 2023
e94b8f7
Add `HTTPError.serverUnreachable` (#308)
mickael-menu Jun 13, 2023
b80781a
Fix injecting the `dir` attribute when already present (#312)
mickael-menu Jun 23, 2023
f47fafa
Reload spreads when the WebView is terminated (#311)
triin-ko Jun 26, 2023
0a69588
HTML Content Iterator improvements (#315)
mickael-menu Jun 29, 2023
22f1c84
Fix pausing the `PublicationSpeechSynthesizer` (#317)
mickael-menu Jul 6, 2023
45fde57
2.5.1 (#313)
mickael-menu Jul 7, 2023
d8172e9
Reset CocoaPods source branches
mickael-menu Jul 7, 2023
598e8d6
Fix transparent navigation bars on iOS 15+ (#320)
enverygtlr Jul 11, 2023
009cb3a
Remove `containers` from deprecated `PublicationServer` (#323)
kristojorg Jul 21, 2023
12aff90
Scroll to top when navigating to locators in scroll mode (#329)
chrfalch Aug 24, 2023
4e99147
Improve HTML decoration performance (#333)
mickael-menu Aug 25, 2023
bb12e47
Support HTML IDs and CSS selectors with EPUB decorations (#326)
lukeslu Aug 25, 2023
9ac78c5
Support for background playback with `PublicationSpeechSynthesizer` (…
mickael-menu Aug 25, 2023
e3056c6
Add custom `readingOrder` to `EPUBNavigationViewController` (#332)
chrfalch Aug 29, 2023
192fd36
Add `VisualNavigator`'s `shouldNavigateToLink` delegate (#331)
chrfalch Aug 29, 2023
4113b1a
Add an audiobook player in the Test App (#290)
mickael-menu Sep 21, 2023
ce50635
2.6.0 (#339)
mickael-menu Sep 21, 2023
f843069
Reset CocoaPods source branches
mickael-menu Jul 7, 2023
7c04a98
Fix permissions when importing a publication (#343)
mickael-menu Oct 10, 2023
59e2fce
Open `_AudiobookNavigator` playback refresh rate for configuration (#…
mickael-menu Oct 27, 2023
57cf13a
Fix lost position when rotating the screen several times (#347)
mickael-menu Oct 27, 2023
653a7c0
Improve VoiceOver support for the `EPUBNavigatorViewController` (#349)
mickael-menu Oct 31, 2023
37088ef
Restore `PDFNavigatorViewController` subclassing (#351)
mickael-menu Oct 31, 2023
d5bc46e
Allow bitmaps in ZAB archives (#352)
mickael-menu Oct 31, 2023
a62962b
2.6.1 (#353)
mickael-menu Oct 31, 2023
73e3e35
Reset CocoaPods source branches
mickael-menu Oct 31, 2023
9e89ce3
Adjust the audio session strategy for the `AudioNavigator` (#357)
mickael-menu Nov 10, 2023
be0d756
Fix Copy and Share editing actions (#364)
mickael-menu Nov 23, 2023
328f3a1
Fix EPUB initial location when in landscape mode (#368)
chrfalch Dec 5, 2023
5f72a00
Fix TTS issue (#369)
mickael-menu Dec 18, 2023
ba378e8
Add a new form-based bug report issue template (#374)
mickael-menu Jan 9, 2024
451d0e9
Update file headers (#378)
mickael-menu Jan 23, 2024
efba3a0
Add `Locator.Locations.time` (#382)
domkm Jan 30, 2024
919615a
Merge branch 'main' into develop
mickael-menu Feb 9, 2024
383ea23
Preferences API for `AudioNavigator` (#389)
mickael-menu Feb 12, 2024
3e647b6
Fix logger not logging above the minimum severity level (#391)
ettore Feb 12, 2024
0573d32
Switch to pnpm (#392)
mickael-menu Feb 12, 2024
8607390
Turn off spinner if spread doesn't begin loading (#397)
ettore Mar 20, 2024
6365bb9
Sniff audio clips (#403)
mickael-menu Mar 23, 2024
23e22cf
Use `ReadiumGCDWebServer*` symbols (#404)
ettore Mar 26, 2024
cddfa94
Bubble up errors while loading Resources (#400)
ettore Mar 27, 2024
04d72a0
Merge branch 'develop' into swiftui
stevenzeck Mar 28, 2024
920464d
Merge branch 'develop' into swiftui
stevenzeck Mar 28, 2024
c7e28f2
Fix `ReadiumGCDWebServer` integration for CocoaPods and Carthage (#406)
mickael-menu Mar 28, 2024
683fad0
Merge branch 'develop' into swiftui
stevenzeck Mar 29, 2024
326b4c6
Attempt rectifying merge issues
stevenzeck Mar 29, 2024
a87ce56
More cleanup
stevenzeck Mar 29, 2024
34faec3
SwiftUI updates
stevenzeck Apr 1, 2024
2a4ce7c
Cleanup
stevenzeck Apr 1, 2024
3ec6f3e
Format
stevenzeck Apr 1, 2024
d53f695
More format
stevenzeck Apr 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
75 changes: 0 additions & 75 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

85 changes: 85 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Bug report
description: File a bug report to help improve the Readium toolkit
title: "[Bug] "
labels: ["bug", "triage"]
body:
- type: markdown
attributes:
value: |
Thank you for filing a bug report! Please [search for existing issues](https://github.com/readium/swift-toolkit/issues?q=is:issue) before submitting.
- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: Also, please let us know what your expectations were.
placeholder: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
id: bug-steps
attributes:
label: How to reproduce?
description: |
Step by step explanation to reproduce the issue in the Test App.

If you can, drag and drop:
- the publication used to reproduce the problem, after zipping it.
- screenshots or a screencast showing the issue

placeholder: |
1. Open book X
2. Go to chapter Y
3. Swipe left twice
4. See error
...
validations:
required: true
- type: input
id: bug-readium-version
attributes:
label: Readium version
description: What version of the Readium toolkit are you running?
validations:
required: true
- type: input
id: bug-os-version
attributes:
label: OS version
description: On which OS version(s) did you reproduce the problem?
placeholder: iOS 17.0.1
validations:
required: true
- type: input
id: bug-device
attributes:
label: Testing device
description: On which Apple device did you reproduce the problem?
placeholder: iPhone 15 Pro Max (emulator)
validations:
required: true
- type: textarea
id: bug-environment
attributes:
label: Environment
description: |
Run the following shell commands and paste the result here:
```shell
echo "macOS: `sw_vers -productVersion`"
echo "platform: `uname -m`"
echo "carthage: `carthage version`"
xcodebuild -version
```
placeholder: |
macOS: 14.1.2
platform: arm64
carthage: 0.39.1
Xcode 15.1
Build version 15C65
render: bash
- type: textarea
id: bug-additional
attributes:
label: Additional context
description: |
Share additional code showing how you use Readium, if relevant. Output logs are useful as well.
If you already went through the codebase to find the bug, you can explain your findings here.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
112 changes: 76 additions & 36 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,125 +13,165 @@ env:
jobs:
build:
name: Build
runs-on: macos-latest
runs-on: macos-12
if: ${{ !github.event.pull_request.draft }}
env:
scheme: ${{ 'Readium-Package' }}
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install dependencies
run: brew install xcodegen
run: |
brew update
brew install xcodegen
- name: Check Carthage project
run: |
# Check that the Carthage project is up to date.
make carthage-project
git diff --exit-code --name-only Support/Carthage/Readium.xcodeproj
git diff --exit-code Support/Carthage/Readium.xcodeproj
- name: Build
run: |
xcodebuild build-for-testing -scheme "$scheme" -destination "platform=$platform,name=$device"
set -eo pipefail
xcodebuild build-for-testing -scheme "$scheme" -destination "platform=$platform,name=$device" | if command -v xcpretty &> /dev/null; then xcpretty; else cat; fi
- name: Test
run: |
xcodebuild test-without-building -scheme "$scheme" -destination "platform=$platform,name=$device"
set -eo pipefail
xcodebuild test-without-building -scheme "$scheme" -destination "platform=$platform,name=$device" | if command -v xcpretty &> /dev/null; then xcpretty; else cat; fi

lint:
name: Lint
runs-on: macos-latest
runs-on: macos-12
if: ${{ !github.event.pull_request.draft }}
env:
scripts: ${{ 'Sources/Navigator/EPUB/Scripts' }}

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
package_json_file: Sources/Navigator/EPUB/Scripts/package.json
run_install: false
- name: Setup cache
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'
cache-dependency-path: Sources/Navigator/EPUB/Scripts/pnpm-lock.yaml
- name: Install dependencies
run: yarn --cwd "$scripts" install --frozen-lockfile
- name: Lint JavaScript
run: yarn --cwd "$scripts" run lint
- name: Check JavaScript formatting
run: yarn --cwd "$scripts" run checkformat
run: pnpm --dir "$scripts" install --frozen-lockfile
- name: Lint
run: pnpm --dir "$scripts" run lint
- name: Check formatting
run: pnpm --dir "$scripts" run checkformat
- name: Check if bundled scripts are up-to-date
run: |
make scripts
git diff --exit-code --name-only Sources/Navigator/EPUB/Assets/Static/scripts/*.js
- name: Lint Swift formatting
run: make lint-format

int-dev:
name: Integration (Local)
runs-on: macos-latest
runs-on: macos-12
if: ${{ !github.event.pull_request.draft }}
defaults:
run:
working-directory: TestApp
environment: LCP
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install dependencies
run: brew install xcodegen
run: |
brew update
brew install xcodegen
- name: Generate project
run: make dev lcp=${{ secrets.LCP_URL_SPM }}
- name: Build
run: |
xcodebuild build -scheme TestApp -destination "platform=$platform,name=$device"

# The following integration jobs are run only when pushing to `develop` or `main`.
# As they use a specific commit hash, they can't run properly from a pull request
# opened from forks.
set -eo pipefail
xcodebuild build -scheme TestApp -destination "platform=$platform,name=$device" | if command -v xcpretty &> /dev/null; then xcpretty; else cat; fi

int-spm:
name: Integration (Swift Package Manager)
if: github.event_name == 'push'
runs-on: macos-latest
runs-on: macos-12
if: ${{ !github.event.pull_request.draft }}
defaults:
run:
working-directory: TestApp
environment: LCP
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
# We can't use the current github.sha with pull_request event, because they will
# reference the merge commit which cannot be fetched with SPM.
- name: Set commit SHA
if: github.event_name == 'pull_request'
run: |
echo "commit_sha=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_ENV"
- name: Install dependencies
run: brew install xcodegen
run: |
brew update
brew install xcodegen
- name: Generate project
run: make spm lcp=${{ secrets.LCP_URL_SPM }} commit=$commit_sha
- name: Build
run: |
xcodebuild build -scheme TestApp -destination "platform=$platform,name=$device"
set -eo pipefail
xcodebuild build -scheme TestApp -destination "platform=$platform,name=$device" | if command -v xcpretty &> /dev/null; then xcpretty; else cat; fi

int-carthage:
name: Integration (Carthage)
if: github.event_name == 'push'
runs-on: macos-latest
runs-on: macos-12
if: ${{ !github.event.pull_request.draft }}
defaults:
run:
working-directory: TestApp
environment: LCP
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
# We can't use the current github.sha with pull_request event, because they will
# reference the merge commit which cannot be fetched with Carthage.
- name: Set commit SHA
if: github.event_name == 'pull_request'
run: |
echo "commit_sha=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_ENV"
- name: Install dependencies
run: brew install xcodegen
run: |
brew update
brew install xcodegen
- name: Generate project
run: make carthage lcp=${{ secrets.LCP_URL_CARTHAGE }} commit=$commit_sha
- name: Build
run: |
xcodebuild build -scheme TestApp -destination "platform=$platform,name=$device"
set -eo pipefail
xcodebuild build -scheme TestApp -destination "platform=$platform,name=$device" | if command -v xcpretty &> /dev/null; then xcpretty; else cat; fi

# Warning: This job cannot actually test the state of the current commit,
# but will check that the latest branch/tag set in the Podspecs are valid.
int-cocoapods:
name: Integration (CocoaPods)
if: github.event_name == 'push'
runs-on: macos-latest
runs-on: macos-12
defaults:
run:
working-directory: TestApp
environment: LCP
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install dependencies
run: brew install xcodegen
run: |
brew update
brew install xcodegen
- name: Generate project
run: make cocoapods lcp=${{ secrets.LCP_URL_COCOAPODS }} commit=$commit_sha
- name: Build
run: |
xcodebuild build -workspace TestApp.xcworkspace -scheme TestApp -destination "platform=$platform,name=$device"
set -eo pipefail
xcodebuild build -workspace TestApp.xcworkspace -scheme TestApp -destination "platform=$platform,name=$device" | if command -v xcpretty &> /dev/null; then xcpretty; else cat; fi
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Swift Package Manager
.build/
.swiftpm/
Package.resolved
./Package.resolved

# Carthage
./Carthage/
Expand Down
4 changes: 4 additions & 0 deletions .swiftformat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
--swiftversion 5.6
--exclude Carthage
--header "//\n// Copyright {year} Readium Foundation. All rights reserved.\n// Use of this source code is governed by the BSD-style license\n// available in the top-level LICENSE file of the project.\n//"
--stripunusedargs closure-only
5 changes: 5 additions & 0 deletions BuildTools/Empty.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//
// Copyright 2024 Readium Foundation. All rights reserved.
// Use of this source code is governed by the BSD-style license
// available in the top-level LICENSE file of the project.
//
Loading
Loading