Skip to content

feat(build): build a Mac Catalyst slice - #2

Open
alessandro-zanni wants to merge 2 commits into
streamyfin:avfoundation-ao-tvosfrom
alessandro-zanni:feat/maccatalyst
Open

alessandro-zanni wants to merge 2 commits into
streamyfin:avfoundation-ao-tvosfrom
alessandro-zanni:feat/maccatalyst

Conversation

@alessandro-zanni

@alessandro-zanni alessandro-zanni commented Sep 18, 2026 •

Copy link
Copy Markdown

Part of streamyfin/streamyfin#2080 (a native Mac Catalyst build of Streamyfin). The Streamyfin side is ready on alessandro-zanni/streamyfin@feat/mac-catalyst. It needs an MPVKit.xcframework with a maccatalyst slice, which the current release doesn't ship.

Changes

  • fix(build): pass the iOSSupport framework path to Mac Catalyst cflags. vo_avfoundation.m imports UIKit/UIKit.h, which on Catalyst lives under the macOS SDK's System/iOSSupport tree. ldFlags already added -iframework …/iOSSupport/… for maccatalyst but cFlags did not, so libmpv failed with 'UIKit/UIKit.h' file not found. That was the only compile error; ffmpeg and every other dependency already build for maccatalyst, so the old TODO about ffmpeg failing there no longer applies.
  • feat(build): include the Mac Catalyst slice in MPVKit.xcframework. create-combined-framework.sh had the four iOS/tvOS slices hardcoded, both in the platform loop and in the hand-written xcframework Info.plist. It now adds whichever platforms were built, maccatalyst included (ios-arm64_x86_64-maccatalyst, SupportedPlatformVariant = maccatalyst), so a partial build no longer fails on a missing slice. rebuild-libmpv.sh also rebuilds maccatalyst.

iOS/tvOS output is unchanged: same slices, same Info.plist entries.

Testing

  • make gpl platform=maccatalyst on Xcode 27.0: every library builds for arm64 + x86_64, and the combined xcframework lists ios-arm64_x86_64-maccatalyst (plutil -lint OK, lipo: x86_64 arm64).
  • With that xcframework, Streamyfin builds and runs as a Mac Catalyst app (Mac idiom). Login, browsing and playback with ASS subtitles through vo=avfoundation work.
  • Not tested: a make gpl of all five platforms in one run. I only built the maccatalyst slice.

To ship it

A release built with platform=ios,isimulator,tvos,tvsimulator,maccatalyst (then upload-framework.sh) would let Streamyfin point its podspec at it.

🤖 Generated with Claude Code

alessandro-zanni and others added 2 commits September 18, 2026 19:49
vo_avfoundation.m imports UIKit/UIKit.h, which on Mac Catalyst lives under
the SDK's System/iOSSupport tree. ldFlags already added it; cFlags did not,
so libmpv failed to compile for maccatalyst.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
create-combined-framework.sh listed the four iOS/tvOS slices by hand, both in
the platform loop and in the xcframework Info.plist. It now adds whichever
platforms were built, maccatalyst included, so a partial build no longer
fails on a missing slice. rebuild-libmpv.sh rebuilds maccatalyst too.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 555e0cb8-c2d9-4b84-8364-7f75bc52d183

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@alessandro-zanni
alessandro-zanni changed the base branch from release/0.41.0-av5 to avfoundation-ao-tvos October 19, 2026 02:25
@alessandro-zanni

alessandro-zanni commented Oct 19, 2026 •

Copy link
Copy Markdown
Author

Retargeted this to avfoundation-ao-tvos, where #1, #3 and #4 go: release/0.41.0-av5 is already merged there, and the two commits apply cleanly on top.

A short recap for review:

  • What it adds: a maccatalyst slice (arm64 + x86_64) in MPVKit.xcframework, next to the existing iOS, simulator and tvOS slices. The iOS and tvOS slices are built exactly as before.
  • Why: it's the only missing piece for a Mac Catalyst build of Streamyfin ([REQUEST]: Native Mac Catalyst build streamyfin#2080). The app side already builds and runs against a local xcframework built from this branch; it just can't use a release until one ships this slice.
  • The one non-obvious change: Catalyst cflags need the iOSSupport framework path (68e2b94), otherwise the UIKit/AVKit headers resolve against the macOS SDK.

Happy to adjust anything. Once it is in, Streamyfin needs a pre-release that ships the slice to point its podspec at.

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