Skip to content
This repository was archived by the owner on Aug 12, 2022. It is now read-only.

Commit 3a1cbe1

Browse files
authored
2.0.0 (#170)
1 parent 8bf969b commit 3a1cbe1

File tree

11 files changed

+37
-40
lines changed

11 files changed

+37
-40
lines changed

.travis.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
language: swift
2-
osx_image: xcode12.2
2+
osx_image: xcode12.5
33
xcode_project: r2-navigator-swift.xcodeproj
44
xcode_scheme: r2-navigator-swift
5-
xcode_destination: platform=iOS Simulator,OS=11.3,name=iPhone X
6-
xcode_sdk: iphonesimulator13.0
5+
xcode_destination: platform=iOS Simulator,OS=14.5.1,name=iPhone X
6+
xcode_sdk: iphonesimulator14.5.1
77

88
branches:
99
only:
@@ -18,6 +18,11 @@ before_install:
1818
- brew update
1919
- brew outdated carthage || brew upgrade carthage
2020
- carthage bootstrap --verbose --no-use-binaries --use-xcframeworks --platform iOS --cache-builds
21+
# The project expects .framework but we can only build XCFrameworks with Carthage on Xcode 12+.
22+
# As a workaround, this will extract the .framework generated from the .xcframework files.
23+
# See https://github.com/readium/r2-testapp-swift/issues/351#issuecomment-829250100
24+
- mkdir -p Carthage/Build/iOS
25+
- cp -r Carthage/Build/*.xcframework/ios-arm64_armv7/*.framework Carthage/Build/iOS
2126

2227
script:
2328
- xcodebuild clean build -quiet

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ All notable changes to this project will be documented in this file.
77

88
<!--## [Unreleased]-->
99

10+
## [2.0.0]
11+
12+
### Deprecated
13+
14+
* All APIs deprecated in previous versions are now unavailable.
15+
16+
1017
## [2.0.0-beta.2]
1118

1219
### Added
@@ -74,3 +81,4 @@ progression. Now if no reading progression is set, the `effectiveReadingProgress
7481
[2.0.0-alpha.2]: https://github.com/readium/r2-navigator-swift/compare/2.0.0-alpha.1...2.0.0-alpha.2
7582
[2.0.0-beta.1]: https://github.com/readium/r2-navigator-swift/compare/2.0.0-alpha.2...2.0.0-beta.1
7683
[2.0.0-beta.2]: https://github.com/readium/r2-navigator-swift/compare/2.0.0-beta.1...2.0.0-beta.2
84+
[2.0.0]: https://github.com/readium/r2-navigator-swift/compare/2.0.0-beta.2...2.0.0

Cartfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github "readium/r2-shared-swift" "develop"
1+
github "readium/r2-shared-swift" == 2.0.0
22
github "scinfu/SwiftSoup" == 2.3.2

Cartfile.resolved

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
github "cezheng/Fuzi" "3.1.3"
22
github "dexman/Minizip" "1.4.0"
3-
github "readium/r2-shared-swift" "d8b571d2ad66b2f7b7c44278e1269332b69559ab"
3+
github "readium/r2-shared-swift" "2.0.0"
44
github "scinfu/SwiftSoup" "2.3.2"

R2Navigator.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = "R2Navigator"
4-
s.version = "2.0.0-beta.2"
4+
s.version = "2.0.0"
55
s.license = "BSD 3-Clause License"
66
s.summary = "R2 Navigator"
77
s.homepage = "http://readium.github.io"

r2-navigator-swift.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@
259259
isa = PBXProject;
260260
attributes = {
261261
LastSwiftUpdateCheck = 0830;
262-
LastUpgradeCheck = 1240;
262+
LastUpgradeCheck = 1250;
263263
ORGANIZATIONNAME = Readium;
264264
TargetAttributes = {
265265
F3E7D3C21F4D83B000DF166D = {

r2-navigator-swift.xcodeproj/xcshareddata/xcschemes/r2-navigator-swift.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1240"
3+
LastUpgradeVersion = "1250"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

r2-navigator-swift/CBZ/CBZNavigatorViewController.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -207,32 +207,32 @@ extension CBZNavigatorViewController: UIPageViewControllerDelegate {
207207

208208
extension CBZNavigatorViewController {
209209

210-
@available(*, deprecated, renamed: "currentLocation.locations.position")
210+
@available(*, unavailable, renamed: "currentLocation.locations.position")
211211
public var pageNumber: Int {
212212
return currentResourceIndex + 1
213213
}
214214

215-
@available(*, deprecated, message: "Use `publication.readingOrder.count` instead")
215+
@available(*, unavailable, message: "Use `publication.readingOrder.count` instead")
216216
public var totalPageNumber: Int {
217217
return publication.readingOrder.count
218218
}
219219

220-
@available(*, deprecated, renamed: "goForward")
220+
@available(*, unavailable, renamed: "goForward")
221221
@objc public func loadNext() {
222222
goForward(animated: true)
223223
}
224224

225-
@available(*, deprecated, renamed: "goBackward")
225+
@available(*, unavailable, renamed: "goBackward")
226226
@objc public func loadPrevious() {
227227
goBackward(animated: true)
228228
}
229229

230-
@available(*, deprecated, message: "Use `go(to:)` using the `readingOrder` instead")
230+
@available(*, unavailable, message: "Use `go(to:)` using the `readingOrder` instead")
231231
public func load(at index: Int) {
232232
goToResourceAtIndex(index, animated: true)
233233
}
234234

235-
@available(*, deprecated, message: "Use init(publication:initialLocation:) instead")
235+
@available(*, unavailable, message: "Use init(publication:initialLocation:) instead")
236236
public convenience init(for publication: Publication, initialIndex: Int = 0) {
237237
var location: Locator? = nil
238238
if publication.readingOrder.indices.contains(initialIndex) {
@@ -243,5 +243,5 @@ extension CBZNavigatorViewController {
243243

244244
}
245245

246-
@available(*, deprecated, renamed: "CBZNavigatorViewController")
246+
@available(*, unavailable, renamed: "CBZNavigatorViewController")
247247
public typealias CbzNavigatorViewController = CBZNavigatorViewController

r2-navigator-swift/EPUB/EPUBNavigatorViewController.swift

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ extension EPUBNavigatorViewController: PaginationViewDelegate {
701701

702702
// MARK: - Deprecated
703703

704-
@available(*, deprecated, renamed: "EPUBNavigatorViewController")
704+
@available(*, unavailable, renamed: "EPUBNavigatorViewController")
705705
public typealias NavigatorViewController = EPUBNavigatorViewController
706706

707707
@available(*, unavailable, message: "Use the `animated` parameter of `goTo` functions instead")
@@ -746,25 +746,13 @@ extension EPUBNavigatorViewController {
746746
set {}
747747
}
748748

749-
@available(*, deprecated, message: "Bookmark model is deprecated, use your own model and `currentLocation`")
750-
public var currentPosition: Bookmark? {
751-
guard let publicationID = publication.metadata.identifier,
752-
let locator = currentLocation,
753-
let currentResourceIndex = currentResourceIndex else
754-
{
755-
return nil
756-
}
757-
return Bookmark(
758-
publicationID: publicationID,
759-
resourceIndex: currentResourceIndex,
760-
locator: locator
761-
)
762-
}
749+
@available(*, unavailable, message: "Bookmark model is deprecated, use your own model and `currentLocation`")
750+
public var currentPosition: Bookmark? { nil }
763751

764-
@available(*, deprecated, message: "Use `publication.readingOrder` instead")
752+
@available(*, unavailable, message: "Use `publication.readingOrder` instead")
765753
public func getReadingOrder() -> [Link] { return publication.readingOrder }
766754

767-
@available(*, deprecated, message: "Use `publication.tableOfContents` instead")
755+
@available(*, unavailable, message: "Use `publication.tableOfContents` instead")
768756
public func getTableOfContents() -> [Link] { return publication.tableOfContents }
769757

770758
@available(*, unavailable, renamed: "go(to:)")
@@ -773,11 +761,7 @@ extension EPUBNavigatorViewController {
773761
@available(*, unavailable, renamed: "go(to:)")
774762
public func displayReadingOrderItem(at index: Int, progression: Double) {}
775763

776-
@available(*, deprecated, renamed: "go(to:)")
777-
public func displayReadingOrderItem(with href: String) -> Int? {
778-
let index = publication.readingOrder.firstIndex(withHref: href)
779-
let moved = go(to: Link(href: href))
780-
return moved ? index : nil
781-
}
764+
@available(*, unavailable, renamed: "go(to:)")
765+
public func displayReadingOrderItem(with href: String) -> Int? { nil }
782766

783767
}

r2-navigator-swift/EPUB/EPUBSpreadView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import R2Shared
1414
import SwiftSoup
1515

1616

17-
protocol EPUBSpreadViewDelegate: class {
17+
protocol EPUBSpreadViewDelegate: AnyObject {
1818

1919
/// Called when the user tapped on the spread contents.
2020
func spreadView(_ spreadView: EPUBSpreadView, didTapAt point: CGPoint)

0 commit comments

Comments
 (0)