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

Commit

Permalink
2.0.0 (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
mickael-menu authored May 25, 2021
1 parent 45db9a5 commit 4d1735b
Show file tree
Hide file tree
Showing 15 changed files with 118 additions and 104 deletions.
11 changes: 8 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
language: swift
osx_image: xcode12.2
osx_image: xcode12.5
xcode_project: r2-shared-swift.xcodeproj
xcode_scheme: r2-shared-swift
xcode_destination: platform=iOS Simulator,OS=13.7,name=iPhone X
xcode_sdk: iphonesimulator13.7
xcode_destination: platform=iOS Simulator,OS=14.5.1,name=iPhone X
xcode_sdk: iphonesimulator14.5.1

branches:
only:
Expand All @@ -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
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ All notable changes to this project will be documented in this file.

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

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

## [2.0.0]

### Deprecated

* All APIs deprecated in previous versions are now unavailable.
* `DownloadSession` is deprecated and will be removed in the next major version. Please migrate to your own download solution.


## [2.0.0-beta.2]

Expand Down Expand Up @@ -98,3 +106,4 @@ All notable changes to this project will be documented in this file.
[2.0.0-alpha.2]: https://github.com/readium/r2-shared-swift/compare/2.0.0-alpha.1...2.0.0-alpha.2
[2.0.0-beta.1]: https://github.com/readium/r2-shared-swift/compare/2.0.0-alpha.2...2.0.0-beta.1
[2.0.0-beta.2]: https://github.com/readium/r2-shared-swift/compare/2.0.0-beta.1...2.0.0-beta.2
[2.0.0]: https://github.com/readium/r2-shared-swift/compare/2.0.0-beta.2...2.0.0
2 changes: 1 addition & 1 deletion R2Shared.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = 'R2Shared'
s.version = '2.0.0-beta.2'
s.version = '2.0.0'
s.license = 'BSD 3-Clause License'
s.summary = 'R2 Shared'
s.homepage = 'http://readium.github.io'
Expand Down
2 changes: 1 addition & 1 deletion r2-shared-swift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0940;
LastUpgradeCheck = 1240;
LastUpgradeCheck = 1250;
ORGANIZATIONNAME = Readium;
TargetAttributes = {
CA6161E921FB257700D2CFE3 = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1240"
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
28 changes: 14 additions & 14 deletions r2-shared-swift/DRM/DRM+Deprecated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public typealias DrmLicense = DRMLicense
@available(*, unavailable)
extension DRM {

@available(*, deprecated, message: "Use `license?.encryptionProfile` instead")
@available(*, unavailable, message: "Use `license?.encryptionProfile` instead")
public var profile: String? {
return license?.encryptionProfile
}
Expand All @@ -90,63 +90,63 @@ extension DRM {
@available(*, unavailable)
extension DRMLicense {

@available(*, deprecated, message: "Use `LCPLicense.renewLoan` instead")
@available(*, unavailable, message: "Use `LCPLicense.renewLoan` instead")
public func renew(endDate: Date?, completion: @escaping (Error?) -> Void) {
completion(nil)
}

@available(*, deprecated, message: "Use `LCPLicense.returnPublication` instead")
@available(*, unavailable, message: "Use `LCPLicense.returnPublication` instead")
public func `return`(completion: @escaping (Error?) -> Void) {
completion(nil)
}

@available(*, deprecated, message: "Checking for the rights is handled by r2-lcp-swift now")
@available(*, unavailable, message: "Checking for the rights is handled by r2-lcp-swift now")
public func areRightsValid() throws {}

@available(*, deprecated, message: "Registering the device is handled by r2-lcp-swift now")
@available(*, unavailable, message: "Registering the device is handled by r2-lcp-swift now")
public func register() {}

@available(*, deprecated, message: "Update DrmManagementTableViewController from r2-testapp-swift")
@available(*, unavailable, message: "Update DrmManagementTableViewController from r2-testapp-swift")
public func currentStatus() -> String {
return ""
}

@available(*, deprecated, message: "Update DrmManagementTableViewController from r2-testapp-swift")
@available(*, unavailable, message: "Update DrmManagementTableViewController from r2-testapp-swift")
public func lastUpdate() -> Date {
return Date()
}

@available(*, deprecated, message: "Update DrmManagementTableViewController from r2-testapp-swift")
@available(*, unavailable, message: "Update DrmManagementTableViewController from r2-testapp-swift")
public func issued() -> Date {
return Date()
}

@available(*, deprecated, message: "Update DrmManagementTableViewController from r2-testapp-swift")
@available(*, unavailable, message: "Update DrmManagementTableViewController from r2-testapp-swift")
public func provider() -> URL {
return URL(fileURLWithPath: "/")
}

@available(*, deprecated, message: "Update DrmManagementTableViewController from r2-testapp-swift")
@available(*, unavailable, message: "Update DrmManagementTableViewController from r2-testapp-swift")
public func rightsEnd() -> Date? {
return nil
}

@available(*, deprecated, message: "Update DrmManagementTableViewController from r2-testapp-swift")
@available(*, unavailable, message: "Update DrmManagementTableViewController from r2-testapp-swift")
public func potentialRightsEnd() -> Date? {
return nil
}

@available(*, deprecated, message: "Update DrmManagementTableViewController from r2-testapp-swift")
@available(*, unavailable, message: "Update DrmManagementTableViewController from r2-testapp-swift")
public func rightsStart() -> Date? {
return nil
}

@available(*, deprecated, message: "Update DrmManagementTableViewController from r2-testapp-swift")
@available(*, unavailable, message: "Update DrmManagementTableViewController from r2-testapp-swift")
public func rightsPrints() -> Int? {
return nil
}

@available(*, deprecated, message: "Update DrmManagementTableViewController from r2-testapp-swift")
@available(*, unavailable, message: "Update DrmManagementTableViewController from r2-testapp-swift")
public func rightsCopies() -> Int? {
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion r2-shared-swift/Publication/ContentLayout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import Foundation

@available(*, deprecated, message: "Use `publication.metadata.effectiveReadingProgression` instead")
@available(*, unavailable, message: "Use `publication.metadata.effectiveReadingProgression` instead")
public enum ContentLayout: String {
case rtl = "rtl"
case ltr = "ltr"
Expand Down
6 changes: 3 additions & 3 deletions r2-shared-swift/Publication/Link.swift
Original file line number Diff line number Diff line change
Expand Up @@ -292,17 +292,17 @@ extension Array where Element == Link {
}
}

@available(*, deprecated, message: "This API will be removed.")
@available(*, unavailable, message: "This API will be removed.")
public func firstIndex<T: Equatable>(withProperty otherProperty: String, matching: T, recursively: Bool = false) -> Int? {
return firstIndex { ($0.properties.otherProperties[otherProperty] as? T) == matching }
}

@available(*, deprecated, renamed: "first(withHREF:)")
@available(*, unavailable, renamed: "first(withHREF:)")
public func first(withHref href: String) -> Link? {
return first(withHREF: href)
}

@available(*, deprecated, renamed: "firstIndex(withHREF:)")
@available(*, unavailable, renamed: "firstIndex(withHREF:)")
public func firstIndex(withHref href: String) -> Int? {
return firstIndex(withHREF: href)
}
Expand Down
2 changes: 1 addition & 1 deletion r2-shared-swift/Publication/Locator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public struct Locator: Hashable, CustomStringConvertible, Loggable {
fatalError()
}

@available(*, deprecated, message: "Use `fragments.first` instead")
@available(*, unavailable, message: "Use `fragments.first` instead")
public var fragment: String? { fragments.first }

}
Expand Down
Loading

0 comments on commit 4d1735b

Please sign in to comment.