Skip to content

Commit

Permalink
fix visionOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimillian committed Sep 10, 2024
1 parent 8f7df06 commit 0a15f7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion IceCubesApp/App/Main/AppView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,14 @@ struct AppView: View {
.tag(tab)
}
}
.id(availableTabs.count) /// Resets the TabView state when the number of tabs changes to avoid navigation bar issues and prevent crashes
.id(availableTabs.count)
#if !os(visionOS)
.introspect(.tabView, on: .iOS(.v17, .v18)) { (tabview: UITabBarController) in
tabview.tabBar.isHidden = horizontalSizeClass == .regular
tabview.customizableViewControllers = []
tabview.moreNavigationController.isNavigationBarHidden = true
}
#endif
}

var notificationsSecondaryColumn: some View {
Expand Down
2 changes: 1 addition & 1 deletion Packages/Env/Sources/Env/Ext/TranslationView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import SwiftUI

public extension View {
func addTranslateView(isPresented: Binding<Bool>, text: String) -> some View {
#if targetEnvironment(macCatalyst)
#if targetEnvironment(macCatalyst) || os(visionOS)
return self
#else
if #available(iOS 17.4, *) {
Expand Down

0 comments on commit 0a15f7f

Please sign in to comment.