Files
ShoeGaze/Demo/ShoeGazeBuilderiOS/ShoeGazeBuilderiOSApp.swift
T
josh 35971d4acc Add ShoeGaze Builder demo apps (macOS + iOS)
Two thin app shells hosting ShoeGazeBuilderView:

- macOS (AppKit): seeds one board with an Overdrive; anchors the window
  ~100px from the left of the visible screen and sizes it to most of the
  screen height via LyrebirdWindow.nsWindow.
- iOS (SwiftUI): NavigationStack hosting the builder; AVAudioSession +
  iOSAudioDriver; logs session-activation failures.

Both .xcodeproj reference the local package (..) + the remote Lyrebird
package, with fresh hex object-id prefixes; added to ShoeGaze.xcworkspace.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 09:32:18 -07:00

34 lines
1.1 KiB
Swift

// ShoeGazeBuilderiOSApp.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import SwiftUI
import LyrebirdShoeGazeUI
/// iOS entry point for the ShoeGaze Builder.
///
/// Holds the `ShoeGazeBuilderiOSAppModel` as `@State` so it is created once and owned for the
/// lifetime of the app. The audio engine is **not** started automatically — the user presses
/// Start in ``ShoeGazeBuilderView``. The engine is stopped when the view disappears.
///
/// ``ShoeGazeBuilderView`` manages its own scroll regions (palette + builder), so it is hosted
/// directly rather than wrapped in an outer `ScrollView`.
@main
struct ShoeGazeBuilderiOSApp: App {
@State private var model: ShoeGazeBuilderiOSAppModel = ShoeGazeBuilderiOSAppModel()
var body: some Scene {
WindowGroup {
NavigationStack {
ShoeGazeBuilderView(shoeGaze: model.shoeGaze)
.navigationTitle("ShoeGaze Builder")
.navigationBarTitleDisplayMode(.inline)
}
.onDisappear { model.stop() }
}
}
}