Post

Replies

Boosts

Views

Activity

Reply to Handling AVAudioEngine Configuration Change
I struggled with this for a long time and finally gave up and switched to using AVAudioSourceNode and playing my own audio. In my opinion the callbacks on AVPlayerNode are too coarse to give you the information you need to handle all the complex cases that can arise with interruptions, route changes etc.
Topic: Media Technologies SubTopic: Audio Tags:
Feb ’25
Reply to SwiftUI ScrollView performance in macOS 15
This is still an issue here for me on 15.2, with an M2 MacBook Air. Scrolling with the scrollbar is smooth. Scrolling with the trackpad is noticeably chunky although nothing in the SwiftUI profile shows any hangs. It's only on views managed by SwiftUI. The NSCollectionView views I have are fine.
Topic: UI Frameworks SubTopic: SwiftUI
Dec ’24
Reply to MusicKit UPCs changing and handling that
I'd like to hear what the recommended approach is here too. I've discovered that the id for an album is not a reliable handle for an Album because it can be different on two different devices even if referencing the same Album in the library. But a user's library might contain content they've added themselves so UPC also doesn't seem like a real solution.
Topic: Media Technologies SubTopic: Audio Tags:
Oct ’24
Reply to MusicKit Artwork url
I'm seeing something similar here. If I use ArtworkImage the image loads fine but if I try to load it via URLSession I get a bunch of errors like this: [ICUserIdentityStore] Failed to load properties for identity <ICUserIdentity 0x301b99b00: [Active Account: <unresolved>]>. err=Error Domain=ICError Code=-7013 "Client is not entitled to access account store" UserInfo={NSDebugDescription=Client is not entitled to access account store}
Topic: App & System Services SubTopic: General Tags:
Oct ’24
Reply to Preserving navigation state in NavigationSplitView detail view.
In case anybody else is struggling with this, the solution I finally found that works is like this. Basically not to use a selectable list as suggested above, and use willSet and didSet on the selected item to update the path. Observable class NavigationModel { private var navigationPaths = [RootSection: NavigationPath]() var path = NavigationPath() var selectedSection: RootSection? = RootSection.home { willSet { if let selectedSection { navigationPaths[selectedSection] = path } } didSet { if let selectedSection, let newPath = navigationPaths[selectedSection] { path = newPath } } } init(sections: [RootSection]) { for section in sections { navigationPaths[section] = NavigationPath() } } func selectSection(_ section: RootSection?) { if let section, selectedSection == section { navigationPaths[section] = NavigationPath() } else { selectedSection = section } } }
Topic: UI Frameworks SubTopic: SwiftUI
Jun ’24
Reply to Reset NavigationStack when changing selection of NavigationSplitView
[quote='741498022, Frameworks Engineer, /thread/722924?answerId=741498022#741498022'] When selection changes in the sidebar, the navigation system pops value-based links off the stack. [/quote] I think I'm seeing this in my macOS Swift app but in my case it's not the behavior I want. I have navigation links in the sidebar and various views in the detail view. But I want to preserve the state of each detail view so that when the user navigates back to a particular view the navigation path and scroll state is preserved. But the system seems to be resetting the state of each detail view even if I control the navigation paths myself. Is there a way to disable this behavior?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’24