Skip to content

Commit

Permalink
Update for Xcode 15 and iOS / tvOS 17 support (#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
defagos authored Sep 18, 2023
1 parent de8ba99 commit 67a4367
Show file tree
Hide file tree
Showing 34 changed files with 82 additions and 142 deletions.
2 changes: 1 addition & 1 deletion .swiftpm/xcode/xcshareddata/xcschemes/Analytics.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1400"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion .swiftpm/xcode/xcshareddata/xcschemes/Circumspect.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1400"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion .swiftpm/xcode/xcshareddata/xcschemes/Core.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1400"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
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 = "1400"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
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 = "1400"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
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 = "1400"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion .swiftpm/xcode/xcshareddata/xcschemes/Player.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1400"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
5 changes: 4 additions & 1 deletion Demo/Pillarbox-demo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1400;
LastUpgradeCheck = 1400;
LastUpgradeCheck = 1500;
TargetAttributes = {
6F05B8D42887E934005D75E3 = {
CreatedOnToolsVersion = 14.0;
Expand Down Expand Up @@ -609,6 +609,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
Expand Down Expand Up @@ -669,6 +670,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
Expand Down Expand Up @@ -780,6 +782,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
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 = "1400"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
8 changes: 3 additions & 5 deletions Demo/Sources/ContentLists/ContentListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,8 @@ struct ContentListView: View {
}
}

struct ContentListView_Previews: PreviewProvider {
static var previews: some View {
RoutedNavigationStack {
ContentListView(configuration: .init(list: .tvLatestMedias, vendor: .RTS))
}
#Preview {
RoutedNavigationStack {
ContentListView(configuration: .init(list: .tvLatestMedias, vendor: .RTS))
}
}
8 changes: 3 additions & 5 deletions Demo/Sources/ContentLists/ContentListsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,8 @@ struct ContentListsView: View {
#endif
}

struct ContentListsView_Previews: PreviewProvider {
static var previews: some View {
RoutedNavigationStack {
ContentListsView()
}
#Preview {
RoutedNavigationStack {
ContentListsView()
}
}
8 changes: 3 additions & 5 deletions Demo/Sources/Examples/ExamplesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,8 @@ struct ExamplesView: View {
}
}

struct ExamplesView_Previews: PreviewProvider {
static var previews: some View {
RoutedNavigationStack {
ExamplesView()
}
#Preview {
RoutedNavigationStack {
ExamplesView()
}
}
8 changes: 2 additions & 6 deletions Demo/Sources/Players/BasicPlaybackView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ struct BasicPlaybackView: View {
}
}

struct BasicPlaybackView_Previews: PreviewProvider {
static var previews: some View {
BasicPlaybackView(player: Player())
.background(.black)
.previewLayout(.fixed(width: 320, height: 180))
}
#Preview {
BasicPlaybackView(player: Player())
}
8 changes: 2 additions & 6 deletions Demo/Sources/Players/PlaybackView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -556,10 +556,6 @@ struct PlaybackView: View {
}
}

struct PlaybackView_Previews: PreviewProvider {
static var previews: some View {
PlaybackView(player: Player(item: Media(from: URLTemplate.onDemandVideoLocalHLS).playerItem()))
.background(.black)
.previewLayout(.fixed(width: 320, height: 180))
}
#Preview {
PlaybackView(player: Player(item: Media(from: URLTemplate.onDemandVideoLocalHLS).playerItem()))
}
6 changes: 2 additions & 4 deletions Demo/Sources/Players/PlayerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ struct PlayerView: View {
}
}

struct PlayerView_Previews: PreviewProvider {
static var previews: some View {
PlayerView(media: Media(from: URLTemplate.onDemandVideoLocalHLS))
}
#Preview {
PlayerView(media: Media(from: URLTemplate.onDemandVideoLocalHLS))
}
6 changes: 2 additions & 4 deletions Demo/Sources/Players/SimplePlayerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ struct SimplePlayerView: View {
}
}

struct SimplePlayerView_Previews: PreviewProvider {
static var previews: some View {
SimplePlayerView(media: Media(from: URLTemplate.onDemandVideoLocalHLS))
}
#Preview {
SimplePlayerView(media: Media(from: URLTemplate.onDemandVideoLocalHLS))
}
6 changes: 2 additions & 4 deletions Demo/Sources/Players/SystemPlayerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ struct SystemPlayerView: View {
}
}

struct SystemPlayerView_Previews: PreviewProvider {
static var previews: some View {
SystemPlayerView(media: Media(from: URLTemplate.onDemandVideoLocalHLS))
}
#Preview {
SystemPlayerView(media: Media(from: URLTemplate.onDemandVideoLocalHLS))
}
12 changes: 7 additions & 5 deletions Demo/Sources/Players/VanillaPlayerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import SwiftUI
struct VanillaPlayerView: View {
let item: AVPlayerItem

@State private var player = AVQueuePlayer()
@StateObject private var player = AVQueuePlayer()

var body: some View {
VideoPlayer(player: player)
Expand All @@ -28,8 +28,10 @@ struct VanillaPlayerView: View {
}
}

struct VanillaPlayerView_Previews: PreviewProvider {
static var previews: some View {
VanillaPlayerView(item: Template.playerItem(from: URLTemplate.appleAdvanced_16_9_TS_HLS)!)
}
// Workaround for FB13126425. Makes it possible to use `AVPlayer` as `@ObservableObject` to avoid memory leaks
// in modal presentations.
extension AVPlayer: ObservableObject {}

#Preview {
VanillaPlayerView(item: Template.playerItem(from: URLTemplate.appleAdvanced_16_9_TS_HLS)!)
}
8 changes: 3 additions & 5 deletions Demo/Sources/Search/SearchView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,8 @@ struct SearchView: View {
}
}

struct SearchView_Previews: PreviewProvider {
static var previews: some View {
RoutedNavigationStack {
SearchView()
}
#Preview {
RoutedNavigationStack {
SearchView()
}
}
8 changes: 3 additions & 5 deletions Demo/Sources/Settings/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,8 @@ struct SettingsView: View {
}
}

struct SettingsView_Previews: PreviewProvider {
static var previews: some View {
RoutedNavigationStack {
SettingsView()
}
#Preview {
RoutedNavigationStack {
SettingsView()
}
}
6 changes: 2 additions & 4 deletions Demo/Sources/Showcase/BlurredView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ struct BlurredView: View {
}
}

struct BlurredView_Previews: PreviewProvider {
static var previews: some View {
BlurredView(media: Media(from: URLTemplate.onDemandVideoLocalHLS))
}
#Preview {
BlurredView(media: Media(from: URLTemplate.onDemandVideoLocalHLS))
}
6 changes: 2 additions & 4 deletions Demo/Sources/Showcase/LinkView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ struct LinkView: View {
}
}

struct LinkView_Previews: PreviewProvider {
static var previews: some View {
LinkView(media: Media(from: URLTemplate.onDemandVideoLocalHLS))
}
#Preview {
LinkView(media: Media(from: URLTemplate.onDemandVideoLocalHLS))
}
12 changes: 5 additions & 7 deletions Demo/Sources/Showcase/MultiView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,9 @@ struct MultiView: View {
}
}

struct MultiView_Previews: PreviewProvider {
static var previews: some View {
MultiView(
media1: Media(from: URNTemplate.onDemandHorizontalVideo),
media2: Media(from: URNTemplate.onDemandVideo)
)
}
#Preview {
MultiView(
media1: Media(from: URNTemplate.onDemandHorizontalVideo),
media2: Media(from: URNTemplate.onDemandVideo)
)
}
6 changes: 2 additions & 4 deletions Demo/Sources/Showcase/OptInView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ struct OptInView: View {
}
}

struct OptInView_Previews: PreviewProvider {
static var previews: some View {
OptInView(media: Media(from: URLTemplate.onDemandVideoLocalHLS))
}
#Preview {
OptInView(media: Media(from: URLTemplate.onDemandVideoLocalHLS))
}
14 changes: 6 additions & 8 deletions Demo/Sources/Showcase/Playlist/PlaylistView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,10 @@ struct PlaylistView: View {
}
}

struct PlaylistView_Previews: PreviewProvider {
static var previews: some View {
PlaylistView(templates: [
URLTemplate.onDemandVideoLocalHLS,
URLTemplate.shortOnDemandVideoHLS,
URLTemplate.dvrVideoHLS
])
}
#Preview {
PlaylistView(templates: [
URLTemplate.onDemandVideoLocalHLS,
URLTemplate.shortOnDemandVideoHLS,
URLTemplate.dvrVideoHLS
])
}
8 changes: 3 additions & 5 deletions Demo/Sources/Showcase/ShowcaseView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,8 @@ struct ShowcaseView: View {
}
}

struct ShowcaseView_Previews: PreviewProvider {
static var previews: some View {
RoutedNavigationStack {
ShowcaseView()
}
#Preview {
RoutedNavigationStack {
ShowcaseView()
}
}
6 changes: 2 additions & 4 deletions Demo/Sources/Showcase/Stories/StoriesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ struct StoriesView: View {
}
}

struct StoriesView_Previews: PreviewProvider {
static var previews: some View {
StoriesView()
}
#Preview {
StoriesView()
}
6 changes: 2 additions & 4 deletions Demo/Sources/Showcase/TransitionView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ private extension Player {
}
}

struct TransitionView_Previews: PreviewProvider {
static var previews: some View {
TransitionView(media: Media(from: URLTemplate.onDemandVideoLocalHLS))
}
#Preview {
TransitionView(media: Media(from: URLTemplate.onDemandVideoLocalHLS))
}
6 changes: 2 additions & 4 deletions Demo/Sources/Showcase/TwinsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ private extension TwinsView {
}
}

struct TwinsView_Previews: PreviewProvider {
static var previews: some View {
TwinsView(media: Media(from: URLTemplate.onDemandVideoLocalHLS))
}
#Preview {
TwinsView(media: Media(from: URLTemplate.onDemandVideoLocalHLS))
}
6 changes: 2 additions & 4 deletions Demo/Sources/Showcase/Wrapped/WrappedView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ struct WrappedView: View {
}
}

struct WrappedView_Previews: PreviewProvider {
static var previews: some View {
WrappedView(media: Media(from: URLTemplate.onDemandVideoLocalHLS))
}
#Preview {
WrappedView(media: Media(from: URLTemplate.onDemandVideoLocalHLS))
}
10 changes: 4 additions & 6 deletions Demo/Sources/Views/PlaybackSlider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,9 @@ extension PlaybackSlider where ValueLabel == EmptyView {
}
}

struct PlaybackSlider_Previews: PreviewProvider {
static var previews: some View {
PlaybackSlider(progressTracker: .init(interval: .zero))
.padding(.horizontal, 5)
.preferredColorScheme(.dark)
}
#Preview {
PlaybackSlider(progressTracker: .init(interval: .zero))
.padding(.horizontal, 5)
.preferredColorScheme(.dark)
}
#endif
Loading

0 comments on commit 67a4367

Please sign in to comment.