You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like a better idea to either hookup the window from the nib/storyboard to the AppDelegate; or, if the nib/storyboard doesn’t do anything of interest, just remove the window from there and create it programmatically instead.
We will likely migrate to SwiftUI and deprecate Main.storyboard entirely. This will require us to bump the macOS deployment target to 11.0+. At the moment, we're stuck on 10.15 so we're looking at 4.0 release at the earliest.
In any case, I did some preliminary investigation and it looks like we no longer need to declare the default menu items. The code below will correctly insert the React menu between View and Window:
import SwiftUI
@mainstructReactTestApp:App{@StateprivatevarrememberLastComponent= false
varbody:someScene{WindowGroup{ContentView()}.commands{CommandMenu(LocalizedStringKey(stringLiteral:"React")){Button(LocalizedStringKey(stringLiteral:"Load Embedded JS Bundle")){// TODO}Button(LocalizedStringKey(stringLiteral:"Load From Dev Server")){// TODO}Toggle(LocalizedStringKey(stringLiteral:"Remember Last Opened Component"), isOn: $rememberLastComponent)Divider()}}}}
tido64
changed the title
Hook up the window from the storyboard to the AppDelegate
macOS: Migrate to SwiftUI and deprecate Main.storyboardOct 30, 2023
Originally posted by @alloy in #104
The text was updated successfully, but these errors were encountered: