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

Release 1.0.34 #354

Merged
merged 33 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ffbecbb
Update ios-audiobooktoolkit module SHA - fix chapter title layout
vladimirfedorov Oct 20, 2023
666d80c
Update submodules SHA
vladimirfedorov Oct 25, 2023
90cb926
Access isLoading from the main queue (found while debugging an audiob…
vladimirfedorov Oct 25, 2023
5878346
Enable push notifications
vladimirfedorov Oct 25, 2023
76be227
Merge branch 'develop' of github.com:ThePalaceProject/ios-core into f…
vladimirfedorov Oct 25, 2023
e1cdb47
Bump project build number
vladimirfedorov Oct 25, 2023
bbdd20f
Try unit tests on macos-13-xl
vladimirfedorov Oct 26, 2023
0d0b77a
Try Xcode 13.0.1
vladimirfedorov Oct 26, 2023
17a6517
Trying a 50 s timeout
vladimirfedorov Oct 26, 2023
d044b55
Trying -xl again
vladimirfedorov Oct 26, 2023
d5942b7
Re-enable tests
vladimirfedorov Oct 27, 2023
ee37bd5
Trying to run tests on a normal macOS 13 worker
vladimirfedorov Oct 27, 2023
158f42e
Update Xcode version in Github workflows
vladimirfedorov Oct 27, 2023
2a7cad1
Update recommended Crashlytics paths
vladimirfedorov Oct 27, 2023
6025da6
Merge pull request #349 from ThePalaceProject/fix/ci-build-macos-13
vladimirfedorov Oct 30, 2023
a6d71e8
Bump project version number
vladimirfedorov Oct 30, 2023
d05c77d
Update submodule SHAs
vladimirfedorov Oct 30, 2023
35290ff
Merge branch 'develop' of github.com:ThePalaceProject/ios-core into f…
vladimirfedorov Oct 30, 2023
ecdd6fc
Revert build number bump to avoid conflicts
vladimirfedorov Oct 30, 2023
3f33035
Merge pull request #347 from ThePalaceProject/task/PP-569-enable-push…
vladimirfedorov Oct 31, 2023
d9d2231
Merge branch 'develop' of github.com:ThePalaceProject/ios-core into f…
vladimirfedorov Oct 31, 2023
110332a
Bump project build number
vladimirfedorov Oct 31, 2023
1cad066
Merge pull request #345 from ThePalaceProject/fix/audiobook-player-fixes
vladimirfedorov Oct 31, 2023
0c95e81
[PP-655] Display keyboard on EPub search (#350)
mauricecarrier7 Nov 2, 2023
722667f
Update PalaceAudiobookToolkit module SHA
vladimirfedorov Nov 2, 2023
f4dabd9
Merge branches 'fix/PP-587-cover-image' and 'develop' of github.com:T…
vladimirfedorov Nov 2, 2023
8844550
Bump project build number
vladimirfedorov Nov 2, 2023
963c6c1
Update PalaceAudiobookToolkit module SHA
vladimirfedorov Nov 2, 2023
5789f18
Merge pull request #351 from ThePalaceProject/fix/PP-587-cover-image
vladimirfedorov Nov 2, 2023
67ec8d0
Update PalaceAudiobookToolkit module SHA
vladimirfedorov Nov 3, 2023
f5820e3
Bump project build number
vladimirfedorov Nov 3, 2023
3f6fe9b
Update PalaceAudiobookToolkit module SHA
vladimirfedorov Nov 3, 2023
0c1bc01
Merge pull request #352 from ThePalaceProject/fix/PP-673-GET-annotati…
vladimirfedorov Nov 6, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/non-drm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-on-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/upload-on-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
36 changes: 18 additions & 18 deletions Palace.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand All @@ -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;
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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 = 215;
DEVELOPMENT_TEAM = 88CBA74T8K;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K;
ENABLE_BITCODE = NO;
Expand All @@ -4659,12 +4659,12 @@
"$(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",
);
MARKETING_VERSION = 1.0.33;
MARKETING_VERSION = 1.0.34;
PRODUCT_BUNDLE_IDENTIFIER = org.thepalaceproject.palace;
PRODUCT_MODULE_NAME = Palace;
PRODUCT_NAME = "Palace-noDRM";
Expand Down Expand Up @@ -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 = 215;
DEVELOPMENT_TEAM = 88CBA74T8K;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K;
ENABLE_BITCODE = NO;
Expand All @@ -4716,12 +4716,12 @@
"$(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",
);
MARKETING_VERSION = 1.0.33;
MARKETING_VERSION = 1.0.34;
PRODUCT_BUNDLE_IDENTIFIER = org.thepalaceproject.palace;
PRODUCT_MODULE_NAME = Palace;
PRODUCT_NAME = "Palace-noDRM";
Expand Down Expand Up @@ -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 = 215;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K;
ENABLE_BITCODE = NO;
Expand All @@ -4905,12 +4905,12 @@
"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",
);
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;
Expand Down Expand Up @@ -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 = 215;
DEVELOPMENT_TEAM = 88CBA74T8K;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K;
ENABLE_BITCODE = NO;
Expand All @@ -4965,12 +4965,12 @@
"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",
);
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;
Expand Down
5 changes: 4 additions & 1 deletion Palace/Accounts/Library/Account.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 1 addition & 3 deletions Palace/AppInfrastructure/TPPAppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion Palace/MyBooks/MyBooks/MyBooksViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ class MyBooksViewModel: ObservableObject {
}

@objc private func stopLoading() {
isLoading.toggle()
DispatchQueue.main.async {
self.isLoading.toggle()
}
}

@objc private func bookRegistryDidChange() {
Expand Down
27 changes: 18 additions & 9 deletions Palace/Reader2/UI/EpubSearchView/EPUBSearchView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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() {
Expand All @@ -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
}
}
Expand All @@ -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()
Expand Down Expand Up @@ -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
Expand Down
Loading