From ffbecbb5ec8e2a7f39df5fe339523b11011ed788 Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Fri, 20 Oct 2023 22:16:15 +0200 Subject: [PATCH 01/24] Update ios-audiobooktoolkit module SHA - fix chapter title layout --- ios-audiobooktoolkit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios-audiobooktoolkit b/ios-audiobooktoolkit index af8d502ca..ae35af255 160000 --- a/ios-audiobooktoolkit +++ b/ios-audiobooktoolkit @@ -1 +1 @@ -Subproject commit af8d502ca5979d1a9d54bd6f7891ac25075b1cb2 +Subproject commit ae35af255de778cf413a212925ef195b8267d300 From 666d80c48e0c7ee82ed7bcdeb35db538d534905d Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Wed, 25 Oct 2023 13:40:44 +0200 Subject: [PATCH 02/24] Update submodules SHA --- ios-audiobooktoolkit | 2 +- ios-drm-audioengine | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ios-audiobooktoolkit b/ios-audiobooktoolkit index ae35af255..e6d851a51 160000 --- a/ios-audiobooktoolkit +++ b/ios-audiobooktoolkit @@ -1 +1 @@ -Subproject commit ae35af255de778cf413a212925ef195b8267d300 +Subproject commit e6d851a51d89840ccb4f8808223f476ad88d5671 diff --git a/ios-drm-audioengine b/ios-drm-audioengine index c20654105..ed026f0a2 160000 --- a/ios-drm-audioengine +++ b/ios-drm-audioengine @@ -1 +1 @@ -Subproject commit c206541059f9e6412f3e0ccf45943ad75bc9895c +Subproject commit ed026f0a2342a4f59067be4a8569430df73d9063 From 90cb926e22f9bca74a78058d7c5216c94ee65957 Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Wed, 25 Oct 2023 13:42:08 +0200 Subject: [PATCH 03/24] Access isLoading from the main queue (found while debugging an audiobook behaviour) --- Palace/MyBooks/MyBooks/MyBooksViewModel.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Palace/MyBooks/MyBooks/MyBooksViewModel.swift b/Palace/MyBooks/MyBooks/MyBooksViewModel.swift index 160d6cd17..9f45eedc0 100644 --- a/Palace/MyBooks/MyBooks/MyBooksViewModel.swift +++ b/Palace/MyBooks/MyBooks/MyBooksViewModel.swift @@ -110,7 +110,9 @@ class MyBooksViewModel: ObservableObject { } @objc private func stopLoading() { - isLoading.toggle() + DispatchQueue.main.async { + self.isLoading.toggle() + } } @objc private func bookRegistryDidChange() { From 5878346ce68a796f7db5f51c4f53c4aac6182e54 Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Wed, 25 Oct 2023 18:38:22 +0200 Subject: [PATCH 04/24] Enable push notifications --- Palace/AppInfrastructure/TPPAppDelegate.swift | 4 +- ...DeveloperSettingsTableViewController.swift | 48 ++----------------- 2 files changed, 4 insertions(+), 48 deletions(-) diff --git a/Palace/AppInfrastructure/TPPAppDelegate.swift b/Palace/AppInfrastructure/TPPAppDelegate.swift index 39591ea60..ef656b6a0 100644 --- a/Palace/AppInfrastructure/TPPAppDelegate.swift +++ b/Palace/AppInfrastructure/TPPAppDelegate.swift @@ -70,9 +70,7 @@ class TPPAppDelegate: UIResponder, UIApplicationDelegate { _ = TPPBookRegistry.shared // Push Notificatoins - // TODO: Enable push notifications once they are fully tested here - // Disabling because of PP-473 -// NotificationService.shared.setupPushNotifications() + NotificationService.shared.setupPushNotifications() } // TODO: This method is deprecated, we should migrate to BGAppRefreshTask in the BackgroundTasks framework instead diff --git a/Palace/Settings/DeveloperSettings/TPPDeveloperSettingsTableViewController.swift b/Palace/Settings/DeveloperSettings/TPPDeveloperSettingsTableViewController.swift index ca9ca8a43..cccf722ee 100644 --- a/Palace/Settings/DeveloperSettings/TPPDeveloperSettingsTableViewController.swift +++ b/Palace/Settings/DeveloperSettings/TPPDeveloperSettingsTableViewController.swift @@ -15,7 +15,6 @@ import Foundation private let betaLibraryCellIdentifier = "betaLibraryCell" private let lcpPassphraseCellIdentifier = "lcpPassphraseCell" private let clearCacheCellIdentifier = "clearCacheCell" - private let enablePushNotificationsCellIdentifier = "enablePushNotificationsCell" private var pushNotificationsStatus = false @@ -35,15 +34,7 @@ import Foundation @objc func enterLCPPassphraseSwitchDidChange(sender: UISwitch) { TPPSettings.shared.enterLCPPassphraseManually = sender.isOn } - - @objc func enablePushNotificationsDidChange(sender: UISwitch) { - if sender.isOn { - NotificationService.shared.setupPushNotifications { _ in - self.updatePushNotificationStatus() - } - } - } - + // MARK:- UIViewController override func loadView() { @@ -58,33 +49,13 @@ import Foundation self.tableView.register(UITableViewCell.self, forCellReuseIdentifier: betaLibraryCellIdentifier) self.tableView.register(UITableViewCell.self, forCellReuseIdentifier: lcpPassphraseCellIdentifier) self.tableView.register(UITableViewCell.self, forCellReuseIdentifier: clearCacheCellIdentifier) - self.tableView.register(UITableViewCell.self, forCellReuseIdentifier: enablePushNotificationsCellIdentifier) - - updatePushNotificationStatus() - NotificationCenter.default.addObserver(forName: UIApplication.didBecomeActiveNotification, object: nil, queue: .main) { _ in - self.updatePushNotificationStatus() - } - } - - deinit { - NotificationCenter.default.removeObserver(self, name: UIApplication.didBecomeActiveNotification, object: nil) - } - - // Gets push notifications authorization status and updates the view - private func updatePushNotificationStatus() { - NotificationService.shared.getNotificationStatus { areEnabled in - DispatchQueue.main.async { - self.pushNotificationsStatus = areEnabled - self.tableView.reloadData() - } - } } // MARK:- UITableViewDataSource func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { switch Section(rawValue: section)! { - case .librarySettings: return 3 + case .librarySettings: return 2 default: return 1 } } @@ -98,8 +69,7 @@ import Foundation case .librarySettings: switch indexPath.row { case 0: return cellForBetaLibraries() - case 1: return cellForLCPPassphrase() - default: return cellForPushNotifications() + default: return cellForLCPPassphrase() } case .libraryRegistryDebugging: return cellForCustomRegsitry() case .dataManagement: return cellForClearCache() @@ -142,18 +112,6 @@ import Foundation return cell } - private func cellForPushNotifications() -> UITableViewCell { - let cell = tableView.dequeueReusableCell(withIdentifier: enablePushNotificationsCellIdentifier)! - cell.selectionStyle = .none - cell.textLabel?.text = "Enable Push Notifications" - cell.textLabel?.adjustsFontSizeToFitWidth = true - cell.textLabel?.minimumScaleFactor = 0.5 - let pushNotificationSwitch = createSwitch(isOn: pushNotificationsStatus, action: #selector(enablePushNotificationsDidChange)) - pushNotificationSwitch.isEnabled = !pushNotificationsStatus - cell.accessoryView = pushNotificationSwitch - return cell - } - private func cellForCustomRegsitry() -> UITableViewCell { let cell = TPPRegistryDebuggingCell() cell.delegate = self From e1cdb472e5234c82e3bc7e34abf02ee21bf5307b Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Wed, 25 Oct 2023 19:19:05 +0200 Subject: [PATCH 05/24] Bump project build number --- Palace.xcodeproj/project.pbxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Palace.xcodeproj/project.pbxproj b/Palace.xcodeproj/project.pbxproj index d6a185e9f..c2600d9a1 100644 --- a/Palace.xcodeproj/project.pbxproj +++ b/Palace.xcodeproj/project.pbxproj @@ -4642,7 +4642,7 @@ CODE_SIGN_IDENTITY = "Apple Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 210; + CURRENT_PROJECT_VERSION = 211; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4699,7 +4699,7 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR; CODE_SIGN_ENTITLEMENTS = Palace/SimplyE.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 210; + CURRENT_PROJECT_VERSION = 211; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4883,7 +4883,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 210; + CURRENT_PROJECT_VERSION = 211; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4943,7 +4943,7 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR; CODE_SIGN_ENTITLEMENTS = Palace/SimplyE.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 210; + CURRENT_PROJECT_VERSION = 211; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; From bbdd20fe016cb4ba04981b78901198ab737dacc0 Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Thu, 26 Oct 2023 18:13:16 +0200 Subject: [PATCH 06/24] Try unit tests on macos-13-xl --- .github/workflows/unit-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-testing.yml b/.github/workflows/unit-testing.yml index ec98737ed..0783068b5 100644 --- a/.github/workflows/unit-testing.yml +++ b/.github/workflows/unit-testing.yml @@ -2,7 +2,7 @@ name: Unit Tests on: [ pull_request, workflow_dispatch ] jobs: build-and-test: - runs-on: macOS-13 + runs-on: macOS-13-xl steps: - name: Force Xcode 15 run: sudo xcode-select -switch /Applications/Xcode_15.0.app From 0d0b77a58453e2629da8d78a273b33a9da009806 Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Thu, 26 Oct 2023 18:25:32 +0200 Subject: [PATCH 07/24] Try Xcode 13.0.1 --- .github/workflows/unit-testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit-testing.yml b/.github/workflows/unit-testing.yml index 0783068b5..97b7d30b8 100644 --- a/.github/workflows/unit-testing.yml +++ b/.github/workflows/unit-testing.yml @@ -2,10 +2,10 @@ name: Unit Tests on: [ pull_request, workflow_dispatch ] jobs: build-and-test: - runs-on: macOS-13-xl + runs-on: macOS-13 steps: - name: Force Xcode 15 - run: sudo xcode-select -switch /Applications/Xcode_15.0.app + run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app - name: Checkout main repo and submodules uses: actions/checkout@v3 with: From 17a6517f0b935000381ae2a813db83a3f1c316bf Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Thu, 26 Oct 2023 20:50:51 +0200 Subject: [PATCH 08/24] Trying a 50 s timeout --- PalaceTests/TPPSignInBusinessLogicTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PalaceTests/TPPSignInBusinessLogicTests.swift b/PalaceTests/TPPSignInBusinessLogicTests.swift index 00efcb9f8..30bbeb788 100644 --- a/PalaceTests/TPPSignInBusinessLogicTests.swift +++ b/PalaceTests/TPPSignInBusinessLogicTests.swift @@ -197,6 +197,6 @@ class TPPSignInBusinessLogicTests: XCTestCase { businessLogic.logIn() XCTAssertTrue(businessLogic.isValidatingCredentials) - wait(for: [expect], timeout: 5) + wait(for: [expect], timeout: 50) } } From d044b558a456944619fb3e2093c45f71d01639fd Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Thu, 26 Oct 2023 23:07:13 +0200 Subject: [PATCH 09/24] Trying -xl again --- .github/workflows/unit-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-testing.yml b/.github/workflows/unit-testing.yml index 97b7d30b8..940703234 100644 --- a/.github/workflows/unit-testing.yml +++ b/.github/workflows/unit-testing.yml @@ -2,7 +2,7 @@ name: Unit Tests on: [ pull_request, workflow_dispatch ] jobs: build-and-test: - runs-on: macOS-13 + runs-on: macOS-13-xl steps: - name: Force Xcode 15 run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app From d5942b72d559f1eb0704ac387602bcba315e7f2b Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Fri, 27 Oct 2023 17:40:41 +0200 Subject: [PATCH 10/24] Re-enable tests --- Palace/Accounts/Library/Account.swift | 5 +- PalaceTests/OPDS2CatalogsFeedTests.swift | 276 +++++++++--------- PalaceTests/TPPSignInBusinessLogicTests.swift | 2 +- 3 files changed, 141 insertions(+), 142 deletions(-) diff --git a/Palace/Accounts/Library/Account.swift b/Palace/Accounts/Library/Account.swift index 116d58c1c..300fdf247 100644 --- a/Palace/Accounts/Library/Account.swift +++ b/Palace/Accounts/Library/Account.swift @@ -424,7 +424,10 @@ protocol AccountLogoDelegate: AnyObject { homePageUrl = publication.links.first(where: { $0.rel == "alternate" })?.href super.init() - loadLogo(imageURL: publication.thumbnailURL) + + DispatchQueue.main.async { + self.loadLogo(imageURL: publication.thumbnailURL) + } } /// Load authentication documents from the network or cache. diff --git a/PalaceTests/OPDS2CatalogsFeedTests.swift b/PalaceTests/OPDS2CatalogsFeedTests.swift index e48d37cab..82fc46060 100644 --- a/PalaceTests/OPDS2CatalogsFeedTests.swift +++ b/PalaceTests/OPDS2CatalogsFeedTests.swift @@ -70,146 +70,142 @@ class OPDS2CatalogsFeedTests: XCTestCase { XCTAssertEqual(errors, []) } + func testInitAccountsWithPublication() { + do { + let data = try Data(contentsOf: testFeedUrl) + let feed = try OPDS2CatalogsFeed.fromData(data) + + let gpl = Account(publication: feed.catalogs.first(where: { $0.metadata.title == "Glendora Public Library" })!) + let acl = Account(publication: feed.catalogs.first(where: { $0.metadata.title == "Alameda County Library" })!) + let dpl = Account(publication: feed.catalogs.first(where: { $0.metadata.title == "Digital Public Library of America" })!) + let nypl = Account(publication: feed.catalogs.first(where: { $0.metadata.title == "The New York Public Library" })!) + + XCTAssertEqual(gpl.name, "Glendora Public Library") + XCTAssertEqual(gpl.subtitle, "Connecting people to the world of ideas, information, and imagination") + XCTAssertEqual(gpl.uuid, "urn:uuid:a7bddadc-91c7-45a3-a642-dfd137480a22") + XCTAssertEqual(gpl.catalogUrl, "http://califa108.simplye-ca.org/CAGLEN/") + XCTAssertEqual(gpl.supportEmail!.rawValue, "library@glendoralibrary.org") + XCTAssertEqual(gpl.authenticationDocumentUrl, "http://califa108.simplye-ca.org/CAGLEN/authentication_document") + XCTAssertNotNil(gpl.logo) + + XCTAssertEqual(acl.name, "Alameda County Library") + XCTAssertEqual(acl.subtitle, "Infinite possibilities") + XCTAssertEqual(acl.uuid, "urn:uuid:bce4c73c-9d0b-4eac-92e1-1405bcee9367") + XCTAssertEqual(acl.catalogUrl, "http://acl.simplye-ca.org/CALMDA") + XCTAssertEqual(acl.supportEmail!.rawValue, "simplye@aclibrary.org") + XCTAssertEqual(acl.authenticationDocumentUrl, "http://acl.simplye-ca.org/CALMDA/authentication_document") + XCTAssertNotNil(acl.logo) + + XCTAssertEqual(dpl.name, "Digital Public Library of America") + XCTAssertEqual(dpl.subtitle, "Popular books free to download and keep, handpicked by librarians across the US.") + XCTAssertEqual(dpl.uuid, "urn:uuid:6b849570-070f-43b4-9dcc-7ebb4bca292e") + XCTAssertEqual(dpl.catalogUrl, "http://openbookshelf.dp.la/OB/groups/3") + XCTAssertEqual(dpl.supportEmail!.rawValue, "ebooks@dp.la") + XCTAssertEqual(dpl.authenticationDocumentUrl, "http://openbookshelf.dp.la/OB/authentication_document") + XCTAssertNotNil(dpl.logo) + + XCTAssertEqual(nypl.name, "The New York Public Library") + XCTAssertEqual(nypl.subtitle, "Inspiring lifelong learning, advancing knowledge, and strengthening our communities.") + XCTAssertEqual(nypl.uuid, "urn:uuid:065c0c11-0d0f-42a3-82e4-277b18786949") + XCTAssertEqual(nypl.catalogUrl, "https://circulation.librarysimplified.org/NYNYPL/") + XCTAssertEqual(nypl.supportEmail!.rawValue, "simplyehelp@nypl.org") + XCTAssertEqual(nypl.authenticationDocumentUrl, "https://circulation.librarysimplified.org/NYNYPL/authentication_document") + XCTAssertNotNil(nypl.logo) + + } catch (let error) { + XCTAssert(false, error.localizedDescription) + } + } - // TODO: Refactor code to remove logo loading in the init() function - // Otherwise, the test runs indefinitely in Github CI environment - -// func testInitAccountsWithPublication() { -// do { -// let data = try Data(contentsOf: testFeedUrl) -// let feed = try OPDS2CatalogsFeed.fromData(data) -// -// let gpl = Account(publication: feed.catalogs.first(where: { $0.metadata.title == "Glendora Public Library" })!) -// let acl = Account(publication: feed.catalogs.first(where: { $0.metadata.title == "Alameda County Library" })!) -// let dpl = Account(publication: feed.catalogs.first(where: { $0.metadata.title == "Digital Public Library of America" })!) -// let nypl = Account(publication: feed.catalogs.first(where: { $0.metadata.title == "The New York Public Library" })!) -// -// XCTAssertEqual(gpl.name, "Glendora Public Library") -// XCTAssertEqual(gpl.subtitle, "Connecting people to the world of ideas, information, and imagination") -// XCTAssertEqual(gpl.uuid, "urn:uuid:a7bddadc-91c7-45a3-a642-dfd137480a22") -// XCTAssertEqual(gpl.catalogUrl, "http://califa108.simplye-ca.org/CAGLEN/") -// XCTAssertEqual(gpl.supportEmail!.rawValue, "library@glendoralibrary.org") -// XCTAssertEqual(gpl.authenticationDocumentUrl, "http://califa108.simplye-ca.org/CAGLEN/authentication_document") -// XCTAssertNotNil(gpl.logo) -// -// XCTAssertEqual(acl.name, "Alameda County Library") -// XCTAssertEqual(acl.subtitle, "Infinite possibilities") -// XCTAssertEqual(acl.uuid, "urn:uuid:bce4c73c-9d0b-4eac-92e1-1405bcee9367") -// XCTAssertEqual(acl.catalogUrl, "http://acl.simplye-ca.org/CALMDA") -// XCTAssertEqual(acl.supportEmail!.rawValue, "simplye@aclibrary.org") -// XCTAssertEqual(acl.authenticationDocumentUrl, "http://acl.simplye-ca.org/CALMDA/authentication_document") -// XCTAssertNotNil(acl.logo) -// -// XCTAssertEqual(dpl.name, "Digital Public Library of America") -// XCTAssertEqual(dpl.subtitle, "Popular books free to download and keep, handpicked by librarians across the US.") -// XCTAssertEqual(dpl.uuid, "urn:uuid:6b849570-070f-43b4-9dcc-7ebb4bca292e") -// XCTAssertEqual(dpl.catalogUrl, "http://openbookshelf.dp.la/OB/groups/3") -// XCTAssertEqual(dpl.supportEmail!.rawValue, "ebooks@dp.la") -// XCTAssertEqual(dpl.authenticationDocumentUrl, "http://openbookshelf.dp.la/OB/authentication_document") -// XCTAssertNotNil(dpl.logo) -// -// XCTAssertEqual(nypl.name, "The New York Public Library") -// XCTAssertEqual(nypl.subtitle, "Inspiring lifelong learning, advancing knowledge, and strengthening our communities.") -// XCTAssertEqual(nypl.uuid, "urn:uuid:065c0c11-0d0f-42a3-82e4-277b18786949") -// XCTAssertEqual(nypl.catalogUrl, "https://circulation.librarysimplified.org/NYNYPL/") -// XCTAssertEqual(nypl.supportEmail!.rawValue, "simplyehelp@nypl.org") -// XCTAssertEqual(nypl.authenticationDocumentUrl, "https://circulation.librarysimplified.org/NYNYPL/authentication_document") -// XCTAssertNotNil(nypl.logo) -// -// } catch (let error) { -// XCTAssert(false, error.localizedDescription) -// } -// } -// -// func testAccountSetAuthenticationDocument() { -// do { -// let data = try Data(contentsOf: testFeedUrl) -// let feed = try OPDS2CatalogsFeed.fromData(data) -// -// let gpl = Account(publication: feed.catalogs.first(where: { $0.metadata.title == "Glendora Public Library" })!) -// let acl = Account(publication: feed.catalogs.first(where: { $0.metadata.title == "Alameda County Library" })!) -// let dpl = Account(publication: feed.catalogs.first(where: { $0.metadata.title == "Digital Public Library of America" })!) -// let nypl = Account(publication: feed.catalogs.first(where: { $0.metadata.title == "The New York Public Library" })!) -// -// gpl.authenticationDocument = try OPDS2AuthenticationDocument.fromData(try Data(contentsOf: gplAuthUrl)) -// acl.authenticationDocument = try OPDS2AuthenticationDocument.fromData(try Data(contentsOf: aclAuthUrl)) -// dpl.authenticationDocument = try OPDS2AuthenticationDocument.fromData(try Data(contentsOf: dplAuthUrl)) -// nypl.authenticationDocument = try OPDS2AuthenticationDocument.fromData(try Data(contentsOf: nyplAuthUrl)) -// -// XCTAssertEqual(gpl.details?.defaultAuth?.needsAuth, true) -// XCTAssertEqual(gpl.details?.uuid, gpl.uuid) -// XCTAssertEqual(gpl.details?.supportsReservations, true) -// XCTAssertEqual(gpl.details?.userProfileUrl, "http://califa108.simplye-ca.org/CAGLEN/patrons/me/") -// XCTAssertEqual(gpl.details?.supportsSimplyESync, true) -// XCTAssertEqual(gpl.details?.signUpUrl, URL(string:"https://catalog.ci.glendora.ca.us/polaris/patronaccount/selfregister.aspx?ctx=3.1033.0.0.1")) -// XCTAssertEqual(gpl.details?.supportsCardCreator, false) -// XCTAssertEqual(gpl.details?.getLicenseURL(.privacyPolicy), URL(string: "http://califa.org/privacy-policy")) -// XCTAssertEqual(gpl.details?.getLicenseURL(.eula), URL(string: "https://www.librarysimplified.org/EULA/")) -// XCTAssertEqual(gpl.details?.getLicenseURL(.contentLicenses), URL(string: "http://califa.org/third-party-content")) -// XCTAssertEqual(gpl.details?.getLicenseURL(.acknowledgements), nil) -// XCTAssertEqual(gpl.details?.mainColor, "blue") -// XCTAssertEqual(gpl.details?.defaultAuth?.supportsBarcodeScanner, true) -// XCTAssertEqual(gpl.details?.defaultAuth?.supportsBarcodeDisplay, true) -// XCTAssertEqual(gpl.details?.defaultAuth?.patronIDKeyboard, .numeric) -// XCTAssertEqual(gpl.details?.defaultAuth?.pinKeyboard, .numeric) -// XCTAssertEqual(gpl.details?.defaultAuth?.authPasscodeLength, 99) -// -// XCTAssertEqual(acl.details?.defaultAuth?.needsAuth, true) -// XCTAssertEqual(acl.details?.uuid, acl.uuid) -// XCTAssertEqual(acl.details?.supportsReservations, true) -// XCTAssertEqual(acl.details?.userProfileUrl, "http://acl.simplye-ca.org/CALMDA/patrons/me/") -// XCTAssertEqual(acl.details?.supportsSimplyESync, true) -// XCTAssertEqual(acl.details?.signUpUrl, nil) -// XCTAssertEqual(acl.details?.supportsCardCreator, false) -// XCTAssertEqual(acl.details?.getLicenseURL(.privacyPolicy), URL(string: "http://califa.org/privacy-policy")) -// XCTAssertEqual(acl.details?.getLicenseURL(.eula), URL(string: "https://www.librarysimplified.org/EULA/")) -// XCTAssertEqual(acl.details?.getLicenseURL(.contentLicenses), URL(string: "http://guides.aclibrary.org/TAC")) -// XCTAssertEqual(acl.details?.getLicenseURL(.acknowledgements), nil) -// XCTAssertEqual(acl.details?.mainColor, "lightblue") -// XCTAssertEqual(acl.details?.defaultAuth?.supportsBarcodeScanner, false) -// XCTAssertEqual(acl.details?.defaultAuth?.supportsBarcodeDisplay, false) -// XCTAssertEqual(acl.details?.defaultAuth?.patronIDKeyboard, .numeric) -// XCTAssertEqual(acl.details?.defaultAuth?.pinKeyboard, .standard) -// XCTAssertEqual(acl.details?.defaultAuth?.authPasscodeLength, 99) -// -// XCTAssertEqual(dpl.details?.auths.count, 0) -// XCTAssertNil(dpl.details?.defaultAuth) -// XCTAssertEqual(dpl.details?.uuid, dpl.uuid) -// XCTAssertEqual(dpl.details?.supportsReservations, false) -// XCTAssertEqual(dpl.details?.userProfileUrl, "http://openbookshelf.dp.la/OB/patrons/me/") -// XCTAssertEqual(dpl.details?.supportsSimplyESync, true) -// XCTAssertEqual(dpl.details?.signUpUrl, nil) -// XCTAssertEqual(dpl.details?.supportsCardCreator, false) -// XCTAssertEqual(dpl.details?.getLicenseURL(.privacyPolicy), nil) -// XCTAssertEqual(dpl.details?.getLicenseURL(.eula), nil) -// XCTAssertEqual(dpl.details?.getLicenseURL(.contentLicenses), nil) -// XCTAssertEqual(dpl.details?.getLicenseURL(.acknowledgements), nil) -// XCTAssertEqual(dpl.details?.mainColor, "cyan") -// -// XCTAssertEqual(nypl.details?.defaultAuth?.needsAuth, true) -// XCTAssertEqual(nypl.details?.uuid, nypl.uuid) -// XCTAssertEqual(nypl.details?.supportsReservations, true) -// XCTAssertEqual(nypl.details?.userProfileUrl, "https://circulation.librarysimplified.org/NYNYPL/patrons/me/") -// XCTAssertEqual(nypl.details?.supportsSimplyESync, true) -// XCTAssertNotNil(nypl.details?.signUpUrl) -// XCTAssertEqual(nypl.details?.signUpUrl, -// URL(string: "https://patrons.librarysimplified.org/")) -// XCTAssert(nypl.details?.supportsCardCreator ?? false) -// XCTAssertEqual(nypl.details?.getLicenseURL(.privacyPolicy), -// URL(string: "https://www.nypl.org/help/about-nypl/legal-notices/privacy-policy")) -// XCTAssertEqual(nypl.details?.getLicenseURL(.eula), URL(string: "https://librarysimplified.org/EULA/")) -// XCTAssertEqual(nypl.details?.getLicenseURL(.contentLicenses), -// URL(string: "https://librarysimplified.org/licenses/")) -// XCTAssertEqual(nypl.details?.mainColor, "red") -// XCTAssertEqual(nypl.details?.defaultAuth?.supportsBarcodeScanner, true) -// XCTAssertEqual(nypl.details?.defaultAuth?.supportsBarcodeDisplay, true) -// XCTAssertEqual(nypl.details?.defaultAuth?.patronIDKeyboard, .standard) -// XCTAssertEqual(nypl.details?.defaultAuth?.pinKeyboard, .standard) -// XCTAssertEqual(nypl.details?.defaultAuth?.authPasscodeLength, 12) -// -// } catch (let error) { -// XCTAssert(false, error.localizedDescription) -// } -// } + func testAccountSetAuthenticationDocument() { + do { + let data = try Data(contentsOf: testFeedUrl) + let feed = try OPDS2CatalogsFeed.fromData(data) + + let gpl = Account(publication: feed.catalogs.first(where: { $0.metadata.title == "Glendora Public Library" })!) + let acl = Account(publication: feed.catalogs.first(where: { $0.metadata.title == "Alameda County Library" })!) + let dpl = Account(publication: feed.catalogs.first(where: { $0.metadata.title == "Digital Public Library of America" })!) + let nypl = Account(publication: feed.catalogs.first(where: { $0.metadata.title == "The New York Public Library" })!) + + gpl.authenticationDocument = try OPDS2AuthenticationDocument.fromData(try Data(contentsOf: gplAuthUrl)) + acl.authenticationDocument = try OPDS2AuthenticationDocument.fromData(try Data(contentsOf: aclAuthUrl)) + dpl.authenticationDocument = try OPDS2AuthenticationDocument.fromData(try Data(contentsOf: dplAuthUrl)) + nypl.authenticationDocument = try OPDS2AuthenticationDocument.fromData(try Data(contentsOf: nyplAuthUrl)) + + XCTAssertEqual(gpl.details?.defaultAuth?.needsAuth, true) + XCTAssertEqual(gpl.details?.uuid, gpl.uuid) + XCTAssertEqual(gpl.details?.supportsReservations, true) + XCTAssertEqual(gpl.details?.userProfileUrl, "http://califa108.simplye-ca.org/CAGLEN/patrons/me/") + XCTAssertEqual(gpl.details?.supportsSimplyESync, true) + XCTAssertEqual(gpl.details?.signUpUrl, URL(string:"https://catalog.ci.glendora.ca.us/polaris/patronaccount/selfregister.aspx?ctx=3.1033.0.0.1")) + XCTAssertEqual(gpl.details?.supportsCardCreator, false) + XCTAssertEqual(gpl.details?.getLicenseURL(.privacyPolicy), URL(string: "http://califa.org/privacy-policy")) + XCTAssertEqual(gpl.details?.getLicenseURL(.eula), URL(string: "https://www.librarysimplified.org/EULA/")) + XCTAssertEqual(gpl.details?.getLicenseURL(.contentLicenses), URL(string: "http://califa.org/third-party-content")) + XCTAssertEqual(gpl.details?.getLicenseURL(.acknowledgements), nil) + XCTAssertEqual(gpl.details?.mainColor, "blue") + XCTAssertEqual(gpl.details?.defaultAuth?.supportsBarcodeScanner, true) + XCTAssertEqual(gpl.details?.defaultAuth?.supportsBarcodeDisplay, true) + XCTAssertEqual(gpl.details?.defaultAuth?.patronIDKeyboard, .numeric) + XCTAssertEqual(gpl.details?.defaultAuth?.pinKeyboard, .numeric) + XCTAssertEqual(gpl.details?.defaultAuth?.authPasscodeLength, 99) + + XCTAssertEqual(acl.details?.defaultAuth?.needsAuth, true) + XCTAssertEqual(acl.details?.uuid, acl.uuid) + XCTAssertEqual(acl.details?.supportsReservations, true) + XCTAssertEqual(acl.details?.userProfileUrl, "http://acl.simplye-ca.org/CALMDA/patrons/me/") + XCTAssertEqual(acl.details?.supportsSimplyESync, true) + XCTAssertEqual(acl.details?.signUpUrl, nil) + XCTAssertEqual(acl.details?.supportsCardCreator, false) + XCTAssertEqual(acl.details?.getLicenseURL(.privacyPolicy), URL(string: "http://califa.org/privacy-policy")) + XCTAssertEqual(acl.details?.getLicenseURL(.eula), URL(string: "https://www.librarysimplified.org/EULA/")) + XCTAssertEqual(acl.details?.getLicenseURL(.contentLicenses), URL(string: "http://guides.aclibrary.org/TAC")) + XCTAssertEqual(acl.details?.getLicenseURL(.acknowledgements), nil) + XCTAssertEqual(acl.details?.mainColor, "lightblue") + XCTAssertEqual(acl.details?.defaultAuth?.supportsBarcodeScanner, false) + XCTAssertEqual(acl.details?.defaultAuth?.supportsBarcodeDisplay, false) + XCTAssertEqual(acl.details?.defaultAuth?.patronIDKeyboard, .numeric) + XCTAssertEqual(acl.details?.defaultAuth?.pinKeyboard, .standard) + XCTAssertEqual(acl.details?.defaultAuth?.authPasscodeLength, 99) + + XCTAssertEqual(dpl.details?.auths.count, 0) + XCTAssertNil(dpl.details?.defaultAuth) + XCTAssertEqual(dpl.details?.uuid, dpl.uuid) + XCTAssertEqual(dpl.details?.supportsReservations, false) + XCTAssertEqual(dpl.details?.userProfileUrl, "http://openbookshelf.dp.la/OB/patrons/me/") + XCTAssertEqual(dpl.details?.supportsSimplyESync, true) + XCTAssertEqual(dpl.details?.signUpUrl, nil) + XCTAssertEqual(dpl.details?.supportsCardCreator, false) + XCTAssertEqual(dpl.details?.getLicenseURL(.privacyPolicy), nil) + XCTAssertEqual(dpl.details?.getLicenseURL(.eula), nil) + XCTAssertEqual(dpl.details?.getLicenseURL(.contentLicenses), nil) + XCTAssertEqual(dpl.details?.getLicenseURL(.acknowledgements), nil) + XCTAssertEqual(dpl.details?.mainColor, "cyan") + + XCTAssertEqual(nypl.details?.defaultAuth?.needsAuth, true) + XCTAssertEqual(nypl.details?.uuid, nypl.uuid) + XCTAssertEqual(nypl.details?.supportsReservations, true) + XCTAssertEqual(nypl.details?.userProfileUrl, "https://circulation.librarysimplified.org/NYNYPL/patrons/me/") + XCTAssertEqual(nypl.details?.supportsSimplyESync, true) + XCTAssertNotNil(nypl.details?.signUpUrl) + XCTAssertEqual(nypl.details?.signUpUrl, + URL(string: "https://patrons.librarysimplified.org/")) + XCTAssert(nypl.details?.supportsCardCreator ?? false) + XCTAssertEqual(nypl.details?.getLicenseURL(.privacyPolicy), + URL(string: "https://www.nypl.org/help/about-nypl/legal-notices/privacy-policy")) + XCTAssertEqual(nypl.details?.getLicenseURL(.eula), URL(string: "https://librarysimplified.org/EULA/")) + XCTAssertEqual(nypl.details?.getLicenseURL(.contentLicenses), + URL(string: "https://librarysimplified.org/licenses/")) + XCTAssertEqual(nypl.details?.mainColor, "red") + XCTAssertEqual(nypl.details?.defaultAuth?.supportsBarcodeScanner, true) + XCTAssertEqual(nypl.details?.defaultAuth?.supportsBarcodeDisplay, true) + XCTAssertEqual(nypl.details?.defaultAuth?.patronIDKeyboard, .standard) + XCTAssertEqual(nypl.details?.defaultAuth?.pinKeyboard, .standard) + XCTAssertEqual(nypl.details?.defaultAuth?.authPasscodeLength, 12) + + } catch (let error) { + XCTAssert(false, error.localizedDescription) + } + } } diff --git a/PalaceTests/TPPSignInBusinessLogicTests.swift b/PalaceTests/TPPSignInBusinessLogicTests.swift index 30bbeb788..00efcb9f8 100644 --- a/PalaceTests/TPPSignInBusinessLogicTests.swift +++ b/PalaceTests/TPPSignInBusinessLogicTests.swift @@ -197,6 +197,6 @@ class TPPSignInBusinessLogicTests: XCTestCase { businessLogic.logIn() XCTAssertTrue(businessLogic.isValidatingCredentials) - wait(for: [expect], timeout: 50) + wait(for: [expect], timeout: 5) } } From ee37bd510bdaaf5fe2fbbb5649ec811238db6604 Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Fri, 27 Oct 2023 18:09:49 +0200 Subject: [PATCH 11/24] Trying to run tests on a normal macOS 13 worker --- .github/workflows/unit-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-testing.yml b/.github/workflows/unit-testing.yml index 940703234..97b7d30b8 100644 --- a/.github/workflows/unit-testing.yml +++ b/.github/workflows/unit-testing.yml @@ -2,7 +2,7 @@ name: Unit Tests on: [ pull_request, workflow_dispatch ] jobs: build-and-test: - runs-on: macOS-13-xl + runs-on: macOS-13 steps: - name: Force Xcode 15 run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app From 158f42e4c25a1d6fad48b3df0644a046519b0f22 Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Fri, 27 Oct 2023 19:30:26 +0200 Subject: [PATCH 12/24] Update Xcode version in Github workflows --- .github/workflows/non-drm-build.yml | 2 +- .github/workflows/release-on-merge.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/upload-on-merge.yml | 4 ++-- .github/workflows/upload.yml | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/non-drm-build.yml b/.github/workflows/non-drm-build.yml index f0d76dc30..de4a32061 100644 --- a/.github/workflows/non-drm-build.yml +++ b/.github/workflows/non-drm-build.yml @@ -5,7 +5,7 @@ jobs: runs-on: macOS-13 steps: - name: Force Xcode 15 - run: sudo xcode-select -switch /Applications/Xcode_15.0.app + run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app - name: Checkout main repo uses: actions/checkout@v3 - name: Set up repo for nonDRM build diff --git a/.github/workflows/release-on-merge.yml b/.github/workflows/release-on-merge.yml index ba4e1bc58..08fa7bbb8 100644 --- a/.github/workflows/release-on-merge.yml +++ b/.github/workflows/release-on-merge.yml @@ -9,7 +9,7 @@ jobs: runs-on: macOS-13 steps: - name: Force Xcode 15 - run: sudo xcode-select -switch /Applications/Xcode_15.0.app + run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app - name: Checkout main repo and submodules uses: actions/checkout@v3 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6de00d5ff..f92332c2d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,7 @@ jobs: runs-on: macOS-13 steps: - name: Force Xcode 15 - run: sudo xcode-select -switch /Applications/Xcode_15.0.app + run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app - name: Checkout main repo and submodules uses: actions/checkout@v3 with: diff --git a/.github/workflows/upload-on-merge.yml b/.github/workflows/upload-on-merge.yml index 16b71ec96..15e93f8f7 100644 --- a/.github/workflows/upload-on-merge.yml +++ b/.github/workflows/upload-on-merge.yml @@ -9,7 +9,7 @@ jobs: runs-on: macOS-13 steps: - name: Force Xcode 15 - run: sudo xcode-select -switch /Applications/Xcode_15.0.app + run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app - name: Checkout main repo and submodules uses: actions/checkout@v3 with: @@ -28,7 +28,7 @@ jobs: if: github.event.pull_request.merged == true && needs.check-version.outputs.should_upload == '1' steps: - name: Force Xcode 15 - run: sudo xcode-select -switch /Applications/Xcode_15.0.app + run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app - name: Checkout main repo and submodules uses: actions/checkout@v3 with: diff --git a/.github/workflows/upload.yml b/.github/workflows/upload.yml index ed236904d..c76622414 100644 --- a/.github/workflows/upload.yml +++ b/.github/workflows/upload.yml @@ -5,7 +5,7 @@ jobs: runs-on: macOS-13 steps: - name: Force Xcode 15 - run: sudo xcode-select -switch /Applications/Xcode_15.0.app + run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app - name: Checkout main repo and submodules uses: actions/checkout@v3 with: @@ -24,7 +24,7 @@ jobs: if: needs.check-version.outputs.should_upload == '1' steps: - name: Force Xcode 15 - run: sudo xcode-select -switch /Applications/Xcode_15.0.app + run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app - name: Checkout main repo and submodules uses: actions/checkout@v3 with: From 2a7cad117044efde37a86287deb058cd233d8fe3 Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Fri, 27 Oct 2023 21:15:35 +0200 Subject: [PATCH 13/24] Update recommended Crashlytics paths --- Palace.xcodeproj/project.pbxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Palace.xcodeproj/project.pbxproj b/Palace.xcodeproj/project.pbxproj index d6a185e9f..7f98c2f04 100644 --- a/Palace.xcodeproj/project.pbxproj +++ b/Palace.xcodeproj/project.pbxproj @@ -3628,11 +3628,11 @@ inputFileListPaths = ( ); inputPaths = ( - "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)", - "${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}/GoogleService-Info.plist", - "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}", "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}", + "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME}", "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist", + "$(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/GoogleService-Info.plist", + "$(TARGET_BUILD_DIR)/$(EXECUTABLE_PATH)", ); name = Crashlytics; outputFileListPaths = ( @@ -3641,7 +3641,7 @@ ); runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; - shellScript = "\"${PROJECT_DIR}/scripts/firebase/run\"\n"; + shellScript = "\"${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run\"\n"; }; 73EB0B6E25821DF4006BC997 /* Copy Frameworks (Carthage) */ = { isa = PBXShellScriptBuildPhase; From a6d71e856e9a56670197a5e10042dded451da7d7 Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Mon, 30 Oct 2023 17:42:06 +0100 Subject: [PATCH 14/24] Bump project version number --- Palace.xcodeproj/project.pbxproj | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Palace.xcodeproj/project.pbxproj b/Palace.xcodeproj/project.pbxproj index d6a185e9f..c0ccde257 100644 --- a/Palace.xcodeproj/project.pbxproj +++ b/Palace.xcodeproj/project.pbxproj @@ -4642,7 +4642,7 @@ CODE_SIGN_IDENTITY = "Apple Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 210; + CURRENT_PROJECT_VERSION = 211; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4664,7 +4664,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.33; + MARKETING_VERSION = 1.0.34; PRODUCT_BUNDLE_IDENTIFIER = org.thepalaceproject.palace; PRODUCT_MODULE_NAME = Palace; PRODUCT_NAME = "Palace-noDRM"; @@ -4699,7 +4699,7 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR; CODE_SIGN_ENTITLEMENTS = Palace/SimplyE.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 210; + CURRENT_PROJECT_VERSION = 211; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4721,7 +4721,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.33; + MARKETING_VERSION = 1.0.34; PRODUCT_BUNDLE_IDENTIFIER = org.thepalaceproject.palace; PRODUCT_MODULE_NAME = Palace; PRODUCT_NAME = "Palace-noDRM"; @@ -4883,7 +4883,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 210; + CURRENT_PROJECT_VERSION = 211; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4910,7 +4910,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.33; + MARKETING_VERSION = 1.0.34; PRODUCT_BUNDLE_IDENTIFIER = org.thepalaceproject.palace; PROVISIONING_PROFILE_SPECIFIER = "Ad Hoc"; RUN_CLANG_STATIC_ANALYZER = YES; @@ -4943,7 +4943,7 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR; CODE_SIGN_ENTITLEMENTS = Palace/SimplyE.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 210; + CURRENT_PROJECT_VERSION = 211; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4970,7 +4970,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.33; + MARKETING_VERSION = 1.0.34; PRODUCT_BUNDLE_IDENTIFIER = org.thepalaceproject.palace; PROVISIONING_PROFILE_SPECIFIER = "App Store"; RUN_CLANG_STATIC_ANALYZER = YES; From d05c77df120be61373c27fa0b812f38beaf72b4e Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Mon, 30 Oct 2023 20:33:10 +0100 Subject: [PATCH 15/24] Update submodule SHAs --- ios-audiobooktoolkit | 2 +- ios-drm-audioengine | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ios-audiobooktoolkit b/ios-audiobooktoolkit index e6d851a51..ace661c9c 160000 --- a/ios-audiobooktoolkit +++ b/ios-audiobooktoolkit @@ -1 +1 @@ -Subproject commit e6d851a51d89840ccb4f8808223f476ad88d5671 +Subproject commit ace661c9c9e360fa0b2f0a80ec6c4c4dd3f479aa diff --git a/ios-drm-audioengine b/ios-drm-audioengine index ed026f0a2..a9a912a10 160000 --- a/ios-drm-audioengine +++ b/ios-drm-audioengine @@ -1 +1 @@ -Subproject commit ed026f0a2342a4f59067be4a8569430df73d9063 +Subproject commit a9a912a1048c38d116f288ac30a13ca0bc39619b From ecdd6fcdb2ea29c99dadf43835b59f66f9de438c Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Mon, 30 Oct 2023 22:22:02 +0100 Subject: [PATCH 16/24] Revert build number bump to avoid conflicts --- Palace.xcodeproj/project.pbxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Palace.xcodeproj/project.pbxproj b/Palace.xcodeproj/project.pbxproj index 0b14069ee..7f98c2f04 100644 --- a/Palace.xcodeproj/project.pbxproj +++ b/Palace.xcodeproj/project.pbxproj @@ -4642,7 +4642,7 @@ CODE_SIGN_IDENTITY = "Apple Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 211; + CURRENT_PROJECT_VERSION = 210; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4699,7 +4699,7 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR; CODE_SIGN_ENTITLEMENTS = Palace/SimplyE.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 211; + CURRENT_PROJECT_VERSION = 210; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4883,7 +4883,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 211; + CURRENT_PROJECT_VERSION = 210; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4943,7 +4943,7 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR; CODE_SIGN_ENTITLEMENTS = Palace/SimplyE.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 211; + CURRENT_PROJECT_VERSION = 210; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; From 110332a13ef8aff060d56d02cfdc35f33186b896 Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Tue, 31 Oct 2023 12:33:05 +0100 Subject: [PATCH 17/24] Bump project build number --- Palace.xcodeproj/project.pbxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Palace.xcodeproj/project.pbxproj b/Palace.xcodeproj/project.pbxproj index 9f06f7315..c2a9c92cf 100644 --- a/Palace.xcodeproj/project.pbxproj +++ b/Palace.xcodeproj/project.pbxproj @@ -4642,7 +4642,7 @@ CODE_SIGN_IDENTITY = "Apple Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 211; + CURRENT_PROJECT_VERSION = 212; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4699,7 +4699,7 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR; CODE_SIGN_ENTITLEMENTS = Palace/SimplyE.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 211; + CURRENT_PROJECT_VERSION = 212; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4883,7 +4883,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 211; + CURRENT_PROJECT_VERSION = 212; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4943,7 +4943,7 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR; CODE_SIGN_ENTITLEMENTS = Palace/SimplyE.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 211; + CURRENT_PROJECT_VERSION = 212; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; From 0c95e81bc54bac313477f2db72f72b2344952493 Mon Sep 17 00:00:00 2001 From: mauricecarrier Date: Wed, 1 Nov 2023 22:27:53 -0400 Subject: [PATCH 18/24] [PP-655] Display keyboard on EPub search (#350) * Update EPUBSearchView.swift * Update project.pbxproj * Update project.pbxproj * Update project.pbxproj --- Palace.xcodeproj/project.pbxproj | 20 +++++++------- .../UI/EpubSearchView/EPUBSearchView.swift | 27 ++++++++++++------- 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/Palace.xcodeproj/project.pbxproj b/Palace.xcodeproj/project.pbxproj index c2a9c92cf..543d53cb8 100644 --- a/Palace.xcodeproj/project.pbxproj +++ b/Palace.xcodeproj/project.pbxproj @@ -4537,7 +4537,7 @@ "\"$(SRCROOT)/adobe-rmsdk/xml/uft/public\"", ); INFOPLIST_FILE = PalaceTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -4602,7 +4602,7 @@ "\"$(SRCROOT)/adobe-rmsdk/xml/uft/public\"", ); INFOPLIST_FILE = PalaceTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -4642,7 +4642,7 @@ CODE_SIGN_IDENTITY = "Apple Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 212; + CURRENT_PROJECT_VERSION = 213; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4659,7 +4659,7 @@ "$(inherited)", ); INFOPLIST_FILE = "PalaceConfig/Palace-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -4699,7 +4699,7 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR; CODE_SIGN_ENTITLEMENTS = Palace/SimplyE.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 212; + CURRENT_PROJECT_VERSION = 213; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4716,7 +4716,7 @@ "$(inherited)", ); INFOPLIST_FILE = "PalaceConfig/Palace-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -4883,7 +4883,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 212; + CURRENT_PROJECT_VERSION = 213; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4905,7 +4905,7 @@ "FEATURE_OVERDRIVE=1", ); INFOPLIST_FILE = "PalaceConfig/Palace-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -4943,7 +4943,7 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR; CODE_SIGN_ENTITLEMENTS = Palace/SimplyE.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 212; + CURRENT_PROJECT_VERSION = 213; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4965,7 +4965,7 @@ "FEATURE_OVERDRIVE=1", ); INFOPLIST_FILE = "PalaceConfig/Palace-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/Palace/Reader2/UI/EpubSearchView/EPUBSearchView.swift b/Palace/Reader2/UI/EpubSearchView/EPUBSearchView.swift index 3d279989a..27a1d2707 100644 --- a/Palace/Reader2/UI/EpubSearchView/EPUBSearchView.swift +++ b/Palace/Reader2/UI/EpubSearchView/EPUBSearchView.swift @@ -16,19 +16,12 @@ struct EPUBSearchView: View { @State private var searchQuery: String = "" @State private var debounceSearch: AnyCancellable? - var body: some View { - VStack { - searchBar - listView - } - .onChange(of: searchQuery, perform: search) - .padding() - .ignoresSafeArea(.keyboard) - } + @FocusState private var isSearchFieldFocused: Bool @ViewBuilder private var searchBar: some View { HStack { TextField("\(Strings.Generic.search)...", text: $searchQuery) + .focused($isSearchFieldFocused) // Bind the focus state to the text field Button(action: { searchQuery = "" viewModel.cancelSearch() @@ -42,6 +35,22 @@ struct EPUBSearchView: View { .background(Color(.secondarySystemBackground)) .cornerRadius(8) .padding(.bottom) + .onAppear { + DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { + // This delay ensures that the view is fully loaded before focusing + isSearchFieldFocused = true + } + } + } + + var body: some View { + VStack { + searchBar + listView + } + .onChange(of: searchQuery, perform: search) + .padding() + .ignoresSafeArea(.keyboard) } @ViewBuilder private var listView: some View { From 722667f482e716f8d62f3772fb636df8a18982ac Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Thu, 2 Nov 2023 18:00:31 +0100 Subject: [PATCH 19/24] Update PalaceAudiobookToolkit module SHA --- ios-audiobooktoolkit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios-audiobooktoolkit b/ios-audiobooktoolkit index ace661c9c..6e62d7e33 160000 --- a/ios-audiobooktoolkit +++ b/ios-audiobooktoolkit @@ -1 +1 @@ -Subproject commit ace661c9c9e360fa0b2f0a80ec6c4c4dd3f479aa +Subproject commit 6e62d7e333c30aa9550de67caa5883cf7b9d3437 From 88445509f0f86c4c889fdcba31ad8d97e44ccc2e Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Thu, 2 Nov 2023 18:26:04 +0100 Subject: [PATCH 20/24] Bump project build number --- Palace.xcodeproj/project.pbxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Palace.xcodeproj/project.pbxproj b/Palace.xcodeproj/project.pbxproj index 543d53cb8..05a12f212 100644 --- a/Palace.xcodeproj/project.pbxproj +++ b/Palace.xcodeproj/project.pbxproj @@ -4642,7 +4642,7 @@ CODE_SIGN_IDENTITY = "Apple Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 213; + CURRENT_PROJECT_VERSION = 214; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4699,7 +4699,7 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR; CODE_SIGN_ENTITLEMENTS = Palace/SimplyE.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 213; + CURRENT_PROJECT_VERSION = 214; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4883,7 +4883,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 213; + CURRENT_PROJECT_VERSION = 214; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4943,7 +4943,7 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR; CODE_SIGN_ENTITLEMENTS = Palace/SimplyE.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 213; + CURRENT_PROJECT_VERSION = 214; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; From 963c6c17ea70e4b6abd03479ba608c3567028815 Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Thu, 2 Nov 2023 18:33:31 +0100 Subject: [PATCH 21/24] Update PalaceAudiobookToolkit module SHA --- ios-audiobooktoolkit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios-audiobooktoolkit b/ios-audiobooktoolkit index 6e62d7e33..cd941eab1 160000 --- a/ios-audiobooktoolkit +++ b/ios-audiobooktoolkit @@ -1 +1 @@ -Subproject commit 6e62d7e333c30aa9550de67caa5883cf7b9d3437 +Subproject commit cd941eab15a0e84f8ef9589d64e9e487b2b67da6 From 67ec8d089f0716779a79c68d239c7fbdb2884038 Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Fri, 3 Nov 2023 20:29:35 +0100 Subject: [PATCH 22/24] Update PalaceAudiobookToolkit module SHA --- ios-audiobooktoolkit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios-audiobooktoolkit b/ios-audiobooktoolkit index cd941eab1..0fe57845a 160000 --- a/ios-audiobooktoolkit +++ b/ios-audiobooktoolkit @@ -1 +1 @@ -Subproject commit cd941eab15a0e84f8ef9589d64e9e487b2b67da6 +Subproject commit 0fe57845a5b2ccdbb54d624b5aeee2a647e37589 From f5820e360f4f16b1769dff062fea851c499cb67e Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Fri, 3 Nov 2023 20:30:01 +0100 Subject: [PATCH 23/24] Bump project build number --- Palace.xcodeproj/project.pbxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Palace.xcodeproj/project.pbxproj b/Palace.xcodeproj/project.pbxproj index 05a12f212..20f3316c7 100644 --- a/Palace.xcodeproj/project.pbxproj +++ b/Palace.xcodeproj/project.pbxproj @@ -4642,7 +4642,7 @@ CODE_SIGN_IDENTITY = "Apple Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 214; + CURRENT_PROJECT_VERSION = 215; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4699,7 +4699,7 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR; CODE_SIGN_ENTITLEMENTS = Palace/SimplyE.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 214; + CURRENT_PROJECT_VERSION = 215; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4883,7 +4883,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 214; + CURRENT_PROJECT_VERSION = 215; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4943,7 +4943,7 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR; CODE_SIGN_ENTITLEMENTS = Palace/SimplyE.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 214; + CURRENT_PROJECT_VERSION = 215; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; From 3f6fe9b58c87f0d960bc2f598fa57f5082a4bd9d Mon Sep 17 00:00:00 2001 From: Vladimir Fedorov Date: Fri, 3 Nov 2023 21:11:50 +0100 Subject: [PATCH 24/24] Update PalaceAudiobookToolkit module SHA --- ios-audiobooktoolkit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios-audiobooktoolkit b/ios-audiobooktoolkit index 0fe57845a..71004bde2 160000 --- a/ios-audiobooktoolkit +++ b/ios-audiobooktoolkit @@ -1 +1 @@ -Subproject commit 0fe57845a5b2ccdbb54d624b5aeee2a647e37589 +Subproject commit 71004bde2dcb45f2ea5e3daa4bbee403d85a68c5