Skip to content

Commit

Permalink
Disable PulseUI in the release configuration (#2)
Browse files Browse the repository at this point in the history
Disable `PulseUI` in the release configuration
  • Loading branch information
ns-vasilev authored Sep 2, 2024
2 parents 40cd46c + 2a33323 commit 992322d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
26 changes: 16 additions & 10 deletions HackerNews/Classes/HackerNewsApp.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// HackerNews
// Copyright © 2024 Nikita Vasilev. All rights reserved.
// Copyright © 2023 Nikita Vasilev. All rights reserved.
//

import ComposableArchitecture
Expand All @@ -14,23 +14,29 @@ struct HackerNewsApp: App {
// MARK: Properties

@UIApplicationDelegateAdaptor(AppDelegate.self) private var appDelegate
@State private var showConsole = false
#if DEBUG
@State private var showConsole = false
#endif

private let assembly: IApplicationAssembly = ApplicationAssembly(dependencies: DependenciesAssembly())

// MARK: View

var body: some Scene {
WindowGroup {
self.assembly.assemble()
.sheet(isPresented: $showConsole) {
NavigationView {
ConsoleView()
#if DEBUG
assembly.assemble()
.sheet(isPresented: $showConsole) {
NavigationView {
ConsoleView()
}
}
}
.onShake {
showConsole.toggle()
}
.onShake {
showConsole.toggle()
}
#else
assembly.assemble()
#endif
}
}
}
2 changes: 1 addition & 1 deletion project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ configFiles:
Release: ./HackerNews/Resources/Configurations/Release.xcconfig
settings:
base:
SWIFT_VERSION: "5.7"
SWIFT_VERSION: "5.9"
configs:
Debug:
DEVELOPMENT_TEAM: A8WE5LL2GU
Expand Down

0 comments on commit 992322d

Please sign in to comment.