Skip to content

Commit

Permalink
Merge pull request #1181 from TortugaPower/develop
Browse files Browse the repository at this point in the history
Release v5.3.6
  • Loading branch information
GianniCarlo committed Sep 11, 2024
2 parents 3ee0bc2 + 77052cb commit 6d4ef07
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 26 deletions.
36 changes: 18 additions & 18 deletions BookPlayer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -4096,7 +4096,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.3.4;
MARKETING_VERSION = 5.3.6;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).BookPlayerIntents";
Expand Down Expand Up @@ -4130,7 +4130,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.3.4;
MARKETING_VERSION = 5.3.6;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).BookPlayerIntents";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -4162,7 +4162,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.3.4;
MARKETING_VERSION = 5.3.6;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).BookPlayerIntents";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -4198,7 +4198,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.3.4;
MARKETING_VERSION = 5.3.6;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).watchkitapp";
Expand Down Expand Up @@ -4239,7 +4239,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.3.4;
MARKETING_VERSION = 5.3.6;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).watchkitapp";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -4277,7 +4277,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.3.4;
MARKETING_VERSION = 5.3.6;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).watchkitapp";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -4446,7 +4446,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.3.4;
MARKETING_VERSION = 5.3.6;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).BookPlayerWidgetUI";
Expand Down Expand Up @@ -4484,7 +4484,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.3.4;
MARKETING_VERSION = 5.3.6;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).BookPlayerWidgetUI";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -4520,7 +4520,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.3.4;
MARKETING_VERSION = 5.3.6;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).BookPlayerWidgetUI";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -4673,7 +4673,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 5.3.4;
MARKETING_VERSION = 5.3.6;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER)";
PRODUCT_NAME = BookPlayer;
PROVISIONING_PROFILE_SPECIFIER = "$(BP_PROVISIONING_MAIN)";
Expand Down Expand Up @@ -4711,7 +4711,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 5.3.4;
MARKETING_VERSION = 5.3.6;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER)";
PRODUCT_NAME = BookPlayer;
PROVISIONING_PROFILE_SPECIFIER = "$(BP_PROVISIONING_MAIN)";
Expand Down Expand Up @@ -4933,7 +4933,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.3.4;
MARKETING_VERSION = 5.3.6;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).watchkitapp.widgets";
Expand Down Expand Up @@ -4971,7 +4971,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.3.4;
MARKETING_VERSION = 5.3.6;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).watchkitapp.widgets";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -5007,7 +5007,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.3.4;
MARKETING_VERSION = 5.3.6;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).watchkitapp.widgets";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -5046,7 +5046,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.3.4;
MARKETING_VERSION = 5.3.6;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).BookPlayerShareExtension";
Expand Down Expand Up @@ -5086,7 +5086,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.3.4;
MARKETING_VERSION = 5.3.6;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).BookPlayerShareExtension";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -5124,7 +5124,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 5.3.4;
MARKETING_VERSION = 5.3.6;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER).BookPlayerShareExtension";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -5216,7 +5216,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 5.3.4;
MARKETING_VERSION = 5.3.6;
PRODUCT_BUNDLE_IDENTIFIER = "$(BP_BUNDLE_IDENTIFIER)";
PRODUCT_NAME = BookPlayer;
PROVISIONING_PROFILE_SPECIFIER = "$(BP_PROVISIONING_MAIN)";
Expand Down
32 changes: 31 additions & 1 deletion BookPlayer/AppTabBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ class AppTabBarController: UITabBarController {

private var disposeBag = Set<AnyCancellable>()
private var themedStatusBarStyle: UIStatusBarStyle?
/// iPadOS 18 moves the regular tab bar to the navigation bar
private let regularOffset: CGFloat = -24
private var compactOffset: CGFloat {
-tabBar.bounds.size.height + self.view.safeAreaInsets.bottom
}
private lazy var viewBottomConstraint = self.miniPlayer.bottomAnchor.constraint(
equalTo: view.safeAreaLayoutGuide.bottomAnchor,
constant: compactOffset
)
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
if UserDefaults.standard.object(forKey: Constants.UserDefaults.orientationLock) != nil,
let orientation = UIDeviceOrientation(rawValue: UserDefaults.standard.integer(forKey: Constants.UserDefaults.orientationLock)) {
Expand Down Expand Up @@ -49,6 +58,14 @@ class AppTabBarController: UITabBarController {
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
super.traitCollectionDidChange(previousTraitCollection)

if #available(iOS 18.0, *),
UIDevice.current.userInterfaceIdiom == .pad,
traitCollection.horizontalSizeClass != .compact {
viewBottomConstraint.constant = regularOffset
} else {
viewBottomConstraint.constant = compactOffset
}

guard self.traitCollection.userInterfaceStyle != .unspecified else { return }

ThemeManager.shared.checkSystemMode()
Expand All @@ -72,8 +89,21 @@ class AppTabBarController: UITabBarController {
self.miniPlayer.heightAnchor.constraint(equalToConstant: 88),
self.miniPlayer.leftAnchor.constraint(equalTo: view.leftAnchor),
self.miniPlayer.rightAnchor.constraint(equalTo: view.rightAnchor),
self.miniPlayer.bottomAnchor.constraint(equalTo: tabBar.topAnchor)
viewBottomConstraint,
])

guard
#available(iOS 18.0, *),
UIDevice.current.userInterfaceIdiom == .pad
else {
return
}

if traitCollection.horizontalSizeClass == .compact {
viewBottomConstraint.constant = compactOffset
} else {
viewBottomConstraint.constant = regularOffset
}
}

func bindObservers() {
Expand Down
2 changes: 1 addition & 1 deletion BookPlayerWidgets/BookPlayerWidgets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct BookPlayerBundle: WidgetBundle {
LastPlayedWidget()
RecentBooksWidget()
TimeListenedWidget()
if #available(iOSApplicationExtension 16.0, *) {
if #available(iOSApplicationExtension 16.1, *) {
SharedWidget()
SharedIconWidget()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct SharedIconWidgetTimelineProvider: TimelineProvider {
typealias Entry = SharedIconWidgetEntry
}

@available(iOSApplicationExtension 16.0, watchOS 9.0, *)
@available(iOSApplicationExtension 16.1, watchOS 9.0, *)
struct SharedIconWidget: Widget {
let kind: String = Constants.Widgets.sharedIconWidget.rawValue
#if os(watchOS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import BookPlayerWatchKit
import BookPlayerKit
#endif

@available(iOSApplicationExtension 16.0, watchOS 9.0, *)
@available(iOSApplicationExtension 16.1, watchOS 9.0, *)
struct CircularView: View {
let title: String
let fillFraction: Double
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import SwiftUI
import WidgetKit

@available(iOSApplicationExtension 16.0, watchOS 9.0, *)
@available(iOSApplicationExtension 16.1, watchOS 9.0, *)
struct CornerView: View {
let title: String
let fillFraction: Double
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import SwiftUI
import WidgetKit

@available(iOSApplicationExtension 16.0, watchOS 9.0, *)
@available(iOSApplicationExtension 16.1, watchOS 9.0, *)
struct RectangularView: View {
let chapterTitle: String
let bookTitle: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ struct SharedWidgetTimelineProvider: TimelineProvider {
}
}

@available(iOSApplicationExtension 16.0, watchOS 9.0, *)
@available(iOSApplicationExtension 16.1, watchOS 9.0, *)
struct SharedWidget: Widget {
let kind: String = Constants.Widgets.sharedNowPlayingWidget.rawValue

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import SwiftUI

@available(iOSApplicationExtension 16.0, watchOS 9.0, *)
@available(iOSApplicationExtension 16.1, watchOS 9.0, *)
struct SharedWidgetContainerView: View {
let entry: SharedWidgetEntry

Expand Down

0 comments on commit 6d4ef07

Please sign in to comment.