Post

Replies

Boosts

Views

Activity

ApplicationMusicPlayer's endSeeking() Fails to Stop Fast Forward - Seeking Solutions
I've encountered a critical issue while developing a music player app using SwiftUI and MusicKit. The problem persists across multiple devices and iOS versions, specifically with the endSeeking() method of ApplicationMusicPlayer, which fails to stop the fast-forward operation as expected. Development Environment: Xcode 16 Beta 6 macOS Sonoma 15.0 Beta 7 (24A5327a) Affected Devices: iPhone 11 Pro Max (iOS 17.6) iPhone SE 3 (iOS 18.0 Beta 7) Here's the relevant code snippet: Image(systemName: "forward.end.circle") .foregroundStyle(.accent) .gesture( TapGesture() .onEnded { _ in vm.nextTrack() } ) .simultaneousGesture( LongPressGesture(minimumDuration: 0.5) .onChanged { isPressing in if isPressing { vm.player.beginSeekingForward() } } .onEnded { _ in vm.player.endSeeking() } ) The issue manifests when the long press ends: despite invoking the endSeeking() method, the fast-forward operation persists. To troubleshoot, I've taken the following steps: Confirmed that vm.player is set to ApplicationMusicPlayer.shared. Attempted to combine endSeeking() with beginSeekingForward(), as per the documentation guidelines. Despite these efforts, the problem persists across all tested devices and OS versions. This leads me to two critical questions: Has anyone else encountered a similar issue? Could this potentially be an undocumented bug in the latest MusicKit implementation?
2
1
337
Aug ’24