Skip to content

Commit

Permalink
[PP-1924] Resolves crashlytics crashes (#521)
Browse files Browse the repository at this point in the history
* Resolve concurrency issues in TPPBookRegistry

* Resolve MybooksViewmodel data load crash

* Prevent annotation sync crash

* Clean up various warnings and potential crashes

* Update project.pbxproj

* Clean up tests

* Update Fastfile
  • Loading branch information
mauricecarrier7 authored Feb 12, 2025
1 parent b9b1457 commit 2a5b02b
Show file tree
Hide file tree
Showing 17 changed files with 332 additions and 395 deletions.
24 changes: 12 additions & 12 deletions Palace.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -5599,7 +5599,7 @@
CODE_SIGN_IDENTITY = "Apple Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 310;
CURRENT_PROJECT_VERSION = 311;
DEVELOPMENT_TEAM = 88CBA74T8K;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K;
ENABLE_BITCODE = NO;
Expand All @@ -5621,7 +5621,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.5;
MARKETING_VERSION = 1.1.6;
PRODUCT_BUNDLE_IDENTIFIER = org.thepalaceproject.palace;
PRODUCT_MODULE_NAME = Palace;
PRODUCT_NAME = "Palace-noDRM";
Expand Down Expand Up @@ -5658,7 +5658,7 @@
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR;
CODE_SIGN_ENTITLEMENTS = Palace/SimplyE.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CURRENT_PROJECT_VERSION = 310;
CURRENT_PROJECT_VERSION = 311;
DEVELOPMENT_TEAM = 88CBA74T8K;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K;
ENABLE_BITCODE = NO;
Expand All @@ -5680,7 +5680,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.5;
MARKETING_VERSION = 1.1.6;
PRODUCT_BUNDLE_IDENTIFIER = org.thepalaceproject.palace;
PRODUCT_MODULE_NAME = Palace;
PRODUCT_NAME = "Palace-noDRM";
Expand Down Expand Up @@ -5843,7 +5843,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 310;
CURRENT_PROJECT_VERSION = 311;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K;
ENABLE_BITCODE = NO;
Expand All @@ -5870,7 +5870,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.5;
MARKETING_VERSION = 1.1.6;
PRODUCT_BUNDLE_IDENTIFIER = org.thepalaceproject.palace;
PROVISIONING_PROFILE_SPECIFIER = "Ad Hoc 2";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Ad Hoc 2";
Expand Down Expand Up @@ -5904,7 +5904,7 @@
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR;
CODE_SIGN_ENTITLEMENTS = Palace/SimplyE.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CURRENT_PROJECT_VERSION = 310;
CURRENT_PROJECT_VERSION = 311;
DEVELOPMENT_TEAM = 88CBA74T8K;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K;
ENABLE_BITCODE = NO;
Expand All @@ -5931,7 +5931,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.5;
MARKETING_VERSION = 1.1.6;
PRODUCT_BUNDLE_IDENTIFIER = org.thepalaceproject.palace;
PROVISIONING_PROFILE_SPECIFIER = "App Store";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "App Store 2";
Expand Down Expand Up @@ -5966,7 +5966,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 310;
CURRENT_PROJECT_VERSION = 311;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K;
ENABLE_BITCODE = NO;
Expand All @@ -5992,7 +5992,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.5;
MARKETING_VERSION = 1.1.6;
PRODUCT_BUNDLE_IDENTIFIER = org.thepalaceproject.palace;
PRODUCT_NAME = Palace;
PROVISIONING_PROFILE_SPECIFIER = "Ad Hoc 2";
Expand Down Expand Up @@ -6027,7 +6027,7 @@
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR;
CODE_SIGN_ENTITLEMENTS = Palace/SimplyE.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CURRENT_PROJECT_VERSION = 310;
CURRENT_PROJECT_VERSION = 311;
DEVELOPMENT_TEAM = 88CBA74T8K;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K;
ENABLE_BITCODE = NO;
Expand All @@ -6053,7 +6053,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.5;
MARKETING_VERSION = 1.1.6;
PRODUCT_BUNDLE_IDENTIFIER = org.thepalaceproject.palace;
PRODUCT_NAME = Palace;
PROVISIONING_PROFILE_SPECIFIER = "App Store";
Expand Down
2 changes: 1 addition & 1 deletion Palace/Accounts/AgeCheck/TPPAgeCheck.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

protocol TPPAgeCheckValidationDelegate: class {
protocol TPPAgeCheckValidationDelegate: AnyObject {
var minYear : Int { get }
var currentYear : Int { get }
var birthYearList : [Int] { get }
Expand Down
2 changes: 1 addition & 1 deletion Palace/Announcements/TPPAnnouncementBusinessLogic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class TPPAnnouncementBusinessLogic {
}

do {
let codedData = NSKeyedArchiver.archivedData(withRootObject: presentedAnnouncements)
let codedData = try NSKeyedArchiver.archivedData(withRootObject: presentedAnnouncements, requiringSecureCoding: false)
try codedData.write(to: filePathURL)
} catch {
TPPErrorLogger.logError(error,
Expand Down
2 changes: 1 addition & 1 deletion Palace/AppInfrastructure/TPPAppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class TPPAppDelegate: UIResponder, UIApplicationDelegate {

func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
if let url = userActivity.webpageURL {
return DynamicLinks.dynamicLinks().handleUniversalLink(url) { [weak self] dynamicLink, error in
return DynamicLinks.dynamicLinks().handleUniversalLink(url) { dynamicLink, error in
if let error = error {
Log.error(error.localizedDescription, "Dynamic Link error")
return
Expand Down
1 change: 0 additions & 1 deletion Palace/AppInfrastructure/TPPUserNotifications.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ let HoldNotificationCategoryIdentifier = "NYPLHoldToReserveNotificationCategory"
let CheckOutActionIdentifier = "NYPLCheckOutNotificationAction"
let DefaultActionIdentifier = "UNNotificationDefaultActionIdentifier"

@available (iOS 10.0, *)
@objcMembers class TPPUserNotifications: NSObject
{
typealias DisplayStrings = Strings.UserNotifications
Expand Down
2 changes: 2 additions & 0 deletions Palace/Book/Models/TPPBook.swift
Original file line number Diff line number Diff line change
Expand Up @@ -415,3 +415,5 @@ extension TPPBook: Comparable {
lhs.identifier < rhs.identifier
}
}

extension TPPBook: @unchecked Sendable {}
Loading

0 comments on commit 2a5b02b

Please sign in to comment.