mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-22 08:20:59 +00:00
visionOS fix
This commit is contained in:
parent
5d24c4d2e8
commit
e79ead5efe
6 changed files with 37 additions and 6 deletions
|
@ -95,6 +95,8 @@
|
|||
9FD542E72962D2FF0045321A /* Lists in Frameworks */ = {isa = PBXBuildFile; productRef = 9FD542E62962D2FF0045321A /* Lists */; };
|
||||
9FE151A6293C90F900E9683D /* IconSelectorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FE151A5293C90F900E9683D /* IconSelectorView.swift */; };
|
||||
9FE3DB57296FEFCA00628CB0 /* AppAccount in Frameworks */ = {isa = PBXBuildFile; productRef = 9FE3DB56296FEFCA00628CB0 /* AppAccount */; };
|
||||
9FE4CCAB2B4C848A00DA5F13 /* GiphyUISDK in Frameworks */ = {isa = PBXBuildFile; platformFilters = (ios, maccatalyst, ); productRef = 9FE4CCAA2B4C848A00DA5F13 /* GiphyUISDK */; };
|
||||
9FE4CCAD2B4C849F00DA5F13 /* GiphyUISDK in Frameworks */ = {isa = PBXBuildFile; productRef = 9FE4CCAC2B4C849F00DA5F13 /* GiphyUISDK */; };
|
||||
9FFF677C299B7B2C00FE700A /* Notifications in Frameworks */ = {isa = PBXBuildFile; productRef = 9FFF677B299B7B2C00FE700A /* Notifications */; };
|
||||
9FFF6780299B7D2B00FE700A /* DesignSystem in Frameworks */ = {isa = PBXBuildFile; productRef = 9FFF677F299B7D2B00FE700A /* DesignSystem */; };
|
||||
9FFF6782299B7D3A00FE700A /* Account in Frameworks */ = {isa = PBXBuildFile; productRef = 9FFF6781299B7D3A00FE700A /* Account */; };
|
||||
|
@ -281,6 +283,7 @@
|
|||
9FAD85A2297456A400496AB1 /* Env in Frameworks */,
|
||||
9FAD85A0297456A100496AB1 /* Models in Frameworks */,
|
||||
9FAD85A4297456A800496AB1 /* DesignSystem in Frameworks */,
|
||||
9FE4CCAD2B4C849F00DA5F13 /* GiphyUISDK in Frameworks */,
|
||||
9FAD859E2974569B00496AB1 /* Account in Frameworks */,
|
||||
9FAD859C2974422700496AB1 /* AppAccount in Frameworks */,
|
||||
9FC2A38F2B49D1AA00DFD1C1 /* StatusKit in Frameworks */,
|
||||
|
@ -293,6 +296,7 @@
|
|||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9F7335EF29674F7100AFF0BA /* QuickLook.framework in Frameworks */,
|
||||
9FE4CCAB2B4C848A00DA5F13 /* GiphyUISDK in Frameworks */,
|
||||
9F7335ED2967463400AFF0BA /* AVKit.framework in Frameworks */,
|
||||
9F2A540C29699705009B2D7C /* RevenueCat in Frameworks */,
|
||||
9F2A540E2969A0B0009B2D7C /* StoreKit.framework in Frameworks */,
|
||||
|
@ -603,6 +607,7 @@
|
|||
9FAD85A1297456A400496AB1 /* Env */,
|
||||
9FAD85A3297456A800496AB1 /* DesignSystem */,
|
||||
9FC2A38E2B49D1AA00DFD1C1 /* StatusKit */,
|
||||
9FE4CCAC2B4C849F00DA5F13 /* GiphyUISDK */,
|
||||
);
|
||||
productName = IceCubesShareExtension;
|
||||
productReference = 9FAD858829743F7400496AB1 /* IceCubesShareExtension.appex */;
|
||||
|
@ -641,6 +646,7 @@
|
|||
9FE3DB56296FEFCA00628CB0 /* AppAccount */,
|
||||
DA0B24FA2A6876D50045BDD7 /* SFSafeSymbols */,
|
||||
9FC2A38A2B49D19A00DFD1C1 /* StatusKit */,
|
||||
9FE4CCAA2B4C848A00DA5F13 /* GiphyUISDK */,
|
||||
);
|
||||
productName = IceCubesApp;
|
||||
productReference = 9FBFE639292A715500C250E9 /* Ice Cubes.app */;
|
||||
|
@ -721,6 +727,7 @@
|
|||
9FAE4ACC29379A5A00772766 /* XCRemoteSwiftPackageReference "keychain-swift" */,
|
||||
9F2A540829699705009B2D7C /* XCRemoteSwiftPackageReference "purchases-ios" */,
|
||||
DA0B24F92A6876D40045BDD7 /* XCRemoteSwiftPackageReference "SFSafeSymbols" */,
|
||||
9FE4CCA92B4C848A00DA5F13 /* XCRemoteSwiftPackageReference "giphy-ios-sdk" */,
|
||||
);
|
||||
productRefGroup = 9FBFE63A292A715500C250E9 /* Products */;
|
||||
projectDirPath = "";
|
||||
|
@ -1420,6 +1427,14 @@
|
|||
kind = branch;
|
||||
};
|
||||
};
|
||||
9FE4CCA92B4C848A00DA5F13 /* XCRemoteSwiftPackageReference "giphy-ios-sdk" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/Giphy/giphy-ios-sdk";
|
||||
requirement = {
|
||||
kind = upToNextMajorVersion;
|
||||
minimumVersion = 2.2.7;
|
||||
};
|
||||
};
|
||||
DA0B24F92A6876D40045BDD7 /* XCRemoteSwiftPackageReference "SFSafeSymbols" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/SFSafeSymbols/SFSafeSymbols";
|
||||
|
@ -1540,6 +1555,16 @@
|
|||
isa = XCSwiftPackageProductDependency;
|
||||
productName = AppAccount;
|
||||
};
|
||||
9FE4CCAA2B4C848A00DA5F13 /* GiphyUISDK */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 9FE4CCA92B4C848A00DA5F13 /* XCRemoteSwiftPackageReference "giphy-ios-sdk" */;
|
||||
productName = GiphyUISDK;
|
||||
};
|
||||
9FE4CCAC2B4C849F00DA5F13 /* GiphyUISDK */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 9FE4CCA92B4C848A00DA5F13 /* XCRemoteSwiftPackageReference "giphy-ios-sdk" */;
|
||||
productName = GiphyUISDK;
|
||||
};
|
||||
9FFF677B299B7B2C00FE700A /* Notifications */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
productName = Notifications;
|
||||
|
|
|
@ -28,11 +28,15 @@ struct AppView: View {
|
|||
@State var iosTabs = iOSTabs.shared
|
||||
|
||||
var body: some View {
|
||||
#if os(visionOS)
|
||||
tabBarView
|
||||
#else
|
||||
if UIDevice.current.userInterfaceIdiom == .pad || UIDevice.current.userInterfaceIdiom == .mac {
|
||||
sidebarView
|
||||
} else {
|
||||
tabBarView
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
var availableTabs: [Tab] {
|
||||
|
@ -90,6 +94,7 @@ struct AppView: View {
|
|||
return 0
|
||||
}
|
||||
|
||||
#if !os(visionOS)
|
||||
var sidebarView: some View {
|
||||
SideBarView(selectedTab: $selectedTab,
|
||||
popToRootTab: $popToRootTab,
|
||||
|
@ -122,6 +127,7 @@ struct AppView: View {
|
|||
}
|
||||
.environment(appRouterPath)
|
||||
}
|
||||
#endif
|
||||
|
||||
var notificationsSecondaryColumn: some View {
|
||||
NotificationsTab(selectedTab: .constant(.notifications),
|
||||
|
|
|
@ -19,7 +19,9 @@ import SwiftUI
|
|||
func preparePlayer(autoPlay: Bool, isCompact: Bool) {
|
||||
player = .init(url: url)
|
||||
player?.audiovisualBackgroundPlaybackPolicy = .pauses
|
||||
#if !os(visionOS)
|
||||
player?.preventsDisplaySleepDuringVideoPlayback = false
|
||||
#endif
|
||||
if (autoPlay || forceAutoPlay) && !isCompact {
|
||||
player?.play()
|
||||
isPlaying = true
|
||||
|
|
|
@ -23,7 +23,6 @@ let package = Package(
|
|||
.package(name: "Network", path: "../Network"),
|
||||
.package(name: "Env", path: "../Env"),
|
||||
.package(name: "DesignSystem", path: "../DesignSystem"),
|
||||
.package(url: "https://github.com/Giphy/giphy-ios-sdk", from: "2.2.7"),
|
||||
.package(url: "https://github.com/nicklockwood/LRUCache", from: "1.0.4"),
|
||||
],
|
||||
targets: [
|
||||
|
@ -36,7 +35,6 @@ let package = Package(
|
|||
.product(name: "Network", package: "Network"),
|
||||
.product(name: "Env", package: "Env"),
|
||||
.product(name: "DesignSystem", package: "DesignSystem"),
|
||||
.product(name: "GiphyUISDK", package: "giphy-ios-sdk"),
|
||||
.product(name: "LRUCache", package: "LRUCache"),
|
||||
],
|
||||
swiftSettings: [
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import DesignSystem
|
||||
import Env
|
||||
#if !os(visionOS)
|
||||
#if !os(visionOS) && !DEBUG
|
||||
import GiphyUISDK
|
||||
#endif
|
||||
import Models
|
||||
|
@ -124,7 +124,7 @@ extension StatusEditor {
|
|||
.background(.black)
|
||||
})
|
||||
.sheet(isPresented: $isGIFPickerPresented, content: {
|
||||
#if !os(visionOS)
|
||||
#if !os(visionOS) && !DEBUG
|
||||
#if targetEnvironment(macCatalyst)
|
||||
NavigationStack {
|
||||
giphyView
|
||||
|
@ -213,7 +213,7 @@ extension StatusEditor {
|
|||
return false
|
||||
}
|
||||
|
||||
#if !os(visionOS)
|
||||
#if !os(visionOS) && !DEBUG
|
||||
@ViewBuilder
|
||||
private var giphyView: some View {
|
||||
@Bindable var viewModel = focusedSEVM
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#if !os(visionOS)
|
||||
#if !os(visionOS) && !DEBUG
|
||||
import DesignSystem
|
||||
import GiphyUISDK
|
||||
import SwiftUI
|
||||
|
|
Loading…
Reference in a new issue