Post

Replies

Boosts

Views

Activity

Reply to How to open a window in SwiftUI?
I have found this also to work. Although I think SwiftUI needs a much better way of supporting multiple macOS Windows. In your AppStruct, although any persistent struct or class can hold a window. Limitations: No idea how to let the system determine the window position or whether it will autosave window information. struct Radio_2App: App {     let someWindow = NSWindow( contentRect: NSRect(x: 0, y: 0, width: 580, height: 300), styleMask: [.titled, .closable], backing: .buffered, defer: false)     var body: some Scene {         WindowGroup() { SomeContentView()         }     func openWindow() {         someWindow.contentView = NSHostingView(rootView: SomeOtherView())         self.someWindow.makeKeyAndOrderFront(nil)     } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’21
Reply to Xcode 12b - Push to git repository fails
For me, it turned out to be an issue with the xcodeproj file AND settings. I removed the DVTSourceControlAccountDefaultsKey and also recreated my Xcodeproj from scratch. If you are doing a Swift package that does not require an xcodeproj then just delete it. Very annoying problem to deal with.
Replies
Boosts
Views
Activity
Apr ’23
Reply to "The given data was not valid JSON."
Can you print a UTF8 representation of the data?
Replies
Boosts
Views
Activity
Mar ’22
Reply to No quick help for project elements
Having same issue here. They work initially and then randomly stop working. This is on Xcode 13.2 RC
Replies
Boosts
Views
Activity
Dec ’21
Reply to How to open a window in SwiftUI?
I have found this also to work. Although I think SwiftUI needs a much better way of supporting multiple macOS Windows. In your AppStruct, although any persistent struct or class can hold a window. Limitations: No idea how to let the system determine the window position or whether it will autosave window information. struct Radio_2App: App {     let someWindow = NSWindow( contentRect: NSRect(x: 0, y: 0, width: 580, height: 300), styleMask: [.titled, .closable], backing: .buffered, defer: false)     var body: some Scene {         WindowGroup() { SomeContentView()         }     func openWindow() {         someWindow.contentView = NSHostingView(rootView: SomeOtherView())         self.someWindow.makeKeyAndOrderFront(nil)     } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21