Skip to content
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
b3522df
Close to working streamer
mauricecarrier7 Aug 5, 2025
20b75b7
working streaming
mauricecarrier7 Aug 7, 2025
c2a86c6
working implementation
mauricecarrier7 Aug 12, 2025
7a51d60
fixed streaming
mauricecarrier7 Aug 13, 2025
d6427da
Working streaming mode
mauricecarrier7 Aug 15, 2025
7877cf5
Prune old logic
mauricecarrier7 Aug 15, 2025
c2d88b3
Clean up and improvements
mauricecarrier7 Aug 15, 2025
bb01826
clean up
mauricecarrier7 Aug 15, 2025
911a3d9
Update ios-audiobooktoolkit
mauricecarrier7 Aug 15, 2025
9caaaa5
Fix download regression with non LCP
mauricecarrier7 Aug 15, 2025
dcd9acf
clean up and PR prep
mauricecarrier7 Aug 15, 2025
1ecd761
Update LCPAudiobooks.swift
mauricecarrier7 Aug 15, 2025
9a7c004
PR code cleanup
mauricecarrier7 Aug 15, 2025
5e4ee26
Merge branch 'develop' into task/streaming-prototype-3
mauricecarrier7 Aug 15, 2025
346db7c
Update LCPAudiobooks.swift
mauricecarrier7 Aug 15, 2025
4b32139
fix build
mauricecarrier7 Aug 15, 2025
b53b5eb
Clean up minor errors and resolve checkout crash
mauricecarrier7 Aug 18, 2025
03a2652
update build scripts to build on Xcode16
mauricecarrier7 Aug 18, 2025
5028af6
Restore build
mauricecarrier7 Aug 18, 2025
6b0c116
Restore build
mauricecarrier7 Aug 18, 2025
b647deb
Update xcode-build-nodrm.sh
mauricecarrier7 Aug 18, 2025
15e393f
Update Fastfile
mauricecarrier7 Aug 18, 2025
cb781d2
Improve CI/CD test speed
mauricecarrier7 Aug 18, 2025
46f322b
remove quick tests
mauricecarrier7 Aug 18, 2025
2e6ab47
Update xcode-test-optimized.sh
mauricecarrier7 Aug 18, 2025
8344d20
Update xcode-test.sh
mauricecarrier7 Aug 18, 2025
0cde3ba
Update xcode-test-optimized.sh
mauricecarrier7 Aug 18, 2025
abd52e5
Update xcode-test-optimized.sh
mauricecarrier7 Aug 18, 2025
7486c3f
Update xcode-test-optimized.sh
mauricecarrier7 Aug 19, 2025
bc3017c
Update Fastfile
mauricecarrier7 Aug 19, 2025
93175c3
check for available sims on test run
mauricecarrier7 Aug 19, 2025
c5e465a
Update xcode-test-optimized.sh
mauricecarrier7 Aug 19, 2025
e253de1
Update project.pbxproj
mauricecarrier7 Aug 19, 2025
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
11 changes: 8 additions & 3 deletions .github/workflows/non-drm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ name: NonDRM Build
on: workflow_dispatch
jobs:
build:
runs-on: macOS-latest
runs-on: macos-15
steps:
- name: Use the latest Xcode
run: sudo xcode-select -switch /Applications/Xcode.app
- name: Set up Xcode 16.2
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.2'

- name: Verify Xcode Version
run: xcodebuild -version
- name: Checkout main repo
uses: actions/checkout@v3
- name: Set up repo for nonDRM build
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/release-on-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ on:
types: [closed]
jobs:
create-release:
runs-on: macOS-latest
runs-on: macos-15
steps:
- name: Use the latest Xcode
run: sudo xcode-select -switch /Applications/Xcode.app
- name: Set up Xcode 16.2
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.2'

- name: Verify Xcode Version
run: xcodebuild -version
- name: Checkout main repo and submodules
uses: actions/checkout@v3
with:
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ name: Palace Manual Release
on: workflow_dispatch
jobs:
create-release:
runs-on: macOS-latest
runs-on: macos-15
steps:
- name: Use the latest Xcode
run: sudo xcode-select -switch /Applications/Xcode.app
- name: Set up Xcode 16.2
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.2'

- name: Verify Xcode Version
run: xcodebuild -version
- name: Checkout main repo and submodules
uses: actions/checkout@v3
with:
Expand Down
47 changes: 38 additions & 9 deletions .github/workflows/unit-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,67 @@ name: Unit Tests
on: [ pull_request, workflow_dispatch ]
jobs:
build-and-test:
runs-on: macOS-latest
runs-on: macos-15
steps:
- name: Use the latest Xcode
run: sudo xcode-select -switch /Applications/Xcode.app
- name: Set up Xcode 16.2
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.2'

- name: Verify Xcode Version
run: xcodebuild -version

- name: Checkout main repo and submodules
uses: actions/checkout@v3
with:
submodules: true
token: ${{ secrets.CI_GITHUB_ACCESS_TOKEN }}

- name: Cache Swift packages
uses: actions/cache@v4
with:
path: |
.build
SourcePackages
~/Library/Developer/Xcode/DerivedData/**/SourcePackages
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-

- name: Cache Xcode DerivedData
uses: actions/cache@v4
with:
path: ~/Library/Developer/Xcode/DerivedData
key: ${{ runner.os }}-deriveddata-${{ hashFiles('**/*.xcodeproj/project.pbxproj') }}
restore-keys: |
${{ runner.os }}-deriveddata-

- name: Checkout Certificates
uses: actions/checkout@v3
with:
repository: ThePalaceProject/mobile-certificates
token: ${{ secrets.CI_GITHUB_ACCESS_TOKEN }}
path: ./mobile-certificates

- name: Checkout Adobe RMSDK
uses: ./.github/actions/checkout-adobe
with:
token: ${{ secrets.CI_GITHUB_ACCESS_TOKEN }}

- name: Setup repo with DRM
run: ./scripts/setup-repo-drm.sh
env:
BUILD_CONTEXT: ci

- name: Build non-Carthage 3rd party dependencies
run: ./scripts/build-3rd-party-dependencies.sh
env:
BUILD_CONTEXT: ci
- name: Build Palace without DRM support
run: ./scripts/xcode-build-nodrm.sh
env:
BUILD_CONTEXT: ci
- name: Run Palace unit tests
run: ./scripts/xcode-test.sh
- name: List available simulators for debugging
run: xcrun simctl list devices available | grep iPhone | head -10

- name: Run Palace unit tests (builds automatically)
run: ./scripts/xcode-test-optimized.sh
env:
BUILD_CONTEXT: ci
22 changes: 16 additions & 6 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ name: Palace Manual Build
on: workflow_dispatch
jobs:
check-version:
runs-on: macOS-latest
runs-on: macos-15
steps:
- name: Use the latest Xcode
run: sudo xcode-select -switch /Applications/Xcode.app
- name: Set up Xcode 16.2
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.2'

- name: Verify Xcode Version
run: xcodebuild -version
- name: Checkout main repo and submodules
uses: actions/checkout@v3
with:
Expand All @@ -19,12 +24,17 @@ jobs:
outputs:
should_upload: ${{ steps.checkVersion.outputs.version_changed }}
upload-build:
runs-on: macOS-latest
runs-on: macos-15
needs: check-version
if: needs.check-version.outputs.should_upload == '1'
steps:
- name: Force Xcode 16
run: sudo xcode-select -switch /Applications/Xcode_16.app
- name: Set up Xcode 16.2
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.2'

- name: Verify Xcode Version
run: xcodebuild -version
- name: Checkout main repo and submodules
uses: actions/checkout@v3
with:
Expand Down
18 changes: 9 additions & 9 deletions Palace.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -4746,7 +4746,7 @@
CODE_SIGN_IDENTITY = "Apple Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 361;
CURRENT_PROJECT_VERSION = 362;
DEVELOPMENT_TEAM = 88CBA74T8K;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K;
ENABLE_BITCODE = NO;
Expand All @@ -4768,7 +4768,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.8;
MARKETING_VERSION = 1.2.9;
PRODUCT_BUNDLE_IDENTIFIER = org.thepalaceproject.palace;
PRODUCT_MODULE_NAME = Palace;
PRODUCT_NAME = "Palace-noDRM";
Expand Down Expand Up @@ -4805,7 +4805,7 @@
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR;
CODE_SIGN_ENTITLEMENTS = Palace/SimplyE.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CURRENT_PROJECT_VERSION = 361;
CURRENT_PROJECT_VERSION = 362;
DEVELOPMENT_TEAM = 88CBA74T8K;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K;
ENABLE_BITCODE = NO;
Expand All @@ -4827,7 +4827,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.8;
MARKETING_VERSION = 1.2.9;
PRODUCT_BUNDLE_IDENTIFIER = org.thepalaceproject.palace;
PRODUCT_MODULE_NAME = Palace;
PRODUCT_NAME = "Palace-noDRM";
Expand Down Expand Up @@ -4989,7 +4989,7 @@
CODE_SIGN_ENTITLEMENTS = Palace/PalaceDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 361;
CURRENT_PROJECT_VERSION = 362;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -5015,7 +5015,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.8;
MARKETING_VERSION = 1.2.9;
PRODUCT_BUNDLE_IDENTIFIER = org.thepalaceproject.palace;
PROVISIONING_PROFILE_SPECIFIER = "";
RUN_CLANG_STATIC_ANALYZER = YES;
Expand Down Expand Up @@ -5050,7 +5050,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 361;
CURRENT_PROJECT_VERSION = 362;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K;
ENABLE_BITCODE = NO;
Expand All @@ -5077,7 +5077,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.8;
MARKETING_VERSION = 1.2.9;
PRODUCT_BUNDLE_IDENTIFIER = org.thepalaceproject.palace;
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "App Store";
Expand Down Expand Up @@ -5295,7 +5295,7 @@
repositoryURL = "https://github.com/readium/swift-toolkit.git";
requirement = {
kind = exactVersion;
version = 3.1.0;
version = 3.3.0;
};
};
E77D02232931357400544180 /* XCRemoteSwiftPackageReference "SwiftSoup" */ = {
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 = "1320"
LastUpgradeVersion = "1620"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
12 changes: 11 additions & 1 deletion Palace.xcodeproj/xcshareddata/xcschemes/Palace.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1320"
LastUpgradeVersion = "1620"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -140,6 +140,16 @@
value = "1"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "OBJC_DISABLE_INITIALIZE_FORK_SAFETY"
value = "YES"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "OBJC_DISABLE_VTABLE_OPTIMIZATION"
value = "YES"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
<AdditionalOption
Expand Down
13 changes: 0 additions & 13 deletions Palace/AppInfrastructure/TPPUserNotifications.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ let DefaultActionIdentifier = "UNNotificationDefaultActionIdentifier"
unCenter.delegate = self
unCenter.getNotificationSettings { (settings) in
if settings.authorizationStatus == .notDetermined {
Log.info(#file, "Deferring first-time UN Auth to a later time.")
} else {
self.registerNotificationCategories()
TPPUserNotifications.requestAuthorization()
Expand Down Expand Up @@ -153,33 +152,28 @@ extension TPPUserNotifications: UNUserNotificationCenterDelegate
completionHandler()
}
else if response.actionIdentifier == CheckOutActionIdentifier {
Log.debug(#file, "'Check Out' Notification Action.")
let userInfo = response.notification.request.content.userInfo
let downloadCenter = MyBooksDownloadCenter.shared

guard let bookID = userInfo["bookID"] as? String else {
Log.error(#file, "Bad user info in Local Notification. UserInfo: \n\(userInfo)")
completionHandler()
return
}
guard let book = TPPBookRegistry.shared.book(forIdentifier: bookID) else {
Log.error(#file, "Problem creating book. BookID: \(bookID)")
completionHandler()
return
}

borrow(book, inBackgroundFrom: downloadCenter, completion: completionHandler)
}
else {
Log.warn(#file, "Unknown action identifier: \(response.actionIdentifier)")
completionHandler()
}
}

private func borrow(_ book: TPPBook,
inBackgroundFrom downloadCenter: MyBooksDownloadCenter,
completion: @escaping () -> Void) {
// Asynchronous network task in the background app state.
var bgTask: UIBackgroundTaskIdentifier = .invalid
bgTask = UIApplication.shared.beginBackgroundTask {
if bgTask != .invalid {
Expand All @@ -190,19 +184,12 @@ extension TPPUserNotifications: UNUserNotificationCenterDelegate
}
}

Log.debug(#file, "Beginning background borrow task \(bgTask.rawValue)")

if bgTask == .invalid {
Log.debug(#file, "Unable to run borrow task in background")
}

// bg task body
downloadCenter.startBorrow(for: book, attemptDownload: false) {
completion()
guard bgTask != .invalid else {
return
}
Log.info(#file, "Finishing up background borrow task \(bgTask.rawValue)")
UIApplication.shared.endBackgroundTask(bgTask)
bgTask = .invalid
}
Expand Down
Loading
Loading