From 3a1cbe109e449b4a7acd5d8db5cc958205ebcd82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Menu?= Date: Tue, 25 May 2021 18:11:05 +0200 Subject: [PATCH] 2.0.0 (#170) --- .travis.yml | 11 +++++-- CHANGELOG.md | 8 +++++ Cartfile | 2 +- Cartfile.resolved | 2 +- R2Navigator.podspec | 2 +- r2-navigator-swift.xcodeproj/project.pbxproj | 2 +- .../xcschemes/r2-navigator-swift.xcscheme | 2 +- .../CBZ/CBZNavigatorViewController.swift | 14 ++++----- .../EPUB/EPUBNavigatorViewController.swift | 30 +++++-------------- r2-navigator-swift/EPUB/EPUBSpreadView.swift | 2 +- .../Toolkit/PaginationView.swift | 2 +- 11 files changed, 37 insertions(+), 40 deletions(-) diff --git a/.travis.yml b/.travis.yml index 65dc1405..d35e7e86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,9 @@ language: swift -osx_image: xcode12.2 +osx_image: xcode12.5 xcode_project: r2-navigator-swift.xcodeproj xcode_scheme: r2-navigator-swift -xcode_destination: platform=iOS Simulator,OS=11.3,name=iPhone X -xcode_sdk: iphonesimulator13.0 +xcode_destination: platform=iOS Simulator,OS=14.5.1,name=iPhone X +xcode_sdk: iphonesimulator14.5.1 branches: only: @@ -18,6 +18,11 @@ before_install: - brew update - brew outdated carthage || brew upgrade carthage - carthage bootstrap --verbose --no-use-binaries --use-xcframeworks --platform iOS --cache-builds + # The project expects .framework but we can only build XCFrameworks with Carthage on Xcode 12+. + # As a workaround, this will extract the .framework generated from the .xcframework files. + # See https://github.com/readium/r2-testapp-swift/issues/351#issuecomment-829250100 + - mkdir -p Carthage/Build/iOS + - cp -r Carthage/Build/*.xcframework/ios-arm64_armv7/*.framework Carthage/Build/iOS script: - xcodebuild clean build -quiet diff --git a/CHANGELOG.md b/CHANGELOG.md index ebefd43a..176eff18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ All notable changes to this project will be documented in this file. +## [2.0.0] + +### Deprecated + +* All APIs deprecated in previous versions are now unavailable. + + ## [2.0.0-beta.2] ### Added @@ -74,3 +81,4 @@ progression. Now if no reading progression is set, the `effectiveReadingProgress [2.0.0-alpha.2]: https://github.com/readium/r2-navigator-swift/compare/2.0.0-alpha.1...2.0.0-alpha.2 [2.0.0-beta.1]: https://github.com/readium/r2-navigator-swift/compare/2.0.0-alpha.2...2.0.0-beta.1 [2.0.0-beta.2]: https://github.com/readium/r2-navigator-swift/compare/2.0.0-beta.1...2.0.0-beta.2 +[2.0.0]: https://github.com/readium/r2-navigator-swift/compare/2.0.0-beta.2...2.0.0 diff --git a/Cartfile b/Cartfile index c853e85d..b40efb3c 100755 --- a/Cartfile +++ b/Cartfile @@ -1,2 +1,2 @@ -github "readium/r2-shared-swift" "develop" +github "readium/r2-shared-swift" == 2.0.0 github "scinfu/SwiftSoup" == 2.3.2 diff --git a/Cartfile.resolved b/Cartfile.resolved index f6ef8bfd..1cba7168 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,4 +1,4 @@ github "cezheng/Fuzi" "3.1.3" github "dexman/Minizip" "1.4.0" -github "readium/r2-shared-swift" "d8b571d2ad66b2f7b7c44278e1269332b69559ab" +github "readium/r2-shared-swift" "2.0.0" github "scinfu/SwiftSoup" "2.3.2" diff --git a/R2Navigator.podspec b/R2Navigator.podspec index 41c2a498..b966ce9c 100644 --- a/R2Navigator.podspec +++ b/R2Navigator.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "R2Navigator" - s.version = "2.0.0-beta.2" + s.version = "2.0.0" s.license = "BSD 3-Clause License" s.summary = "R2 Navigator" s.homepage = "http://readium.github.io" diff --git a/r2-navigator-swift.xcodeproj/project.pbxproj b/r2-navigator-swift.xcodeproj/project.pbxproj index 6d52b479..085487ba 100644 --- a/r2-navigator-swift.xcodeproj/project.pbxproj +++ b/r2-navigator-swift.xcodeproj/project.pbxproj @@ -259,7 +259,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 1240; + LastUpgradeCheck = 1250; ORGANIZATIONNAME = Readium; TargetAttributes = { F3E7D3C21F4D83B000DF166D = { diff --git a/r2-navigator-swift.xcodeproj/xcshareddata/xcschemes/r2-navigator-swift.xcscheme b/r2-navigator-swift.xcodeproj/xcshareddata/xcschemes/r2-navigator-swift.xcscheme index 816198cd..851a8883 100644 --- a/r2-navigator-swift.xcodeproj/xcshareddata/xcschemes/r2-navigator-swift.xcscheme +++ b/r2-navigator-swift.xcodeproj/xcshareddata/xcschemes/r2-navigator-swift.xcscheme @@ -1,6 +1,6 @@ [Link] { return publication.readingOrder } - @available(*, deprecated, message: "Use `publication.tableOfContents` instead") + @available(*, unavailable, message: "Use `publication.tableOfContents` instead") public func getTableOfContents() -> [Link] { return publication.tableOfContents } @available(*, unavailable, renamed: "go(to:)") @@ -773,11 +761,7 @@ extension EPUBNavigatorViewController { @available(*, unavailable, renamed: "go(to:)") public func displayReadingOrderItem(at index: Int, progression: Double) {} - @available(*, deprecated, renamed: "go(to:)") - public func displayReadingOrderItem(with href: String) -> Int? { - let index = publication.readingOrder.firstIndex(withHref: href) - let moved = go(to: Link(href: href)) - return moved ? index : nil - } + @available(*, unavailable, renamed: "go(to:)") + public func displayReadingOrderItem(with href: String) -> Int? { nil } } diff --git a/r2-navigator-swift/EPUB/EPUBSpreadView.swift b/r2-navigator-swift/EPUB/EPUBSpreadView.swift index 9c588d1a..69be8bbb 100644 --- a/r2-navigator-swift/EPUB/EPUBSpreadView.swift +++ b/r2-navigator-swift/EPUB/EPUBSpreadView.swift @@ -14,7 +14,7 @@ import R2Shared import SwiftSoup -protocol EPUBSpreadViewDelegate: class { +protocol EPUBSpreadViewDelegate: AnyObject { /// Called when the user tapped on the spread contents. func spreadView(_ spreadView: EPUBSpreadView, didTapAt point: CGPoint) diff --git a/r2-navigator-swift/Toolkit/PaginationView.swift b/r2-navigator-swift/Toolkit/PaginationView.swift index 26c21e27..ee67feba 100644 --- a/r2-navigator-swift/Toolkit/PaginationView.swift +++ b/r2-navigator-swift/Toolkit/PaginationView.swift @@ -43,7 +43,7 @@ extension PageView { } -protocol PaginationViewDelegate: class { +protocol PaginationViewDelegate: AnyObject { /// Creates the page view for the page at given index. func paginationView(_ paginationView: PaginationView, pageViewAtIndex index: Int) -> (UIView & PageView)?