Skip to content

Merge Fix playing state not reported correctly to iOS - #1140

Merged
ryanheise merged 2 commits into
ryanheise:minorfrom
marckornberger:fix/playing-state-not-reported-correctly-in-ios-13-or-higher
Jul 1, 2026
Merged

Merge Fix playing state not reported correctly to iOS#1140
ryanheise merged 2 commits into
ryanheise:minorfrom
marckornberger:fix/playing-state-not-reported-correctly-in-ios-13-or-higher

Conversation

@marckornberger

Copy link
Copy Markdown
Contributor

This PR fixes the fact that a #if TARGET_OS_OSX is excluding code from the build that would correctly report the playing state of the app to iOS versions >= 13.0 therefore breaking OS integrations

Issue fixed by this PR

Pre-launch Checklist

  • I read the CONTRIBUTING.md and followed the process outlined there for submitting PRs.
  • My change is not breaking and lands in minor branch OR my change is breaking and lands in major branch.
  • If I'm the first to contribute to the next version, I incremented the version number in pubspec.yaml according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change (format: * DESCRIPTION OF YOUR CHANGE (@your-git-username)).
  • I updated/added relevant documentation (doc comments with ///).
  • I ran dart analyze.
  • I ran dart format.
  • I ran flutter test and all tests are passing.

@estien

estien commented Feb 22, 2026

Copy link
Copy Markdown

Appreciate this PR. It fixed a bug for me where CarPlay didn't pick up on the play progress for iOS either.

@@ -290,10 +290,13 @@ - (void) updateNowPlayingInfo {
updated |= [self updateNowPlayingField:MPNowPlayingInfoPropertyElapsedPlaybackTime value:[NSNumber numberWithDouble:([position doubleValue] / 1000)]];
MPNowPlayingInfoCenter *center = [MPNowPlayingInfoCenter defaultCenter];
#if TARGET_OS_OSX

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think there is no need to keep the macro here ? maybe the old code is fine we just need to remove the macro checking for OSX

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, when I wrote this, Flutter supported older versions of iOS where this would not compile. My understanding is that Flutter now supports only iOS 13 and above which means technically you may be right, and we don't need this #if anymore.

@ryanheise

Copy link
Copy Markdown
Owner

I have merged this with the proposed changes outlined in the review/comments.

APIUM added a commit to APIUM/finamp that referenced this pull request Jul 10, 2026
- audio_service now sets MPNowPlayingInfoCenter.playbackState on iOS,
  merged upstream via ryanheise/audio_service#1140 (0.18.20)
- Rebase the audio_service fork onto the latest upstream, dropping our
  copy of that fix and keeping the command registration and
  iosKeepNowPlayingOnStop commits
- Remove the playback_state method channel and its Dart caller
- Closes finamp-app#1590
APIUM added a commit to APIUM/finamp that referenced this pull request Jul 10, 2026
- audio_service now sets MPNowPlayingInfoCenter.playbackState on iOS,
  merged upstream via ryanheise/audio_service#1140 (0.18.20)
- Rebase the audio_service fork onto the latest upstream, dropping our
  copy of that fix and keeping the command registration and
  iosKeepNowPlayingOnStop commits
- Remove the playback_state method channel and its Dart caller
- Closes finamp-app#1590
APIUM added a commit to APIUM/finamp that referenced this pull request Jul 12, 2026
- audio_service now sets MPNowPlayingInfoCenter.playbackState on iOS,
  merged upstream via ryanheise/audio_service#1140 (0.18.20)
- Rebase the audio_service fork onto the latest upstream, dropping our
  copy of that fix and keeping the command registration and
  iosKeepNowPlayingOnStop commits
- Remove the playback_state method channel and its Dart caller
- Closes finamp-app#1590
APIUM added a commit to APIUM/finamp that referenced this pull request Jul 12, 2026
- audio_service now sets MPNowPlayingInfoCenter.playbackState on iOS,
  merged upstream via ryanheise/audio_service#1140 (0.18.20)
- Rebase the audio_service fork onto the latest upstream, dropping our
  copy of that fix and keeping the command registration and
  iosKeepNowPlayingOnStop commits
- Remove the playback_state method channel and its Dart caller
- Closes finamp-app#1590
APIUM added a commit to APIUM/finamp that referenced this pull request Jul 12, 2026
- audio_service now sets MPNowPlayingInfoCenter.playbackState on iOS,
  merged upstream via ryanheise/audio_service#1140 (0.18.20)
- Rebase the audio_service fork onto the latest upstream, dropping our
  copy of that fix and keeping the command registration and
  iosKeepNowPlayingOnStop commits
- Remove the playback_state method channel and its Dart caller
- Closes finamp-app#1590
APIUM added a commit to APIUM/finamp that referenced this pull request Jul 12, 2026
- audio_service now sets MPNowPlayingInfoCenter.playbackState on iOS,
  merged upstream via ryanheise/audio_service#1140 (0.18.20)
- Rebase the audio_service fork onto the latest upstream, dropping our
  copy of that fix and keeping the command registration and
  iosKeepNowPlayingOnStop commits
- Remove the playback_state method channel and its Dart caller
- Closes finamp-app#1590
APIUM added a commit to APIUM/finamp that referenced this pull request Jul 12, 2026
- audio_service now sets MPNowPlayingInfoCenter.playbackState on iOS,
  merged upstream via ryanheise/audio_service#1140 (0.18.20)
- Rebase the audio_service fork onto the latest upstream, dropping our
  copy of that fix and keeping the command registration and
  iosKeepNowPlayingOnStop commits
- Remove the playback_state method channel and its Dart caller
- Closes finamp-app#1590
APIUM added a commit to APIUM/finamp that referenced this pull request Jul 12, 2026
- audio_service now sets MPNowPlayingInfoCenter.playbackState on iOS,
  merged upstream via ryanheise/audio_service#1140 (0.18.20)
- Rebase the audio_service fork onto the latest upstream, dropping our
  copy of that fix and keeping the command registration and
  iosKeepNowPlayingOnStop commits
- Remove the playback_state method channel and its Dart caller
- Closes finamp-app#1590
APIUM added a commit to APIUM/finamp that referenced this pull request Jul 12, 2026
- audio_service now sets MPNowPlayingInfoCenter.playbackState on iOS,
  merged upstream via ryanheise/audio_service#1140 (0.18.20)
- Rebase the audio_service fork onto the latest upstream, dropping our
  copy of that fix and keeping the command registration and
  iosKeepNowPlayingOnStop commits
- Remove the playback_state method channel and its Dart caller

Closes finamp-app#1590
APIUM added a commit to APIUM/finamp that referenced this pull request Jul 25, 2026
- audio_service now sets MPNowPlayingInfoCenter.playbackState on iOS,
  merged upstream via ryanheise/audio_service#1140 (0.18.20)
- Rebase the audio_service fork onto the latest upstream, dropping our
  copy of that fix and keeping the command registration and
  iosKeepNowPlayingOnStop commits
- Remove the playback_state method channel and its Dart caller

Closes finamp-app#1590
APIUM added a commit to APIUM/finamp that referenced this pull request Jul 28, 2026
- audio_service now sets MPNowPlayingInfoCenter.playbackState on iOS,
  merged upstream via ryanheise/audio_service#1140 (0.18.20)
- Rebase the audio_service fork onto the latest upstream, dropping our
  copy of that fix and keeping the command registration and
  iosKeepNowPlayingOnStop commits
- Remove the playback_state method channel and its Dart caller

Closes finamp-app#1590
APIUM added a commit to APIUM/finamp that referenced this pull request Jul 28, 2026
- audio_service now sets MPNowPlayingInfoCenter.playbackState on iOS,
  merged upstream via ryanheise/audio_service#1140 (0.18.20)
- Rebase the audio_service fork onto the latest upstream, dropping our
  copy of that fix and keeping the command registration and
  iosKeepNowPlayingOnStop commits
- Remove the playback_state method channel and its Dart caller

Closes finamp-app#1590
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants