Skip to content
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

Update dependencies #1011

Merged
merged 3 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
runs-on: macos-14
strategy:
matrix:
xcode: ["15.3"]
ios_version: ["17.4"]
xcode: ["16.0"]
ios_version: ["18.0"]
device_name: ["iPhone 15"]

steps:
Expand Down
2 changes: 1 addition & 1 deletion ZShare/Controllers/RedirectWebViewHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

import UIKit
import WebKit
@preconcurrency import WebKit

import CocoaLumberjackSwift
import RxSwift
Expand Down
18 changes: 9 additions & 9 deletions Zotero.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -6040,7 +6040,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.32;
MARKETING_VERSION = 1.0.41;
PRODUCT_BUNDLE_IDENTIFIER = org.zotero.ios.Zotero;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -6077,7 +6077,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.32;
MARKETING_VERSION = 1.0.41;
PRODUCT_BUNDLE_IDENTIFIER = org.zotero.ios.Zotero;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -6218,7 +6218,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.24;
MARKETING_VERSION = 1.0.41;
PRODUCT_BUNDLE_IDENTIFIER = org.zotero.ios.Zotero.ZShare;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -6252,7 +6252,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.24;
MARKETING_VERSION = 1.0.41;
PRODUCT_BUNDLE_IDENTIFIER = org.zotero.ios.Zotero.ZShare;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -6353,7 +6353,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.32;
MARKETING_VERSION = 1.0.41;
PRODUCT_BUNDLE_IDENTIFIER = org.zotero.ios.Zotero;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -6444,7 +6444,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.24;
MARKETING_VERSION = 1.0.41;
PRODUCT_BUNDLE_IDENTIFIER = org.zotero.ios.Zotero.ZShare;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -6574,7 +6574,7 @@
repositoryURL = "https://github.com/Quick/Nimble";
requirement = {
kind = exactVersion;
version = 13.4.0;
version = 13.5.0;
};
};
B356A38E2524A6BA003F1943 /* XCRemoteSwiftPackageReference "Quick" */ = {
Expand Down Expand Up @@ -6606,7 +6606,7 @@
repositoryURL = "https://github.com/realm/realm-cocoa";
requirement = {
kind = exactVersion;
version = 10.53.0;
version = 20.0.0;
};
};
B35E4B8B25248B3C000EA134 /* XCRemoteSwiftPackageReference "RxSwift" */ = {
Expand All @@ -6622,7 +6622,7 @@
repositoryURL = "https://github.com/PSPDFKit/PSPDFKit-SP";
requirement = {
kind = exactVersion;
version = 13.9.0;
version = 14.0.0;
};
};
B3D84BEE27919FDE005DDD7C /* XCRemoteSwiftPackageReference "Starscream" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Quick/Nimble",
"state" : {
"revision" : "54b4e52183f16fe806014cbfd63718a84f8ba072",
"version" : "13.4.0"
"revision" : "cecacf00ddf36c1efff8d14beb65087f2a676be9",
"version" : "13.5.0"
}
},
{
Expand All @@ -78,8 +78,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/PSPDFKit/PSPDFKit-SP",
"state" : {
"revision" : "3388fc5a4beeacda3e0b0a3ba6ec1766e55ad1d9",
"version" : "13.9.0"
"revision" : "39c61f0746177e6f7795d6f9b62fe0c39a1d7de2",
"version" : "14.0.0"
}
},
{
Expand All @@ -96,17 +96,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/realm/realm-cocoa",
"state" : {
"revision" : "9815e6c29d43cb5314add5dff8705c5476ab556c",
"version" : "10.53.0"
"revision" : "7ea8be1f74034bae860120d58d3491c4fcedff5b",
"version" : "20.0.0"
}
},
{
"identity" : "realm-core",
"kind" : "remoteSourceControl",
"location" : "https://github.com/realm/realm-core.git",
"state" : {
"revision" : "c2552e1d36867cb42b28130e894a81fc17081062",
"version" : "14.12.0"
"revision" : "f98720a07e6150c41c953e1937108225550ba155",
"version" : "20.0.0"
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions Zotero/Controllers/API/Alamofire+RxSwift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Alamofire
import CocoaLumberjackSwift
import RxSwift

struct AFResponseError: Error {
struct AFResponseError: Error, @unchecked Sendable {
let url: URL?
let httpMethod: String?
let error: AFError
Expand Down Expand Up @@ -114,7 +114,7 @@ extension DataRequest {
}
}

extension Request: ReactiveCompatible {}
extension Request: @retroactive ReactiveCompatible {}

extension Reactive where Base: DataRequest {
func loggedResponseDataWithResponseError(queue: DispatchQueue, encoding: ApiParameterEncoding, logParams: ApiLogParameters) -> Observable<(Data?, HTTPURLResponse)> {
Expand Down
2 changes: 1 addition & 1 deletion Zotero/Controllers/API/ApiOperation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation

import RxSwift

class ApiOperation: AsynchronousOperation {
class ApiOperation: AsynchronousOperation, @unchecked Sendable {
private let apiRequest: ApiRequest
private let responseQueue: DispatchQueue
private let completion: (Swift.Result<(Data?, HTTPURLResponse), Error>) -> Void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,7 @@ final class AttachmentDownloader: NSObject {
.disposed(by: disposeBag)

func resumeDownloads(tasks: [URLSessionTask], downloader: AttachmentDownloader) {
var taskIds: Set<Int> = []
for task in tasks {
taskIds.insert(task.taskIdentifier)
}

let taskIds: Set<Int> = Set(tasks.map { $0.taskIdentifier })
downloader.dbQueue.async { [weak downloader] in
guard let downloader else { return }
let (cancelledTaskIds, activeDownloads, downloadsToRestore) = loadDatabaseDownloads(
Expand Down Expand Up @@ -216,7 +212,7 @@ final class AttachmentDownloader: NSObject {
}
}

func loadDatabaseDownloads(existingTaskIds: Set<Int>, dbStorage: DbStorage, dbQueue: DispatchQueue, fileStorage: FileStorage) -> (Set<Int>, [(Int, EnqueuedDownload)], [EnqueuedDownload]) {
@Sendable func loadDatabaseDownloads(existingTaskIds: Set<Int>, dbStorage: DbStorage, dbQueue: DispatchQueue, fileStorage: FileStorage) -> (Set<Int>, [(Int, EnqueuedDownload)], [EnqueuedDownload]) {
var cancelledTaskIds: Set<Int> = []
var activeDownloads: [(Int, EnqueuedDownload)] = []
var downloadsToRestore: [EnqueuedDownload] = []
Expand Down Expand Up @@ -258,7 +254,7 @@ final class AttachmentDownloader: NSObject {
return (cancelledTaskIds, activeDownloads, downloadsToRestore)
}

func storeDownloadData(for downloads: [(Int, EnqueuedDownload)], downloader: AttachmentDownloader) -> [(Download, Swift.Error)] {
@Sendable func storeDownloadData(for downloads: [(Int, EnqueuedDownload)], downloader: AttachmentDownloader) -> [(Download, Swift.Error)] {
var failed: [(Download, Swift.Error)] = []
for (taskId, enqueuedDownload) in downloads {
DDLogInfo("AttachmentDownloader: cached \(taskId); \(enqueuedDownload.download.key); (\(enqueuedDownload.download.parentKey ?? "-")); \(enqueuedDownload.download.libraryId)")
Expand Down Expand Up @@ -445,8 +441,8 @@ final class AttachmentDownloader: NSObject {
func downloadIfNeeded(attachment: Attachment, parentKey: String?, scheduler: SchedulerType = MainScheduler.instance, completion: @escaping (Result<(), Swift.Error>) -> Void) {
observable
.observe(on: scheduler)
.subscribe(onNext: { [weak self] update in
guard let self, update.libraryId == attachment.libraryId && update.key == attachment.key else { return }
.subscribe(onNext: { update in
guard update.libraryId == attachment.libraryId && update.key == attachment.key else { return }
switch update.kind {
case .ready:
completion(.success(()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Alamofire
import RxSwift
import CocoaLumberjackSwift

class RemoteAttachmentDownloadOperation: AsynchronousOperation {
class RemoteAttachmentDownloadOperation: AsynchronousOperation, @unchecked Sendable {
private enum State {
case downloading, done
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ final class RemoteAttachmentDownloader {

return (download, operation)

func finish(download: Download, file: File, attachment: Attachment, parentKey: String, result: Result<(), Swift.Error>) {
@Sendable func finish(download: Download, file: File, attachment: Attachment, parentKey: String, result: Result<(), Swift.Error>) {
operations[download] = nil
progressObservers[download] = nil
resetBatchDataIfNeeded()
Expand All @@ -171,7 +171,7 @@ final class RemoteAttachmentDownloader {
}
}

func observe(progress: Progress, attachment: Attachment, download: Download) {
@Sendable func observe(progress: Progress, attachment: Attachment, download: Download) {
let observer = progress.observe(\.fractionCompleted) { [weak self] progress, _ in
self?.observable.on(.next(Update(download: download, kind: .progress(CGFloat(progress.fractionCompleted)))))
}
Expand Down
2 changes: 1 addition & 1 deletion Zotero/Controllers/IdentifierLookupController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ final class IdentifierLookupController {
}
}

func cleanup(completion: @escaping (Bool) -> Void) {
@Sendable func cleanup(completion: @escaping (Bool) -> Void) {
lookupData = [:]
lookupSavedCount = 0
lookupFailedCount = 0
Expand Down
2 changes: 1 addition & 1 deletion Zotero/Extensions/AsynchronousOperation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation

class AsynchronousOperation: Operation {
class AsynchronousOperation: Operation, @unchecked Sendable {
private enum State: String {
case ready = "isReady"
case executing = "isExecuting"
Expand Down
2 changes: 1 addition & 1 deletion Zotero/Extensions/CoreGraphics+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ extension CGPoint {
}
}

extension CGSize: Hashable {
extension CGSize: @retroactive Hashable {
public func hash(into hasher: inout Hasher) {
hasher.combine(width)
hasher.combine(height)
Expand Down
2 changes: 1 addition & 1 deletion Zotero/Models/Database/Database.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ struct Database {
let fields = oldObject["fields"] as? List<MigrationObject>,
let index = fields.firstIndex(where: { $0["key"] as? String == FieldKeys.Item.Annotation.color }),
let color = fields[index]["value"] as? String,
let newColor = AnnotationsConfig.colorVariationMap[color],
let newColor = colorVariationMap[color],
color != newColor
else { return }

Expand Down
3 changes: 1 addition & 2 deletions Zotero/Scenes/Detail/Items/Views/ItemsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,6 @@ final class ItemsViewController: UIViewController {
var image: UIImage?
var title: String?
let primaryAction: UIAction?
var menu: UIMenu?
let accessibilityLabel: String

switch type {
Expand Down Expand Up @@ -548,7 +547,7 @@ final class ItemsViewController: UIViewController {
}
}

let item = UIBarButtonItem(title: title, image: image, primaryAction: primaryAction, menu: menu)
let item = UIBarButtonItem(title: title, image: image, primaryAction: primaryAction)
item.tag = type.rawValue
item.accessibilityLabel = accessibilityLabel
return item
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -953,12 +953,14 @@ extension PDFDocumentViewController: UIPencilInteractionDelegate {
let color = viewModel.state.toolColors[previous]
toggle(annotationTool: previous, color: color, tappedWithStylus: true)

case .showColorPalette, .showInkAttributes:
case .showColorPalette, .showInkAttributes, .showContextualPalette:
self.parentDelegate?.showToolOptions()

case .ignore: break
case .runSystemShortcut, .ignore:
break

@unknown default: break
@unknown default:
break
}
}
}
Expand Down