Post

Replies

Boosts

Views

Activity

Reply to SwiftUI Scene with a single window on macOS
In Xcode Beta 6 there's a new API added to Scene: @available(iOS 14.0, macOS 11.0, *) public func handlesExternalEvents(matching conditions: Set<String>) -> some Scene Based on the doc comments I don't think this will let me limit the window count, but I'm not sure. I'll report back after macOS Beta 6 is released and I play around with it.
Aug ’20
Reply to How to conditionally show a SwiftUI Scene on macOS?
In Xcode Beta 6 there's a new API added to Scene: @available(iOS 14.0, macOS 11.0, *) public func handlesExternalEvents(matching conditions: Set<String>) -> some Scene Based on the doc comments I don't think this will provide the behavior I'm looking for. I'll report back after macOS Beta 6 is released and I play around with it though.
Aug ’20
Reply to SwiftUI Scene with a single window on macOS
Claude31, thanks for that idea. It does seem that I can use the following code to hide the New Window menu item:     .commands {         CommandGroup(replacing: CommandGroupPlacement.newItem) {       }     } Unfortunately this affects my other scenes/windows, one of which is using DocumentGroups, and needs that menu option. I've also noticed that I can't seem to customize commands per-scene/window. The last .commands block I supply is used regardless of what Scene I apply it to.
Aug ’20
Reply to Custom shaders and particle systems in RealityKit
The video materials look pretty interesting, but they look a lot more effort to create (for a developer anyway) than shaders, and less powerful. I'm happy it's something dynamic though. I really wish RealityKit had shaders and a particle system. The Entity-Component (and other APIs) are so nice, I'd love to use it for non-AR and possibly AR. But without those features, it doesn't quite match what SceneKit can do. I'll file feedback requesting the features, and hopefully others will too.
Jul ’20
Reply to SwiftUI Previews in Swift Packages
After looking more closely at https://developer.apple.com/forums/thread/651547 I realized I didn't rename or delete the default struct {Package Name} created by Xcode. After doing that, previews work on iOS/tvOS. Unfortunately they are still broken on macOS. I also tested macOS 11, with the same results. The error is still the same, something about how it can't attach to the process: HumanReadableNSError: connectToPreviewHost: Failed to connect to 4083: Error Domain=com.apple.dt.ProcessAttachUtilities Code=0 "Failed to get task for pid 4083: 0" UserInfo={NSLocalizedDescription=Failed to get task for pid 4083: 0} com.apple.dt.xcodepreviews.service (17):
Jul ’20
Reply to Library/SPM issue with latest Xcode 11.4 beta
This appears to be fixed in Xcode 11.4.1. The release notes in feedback assistant say:Swift PackagesResolved IssuesFixed an issue where an error like "Swift package product A is linked as a static library by B and C. This will result in duplication of library code." was incorrectly emitted if an app and an embedded app extension or helper tool statically linked the same package product. If you previously set the DISABLE_DIAMOND_PROBLEM_DIAGNOSTIC build setting to work around this issue, you can delete this setting now. (59310009, 61227255) I wish the communication from Apple was better about things like this. Do I ask about this bug in the SPM section of the Swift.org forums? Probably not, I'd be told that Xcode issues should be posted here. But then nothing really happens. I wish we could just tag teams like @Xcode @SPM to get their attention about issues like this.Another gripe is that the Xcode 11.4.1 release notes inside the Mac App Store just say "Bug fixes and stability improvements". Why don't they at least mention to check the Feedback Assistant for the full release notes? Since the release notes in the App Store were empty, and the new iPhone SE was released that day, I figured Xcode 11.4.1 was just to add the iPhone SE simulator. It was luck that I tried compiling the project again - and dug deeper looking for actual release notes.I just feel like this could have easily been resolved before Xcode 11.4 was even released if we had a better way to communicate with people working on these tools.Anyway, thank you to everyone who offered workarounds.
Apr ’20