Skip to content

Commit

Permalink
Merge pull request #1628 from NYPL-Simplified/IOS-639/xcode15
Browse files Browse the repository at this point in the history
IOS-639 Upgrade to Xcode 15, drop iOS 11 support, remove banned books without expiration date
  • Loading branch information
ettore authored Feb 5, 2024
2 parents 5402a9d + eb531f7 commit 2ab69ef
Show file tree
Hide file tree
Showing 29 changed files with 130 additions and 71 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/archive-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Check Carthage version
run: command -v carthage && carthage version
- name: Checkout main repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.IOS_DEV_CI_PAT }}
- name: Add Private Repo Auth
Expand Down Expand Up @@ -49,13 +49,13 @@ jobs:
- name: Check available Xcodes
run: ls -la /Applications | grep Xcode
- name: Force Xcode we use for development
run: sudo xcode-select -switch /Applications/Xcode_14.3.app
run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app
- name: Install Firebase Tools
run: npm install -g firebase-tools
- name: Check Firebase Tools version
run: command -v firebase && firebase --version
- name: Checkout main repo and submodules
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.IOS_DEV_CI_PAT }}
Expand All @@ -72,7 +72,7 @@ jobs:
GITHUB_REPO_OWNER: ${{ github.repository_owner }}
- name: Checkout Adobe RMSDK
if: needs.version-check.outputs.simplye_changed == '1'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: NYPL-Simplified/DRM-iOS-AdeptConnector
token: ${{ secrets.IOS_DEV_CI_PAT }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/non-drm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
- name: Check available Xcodes
run: ls -la /Applications | grep Xcode
- name: Force Xcode we use for development
run: sudo xcode-select -switch /Applications/Xcode_14.3.app
run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app
- name: Checkout main repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up repo for nonDRM build
run: exec ./scripts/setup-repo-nodrm.sh
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/unit-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:
- name: Check available Xcodes
run: ls -la /Applications | grep Xcode
- name: Force Xcode we use for development
run: sudo xcode-select -switch /Applications/Xcode_14.3.app
run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app
- name: Checkout main repo and submodules
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.IOS_DEV_CI_PAT }}
- name: Checkout Adobe RMSDK
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: NYPL-Simplified/DRM-iOS-AdeptConnector
token: ${{ secrets.IOS_DEV_CI_PAT }}
Expand Down
2 changes: 1 addition & 1 deletion Axis-iOS
2 changes: 1 addition & 1 deletion CardCreator-iOS
2 changes: 1 addition & 1 deletion NYPLAEToolkit
4 changes: 2 additions & 2 deletions RDServices.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@
"\"$(NYPLADEPT_ADOBE_SDK)/DRM_Connector_Prerelease/dp/public\"",
"\"$(NYPLADEPT_ADOBE_SDK)/DRM_Connector_Prerelease/xml/uft/public\"",
);
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
STRIP_INSTALLED_PRODUCT = NO;
Expand Down Expand Up @@ -590,7 +590,7 @@
"\"$(NYPLADEPT_ADOBE_SDK)/DRM_Connector_Prerelease/dp/public\"",
"\"$(NYPLADEPT_ADOBE_SDK)/DRM_Connector_Prerelease/xml/uft/public\"",
);
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
SDKROOT = iphoneos;
STRIP_INSTALLED_PRODUCT = NO;
VALIDATE_PRODUCT = YES;
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 = "1430"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
14 changes: 11 additions & 3 deletions Simplified.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -4936,7 +4936,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",
Expand Down Expand Up @@ -4991,7 +4991,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -5035,6 +5035,10 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.9.5;
OTHER_LDFLAGS = (
"$(inherited)",
"-ld_classic",
);
PRODUCT_BUNDLE_IDENTIFIER = org.nypl.labs.SimplyE;
PROVISIONING_PROFILE = "2e185b6c-271e-4b02-a05e-860b8c3831f6";
PROVISIONING_PROFILE_SPECIFIER = "SimplyE Development";
Expand Down Expand Up @@ -5084,6 +5088,10 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.9.5;
OTHER_LDFLAGS = (
"$(inherited)",
"-ld_classic",
);
PRODUCT_BUNDLE_IDENTIFIER = org.nypl.labs.SimplyE;
PROVISIONING_PROFILE = "b3d9154d-70e1-48d6-a0c5-869431277a5c";
PROVISIONING_PROFILE_SPECIFIER = "SimplyE Distribution";
Expand Down Expand Up @@ -5177,7 +5185,7 @@
repositoryURL = "https://github.com/readium/swift-toolkit.git";
requirement = {
kind = upToNextMinorVersion;
minimumVersion = 2.6.0;
minimumVersion = 2.6.1;
};
};
73579044276BE7F2009F1ADF /* XCRemoteSwiftPackageReference "iOS-Utilities" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
"version": "1.2022062300.0"
}
},
{
"package": "AppCheck",
"repositoryURL": "https://github.com/google/app-check.git",
"state": {
"branch": null,
"revision": "3e464dad87dad2d29bb29a97836789bf0f8f67d2",
"version": "10.18.1"
}
},
{
"package": "CryptoSwift",
"repositoryURL": "https://github.com/krzyzanowskim/CryptoSwift.git",
Expand All @@ -33,8 +42,8 @@
"repositoryURL": "https://github.com/firebase/firebase-ios-sdk",
"state": {
"branch": null,
"revision": "8a8ec57a272e0d31480fb0893dda0cf4f769b57e",
"version": "10.15.0"
"revision": "b880ec8ec927a838c51c12862c6222c30d7097d7",
"version": "10.20.0"
}
},
{
Expand All @@ -60,44 +69,44 @@
"repositoryURL": "https://github.com/google/GoogleAppMeasurement.git",
"state": {
"branch": null,
"revision": "03b9beee1a61f62d32c521e172e192a1663a5e8b",
"version": "10.13.0"
"revision": "ceec9f28dea12b7cf3dabf18b5ed7621c88fd4aa",
"version": "10.20.0"
}
},
{
"package": "GoogleDataTransport",
"repositoryURL": "https://github.com/google/GoogleDataTransport.git",
"state": {
"branch": null,
"revision": "aae45a320fd0d11811820335b1eabc8753902a40",
"version": "9.2.5"
"revision": "a732a4b47f59e4f725a2ea10f0c77e93a7131117",
"version": "9.3.0"
}
},
{
"package": "GoogleUtilities",
"repositoryURL": "https://github.com/google/GoogleUtilities.git",
"state": {
"branch": null,
"revision": "c38ce365d77b04a9a300c31061c5227589e5597b",
"version": "7.11.5"
"revision": "bc27fad73504f3d4af235de451f02ee22586ebd3",
"version": "7.12.1"
}
},
{
"package": "gRPC",
"repositoryURL": "https://github.com/google/grpc-binary.git",
"state": {
"branch": null,
"revision": "f1b366129d1125be7db83247e003fc333104b569",
"version": "1.50.2"
"revision": "a673bc2937fbe886dd1f99c401b01b6d977a9c98",
"version": "1.49.1"
}
},
{
"package": "GTMSessionFetcher",
"repositoryURL": "https://github.com/google/gtm-session-fetcher.git",
"state": {
"branch": null,
"revision": "d415594121c9e8a4f9d79cecee0965cf35e74dbd",
"version": "3.1.1"
"revision": "115f75e43851774934d695449a4836123c3246e1",
"version": "3.2.0"
}
},
{
Expand All @@ -114,7 +123,7 @@
"repositoryURL": "https://github.com/NYPL-Simplified/iOS-Utilities",
"state": {
"branch": "main",
"revision": "b26a3340c5dd38efc5de1d6b15f4cf62e94a6f5a",
"revision": "1d4940668a2265bd8954daf6fcedce2ceaf745e7",
"version": null
}
},
Expand All @@ -123,8 +132,8 @@
"repositoryURL": "https://github.com/firebase/leveldb.git",
"state": {
"branch": null,
"revision": "0706abcc6b0bd9cedfbb015ba840e4a780b5159b",
"version": "1.22.2"
"revision": "9d108e9112aa1d65ce508facf804674546116d9c",
"version": "1.22.3"
}
},
{
Expand Down Expand Up @@ -168,17 +177,17 @@
"repositoryURL": "https://github.com/apple/swift-protobuf.git",
"state": {
"branch": null,
"revision": "3c54ab05249f59f2c6641dd2920b8358ea9ed127",
"version": "1.24.0"
"revision": "65e8f29b2d63c4e38e736b25c27b83e012159be8",
"version": "1.25.2"
}
},
{
"package": "Readium",
"repositoryURL": "https://github.com/readium/swift-toolkit.git",
"state": {
"branch": null,
"revision": "ce50635a0d6699f2e279d1331f6bf7e236bf5f76",
"version": "2.6.0"
"revision": "a62962bbb862a5852ce8f79c5369213f38c79e8e",
"version": "2.6.1"
}
},
{
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 = "1430"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
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 = "1430"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
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 = "1430"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
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 = "1430"
LastUpgradeVersion = "1500"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
10 changes: 7 additions & 3 deletions Simplified/Announcements/NYPLAnnouncementBusinessLogic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ class NYPLAnnouncementBusinessLogic {
// MARK: - Read

private func restorePresentedAnnouncements() {
guard let filePathURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first?.appendingPathComponent(announcementsFilename),
guard
let filePathURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first?.appendingPathComponent(announcementsFilename),
let filePathData = try? Data(contentsOf: filePathURL),
let unarchived = try? NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(filePathData),
let unarchived = try? NSKeyedUnarchiver.unarchivedObject(ofClass: NSSet.self,
from: filePathData),
let presented = unarchived as? Set<String> else {
return
}
Expand Down Expand Up @@ -61,7 +63,9 @@ class NYPLAnnouncementBusinessLogic {
}

do {
let codedData = NSKeyedArchiver.archivedData(withRootObject: presentedAnnouncements)
let codedData = try NSKeyedArchiver
.archivedData(withRootObject: presentedAnnouncements,
requiringSecureCoding: false)
try codedData.write(to: filePathURL)
} catch {
NYPLErrorLogger.logError(error,
Expand Down
7 changes: 4 additions & 3 deletions Simplified/Book/Models/NYPLBookRegistry.m
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,11 @@ - (void)removeExpiredBannedBooks
NSMutableArray *booksToRemove = [[NSMutableArray alloc] init];
for (NSString *bookIdentifer in self.identifiersToRecords) {
NYPLBookRegistryRecord *record = self.identifiersToRecords[bookIdentifer];
NYPLOPDSAcquisition *acquisition = record.book.defaultAcquisition;
// Add the book to remove list if it is distributed by Axis360 and expired
if([record.book.defaultAcquisition.type isEqualToString:ContentTypeAxis360]) {
if (record.book.defaultAcquisition.availability.until &&
[record.book.defaultAcquisition.availability.until compare:[NSDate date]] == NSOrderedAscending) {
// or with no expiration
if ([acquisition.type isEqualToString:ContentTypeAxis360]) {
if ([acquisition.availability.until compare:[NSDate date]] != NSOrderedDescending) {
[booksToRemove addObject:bookIdentifer];
}
}
Expand Down
1 change: 1 addition & 0 deletions Simplified/Catalog/NYPLCatalogGroupedFeedViewController.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@class NYPLCatalogGroupedFeed;
@class NYPLRemoteViewController;

/// This VC represents the catalog screen with horizontal feed lanes.
@interface NYPLCatalogGroupedFeedViewController : UIViewController

+ (id)new NS_UNAVAILABLE;
Expand Down
3 changes: 3 additions & 0 deletions Simplified/Catalog/NYPLCatalogUngroupedFeedViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

#import "NYPLBookCellCollectionViewController.h"

/// This VC handles the presentation of vertical list of books, such as
/// My Books, Holds, and a single lane of the catalog presented by itself
/// in a vertically scrolling list.
@interface NYPLCatalogUngroupedFeedViewController : NYPLBookCellCollectionViewController

+ (id)new NS_UNAVAILABLE;
Expand Down
2 changes: 2 additions & 0 deletions Simplified/ErrorHandling/ProblemReportEmail.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ import UIKit
idiom = "tv"
case .mac:
idiom = "mac"
case .vision:
idiom = "vision"
case .unspecified:
fallthrough
@unknown default:
Expand Down
Loading

0 comments on commit 2ab69ef

Please sign in to comment.