Fix: Build Compatibility Issues in XCode 26.4 with macOS plugins#13281
Open
andrewsoncha wants to merge 3 commits intoobsproject:masterfrom
Open
Fix: Build Compatibility Issues in XCode 26.4 with macOS plugins#13281andrewsoncha wants to merge 3 commits intoobsproject:masterfrom
andrewsoncha wants to merge 3 commits intoobsproject:masterfrom
Conversation
Replaced Implicit type conversion within mac plugins(mac-capture, mac-syphon, mac-videotoolbox, mac-virtualcam) with Explicit ones to clear compile errors with Apple Clang 21.0 and XCode 26.4.
jcm93
reviewed
Apr 2, 2026
PatTheMav
reviewed
Apr 2, 2026
Applied changes suggested by @jcm93 and @PatTheMav Co-authored-by: PatTheMav <patthemav+github@gmail.com> Co-authored-by: jcm <6864788+jcm93@users.noreply.github.com>
jcm93
reviewed
Apr 3, 2026
Removed unnecessary code in plugins/mac-capture/mac-audio.c Co-authored-by: jcm <6864788+jcm93@users.noreply.github.com>
PatTheMav
reviewed
Apr 3, 2026
Member
PatTheMav
left a comment
There was a problem hiding this comment.
Just to confirm, the "The code has been tested" checkbox is set, so I assume all the changed paths have been confirmed to produce the same results as before?
Author
|
Yes. The code builds without any compile errors and the functionality related to macOS in the resulting program still functions the same as before. |
Member
Sorry, I should've been more clear in my ask. Can you confirm that, e.g.:
It'd not be the end of the world if outcomes change, but we'd need to know if things have potentially changed to figure out if those are desirable or undesirable changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds explicit type conversion within mac plugins:
With the newest XCode 26.4 version, the compiler raises an error when there is an implicit type conversion between types with different sizes. Because of this, the code for the above plugins raise a compile error when compiled using the latest Apple Clang 21.0 and XCode 26.4.
While there are many reasons for why doing type conversion between types with different sizes may be bad, the cases where they are used within the above plugins are well within range of the smaller type or are simple enum values.
Motivation and Context
The current obs-studio master branch fails to build with Apple Clang 21.0 and XCode 26.4 due to compile errors. The error has been reproduced by another member of the community (@WizardCM) The compile errors all come from implicit conversion of types within the source code of the the above mentioned plugins.
How Has This Been Tested?
Used Cmake to build the macos preset and used Xcode to compile. More specifically, followed the instructions here.
Used
to generate a xcode project and used
xcodebuild -configuration Debug -scheme obs-studio -parallelizeTargets -destination "generic/platform=macOS,name=Any Mac"to build the XCode Project and confirmed that there were no compile errors with the OBS source code.
While after applying the changes there are no more compile/build errors within the OBS source code, there is now a build error with the included qt library file, more specifically the obs-studio/.deps/obs-deps-qt6-2025-08-23-universal/lib/QtCore.framework/Headers/qyieldcpu.h file.

The error message is as follows:
While I was able to find this forum thread and apply changes listed there to the qyieldcpu.h and have it finally build without error, I was not able to include the changes to the included qt library in the pull request.
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: