Skip to content

Add support for Mac Catalyst#946

Open
jerryseigle wants to merge 4 commits intosoftware-mansion:mainfrom
jerryseigle:main
Open

Add support for Mac Catalyst#946
jerryseigle wants to merge 4 commits intosoftware-mansion:mainfrom
jerryseigle:main

Conversation

@jerryseigle
Copy link
Contributor

Closes #

⚠️ Breaking changes ⚠️

  • None.

Introduced changes

  • This PR adds Mac Catalyst stubs and build flags so the iOS implementation can compile and run under Catalyst.
  • It adds a runtime guard so creating an audio context does not crash when the worklets runtime is unavailable.
  • For Expo + Catalyst builds, React-Core must be built as static libraries, and FFmpeg must be disabled until updated bindings are available.

PR notes

  1. This change adds Mac Catalyst stubs and build flags so the iOS implementation can compile and run under Catalyst.
  2. On the current main branch, the project could build but would crash at runtime when creating the audio context if the worklets runtime was unavailable. This PR adds a guard so that case no longer crashes.
  3. For Expo + Catalyst, the Podfile must use static React-Core (not dynamic), otherwise the Catalyst build fails during linking.
  4. For Catalyst builds, FFmpeg must be disabled in the app Podfile (for example DISABLE_AUDIOAPI_FFMPEG=1) until updated FFmpeg bindings are available.

⚠️ Help needed: Before moving forward, help is needed to create updated FFmpeg bindings that properly support Mac Catalyst.

Podfile example (for Expo + Catalyst)

ENV['DISABLE_AUDIOAPI_FFMPEG'] = '1'
ENV['RCT_USE_PREBUILT_RNCORE'] = '0'
ENV['RCT_USE_RN_DEP'] = '0'
ENV['RCT_BUILD_FROM_SOURCE'] = '1'

use_frameworks! :linkage => :static

post_install do |installer|
  react_native_post_install(
    installer,
    config[:reactNativePath],
    :mac_catalyst_enabled => true,
  )

  installer.pods_project.targets.each do |target|
    if target.name =~ /React|RCT|Yoga|hermes|cxxreact/i
      target.build_configurations.each do |config|
        config.build_settings['MACH_O_TYPE'] = 'staticlib'
        config.build_settings['SKIP_INSTALL'] = 'NO'
      end
    end
  end

  installer.pods_project.targets.each do |pod_target|
    next unless ['RNAudioAPI', 'Pods-myapp'].include?(pod_target.name)
    pod_target.build_configurations.each do |config|
      config.build_settings['OTHER_LDFLAGS[sdk=macosx*]'] = '$(inherited)'
    end
  end
end

@jerryseigle jerryseigle changed the title Added support for Mac Catalyst Add support for Mac Catalyst Feb 10, 2026
@poneciak57 poneciak57 requested a review from mdydek February 10, 2026 17:15
@michalsek michalsek self-requested a review February 11, 2026 17:37
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