Skip to content

Feature/ios now playing widget pr - #1744

Open
martin-77 wants to merge 6 commits into
finamp-app:redesignfrom
martin-77:feature/ios-now-playing-widget-pr
Open

Feature/ios now playing widget pr#1744
martin-77 wants to merge 6 commits into
finamp-app:redesignfrom
martin-77:feature/ios-now-playing-widget-pr

Conversation

@martin-77

Copy link
Copy Markdown

Summary

Adds a native WidgetKit Now Playing widget for iOS.

The widget supports small, medium, and large sizes and mirrors Finamp's current playback state, artwork, metadata, favorite state, and optional star ratings.

Playback controls use App Intents and support:

  • Previous track
  • Play / Pause
  • Next track

On iOS 27 builds compiled with Swift 6.4 or newer, the widget also supports interactive metadata actions:

  • Toggle favorite
  • Set star rating
  • Clear star rating

On older toolchains or older iOS versions, rating/favorite state remains read-only.

Related issues

Addresses #156.

This also covers the iOS widget request previously discussed in #579, which was closed as a duplicate of #156.

The implementation intentionally only addresses the iOS side of #156; Android widget support remains outside the scope of this PR.

Architecture

The widget does not connect to Jellyfin directly.

Finamp's main process publishes a sanitized state snapshot and downsampled artwork into an App Group container. The WidgetKit extension only reads that state.

Shared widget state contains:

  • item ID
  • title
  • artist
  • album
  • playback state
  • favorite state
  • star rating
  • cover revision

No Jellyfin credentials or authentication tokens are shared with the widget extension.

Widget actions are routed back through the existing Finamp services instead of implementing a second playback or networking stack inside the extension.

Compatibility

  • Main app deployment target remains iOS 15
  • Widget extension requires iOS 17
  • Builds successfully with Xcode 26.6 stable
  • Builds successfully with Xcode 27 beta
  • iOS 27-only App Intent process targeting is guarded at compile time so stable Xcode releases can continue to build the project
  • Widget version and build number inherit Flutter's FLUTTER_BUILD_NAME and FLUTTER_BUILD_NUMBER

Verified release bundle versions:

Runner: 0.9.25 (126)
Widget: 0.9.25 (126)

Dependency

This PR depends on #1736 for optional Jellyfin star ratings.

Until #1736 is merged, its rating-related changes may also appear in this PR's diff. They are not duplicated as part of the widget implementation and can be rebased away once #1736 lands.

Apple Developer configuration

The following App Group must be registered in the Apple Developer account and enabled for both the main app and widget extension:

group.com.unicornsonlsd.finamp-ios.widget

Testing

Tested with:

  • Xcode 26.6 stable
  • Xcode 27 beta
  • iOS 27 device
  • Release build with codesigning disabled

Build command:

flutter build ios --release --no-pub --no-codesign

AI assistance

This implementation was created with assistance from AI. The code was manually reviewed, tested on device, and verified with both stable and beta Xcode toolchains.

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.

1 participant