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

IOS-639 Upgrade to Xcode 15, drop iOS 11 support, remove banned books without expiration date #1628

Merged
merged 6 commits into from
Feb 5, 2024

Conversation

ettore
Copy link
Collaborator

@ettore ettore commented Feb 1, 2024

What's this do?

  • Upgrade to Xcode 15. This required dropping iOS 11.
  • Fix deprecations from dropping iOS 11 support.
  • Fix banned books removal code to include books without an expiration date.

Why are we doing this? (w/ JIRA link if applicable)
IOS-639

How should this be tested? / Do these changes have associated tests?

  • Ideally if we have a device with banned book checked out in January 2023 (?), hence without expiration, updating to this build should remove that book.
  • Alternatively we could instrument a QA server to return a book without expiration. That book can be downloaded, but once you relaunch the app it will be removed.

Dependencies for merging? Releasing to production?
Before merging this, we should merge the following PRs:
NYPL-Simplified/NYPLAudiobookToolkit#184
https://github.com/NYPL-Simplified/DRM-iOS-Adobe/pull/28
and then update the commit refs of those 2 submodules.

Does this include changes that require a new SimplyE/Open eBooks build for QA?
not yet

Has the application documentation been updated for these changes?
yes

Did someone actually run this code to verify it works?
I did

[record.book.defaultAcquisition.availability.until compare:[NSDate date]] == NSOrderedAscending) {
// or with no expiration
if ([acquisition.type isEqualToString:ContentTypeAxis360]) {
if ([acquisition.availability.until compare:[NSDate date]] != NSOrderedDescending) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@russellcullen in objc if acquisition.availability.until is nil, the function call [nil compare:[NSDate date]] will not result in a crash and instead will just return 0. This is pretty common in objc!

So, then, 0 is != NSOrderedDescending and test succeeds 🎉

@ettore ettore force-pushed the IOS-639/xcode15 branch 2 times, most recently from 4a23260 to cde9de0 Compare February 2, 2024 22:35
@ettore ettore merged commit 2ab69ef into develop Feb 5, 2024
2 checks passed
@ettore ettore deleted the IOS-639/xcode15 branch February 5, 2024 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants