@@ -246,15 +246,12 @@ let reactJsErrorHandler = RNTarget(
246246let reactGraphicsApple = RNTarget (
247247 name: . reactGraphicsApple,
248248 path: " ReactCommon/react/renderer/graphics/platform/ios " ,
249- linkedFrameworks: [ " CoreGraphics " ] , // [macOS] UIKit removed; linked conditionally via platformLinkerSettings below
250- // [macOS: UIKit on iOS/visionOS, AppKit on macOS
251- // Note: #if os(macOS) doesn't work here because Package.swift runs on the host,
252- // not the target. Use .when(platforms:) for cross-compilation support.
249+ linkedFrameworks: [ " CoreGraphics " ] ,
250+ // [macOS] UIKit/AppKit linked conditionally for cross-compilation
253251 platformLinkerSettings: [
254252 . linkedFramework( " UIKit " , . when( platforms: [ . iOS, . visionOS] ) ) ,
255253 . linkedFramework( " AppKit " , . when( platforms: [ . macOS] ) ) ,
256254 ] ,
257- // macOS]
258255 dependencies: [ . reactDebug, . jsi, . reactUtils, . reactNativeDependencies]
259256)
260257
@@ -368,13 +365,13 @@ let reactCore = RNTarget(
368365 " ReactCommon/react/runtime/platform/ios " , // explicit header search path to break circular dependency. RCTHost imports `RCTDefines.h` in ReactCore, ReacCore needs to import RCTHost
369366 ] ,
370367 linkedFrameworks: [ " CoreServices " ] ,
371- excludedPaths: [ " Fabric " , " Tests " , " Resources " , " Runtime/RCTJscInstanceFactory.mm " , " I18n/strings " , " CxxBridge/JSCExecutorFactory.mm " , " CoreModules " , " RCTUIKit " ] , // [macOS] added RCTUIKit exclusion (separate target)
372- dependencies: [ . reactNativeDependencies, . reactCxxReact, . reactPerfLogger, . jsi, . reactJsiExecutor, . reactUtils, . reactFeatureFlags, . reactRuntimeScheduler, . yoga, . reactJsInspector, . reactJsiTooling, . rctDeprecation, . reactCoreRCTWebsocket, . reactRCTImage, . reactTurboModuleCore, . reactRCTText, . reactRCTBlob, . reactRCTAnimation, . reactRCTNetwork, . reactFabric, . hermesPrebuilt, . reactRCTUIKit] , // [macOS] added .reactRCTUIKit
368+ excludedPaths: [ " Fabric " , " Tests " , " Resources " , " Runtime/RCTJscInstanceFactory.mm " , " I18n/strings " , " CxxBridge/JSCExecutorFactory.mm " , " CoreModules " , " RCTUIKit " ] , // [macOS]
369+ dependencies: [ . reactNativeDependencies, . reactCxxReact, . reactPerfLogger, . jsi, . reactJsiExecutor, . reactUtils, . reactFeatureFlags, . reactRuntimeScheduler, . yoga, . reactJsInspector, . reactJsiTooling, . rctDeprecation, . reactCoreRCTWebsocket, . reactRCTImage, . reactTurboModuleCore, . reactRCTText, . reactRCTBlob, . reactRCTAnimation, . reactRCTNetwork, . reactFabric, . hermesPrebuilt, . reactRCTUIKit] , // [macOS]
373370 sources: [ " . " , " Runtime/RCTHermesInstanceFactory.mm " ]
374371)
375372
376373/// React-Fabric.podspec
377- // [macOS: on macOS, use platform/macos view sources instead of platform/cxx
374+ // [macOS
378375#if os(macOS)
379376let reactFabricViewPlatformSources = [ " components/view/platform/macos " ]
380377let reactFabricViewPlatformExcludes = [ " components/view/platform/cxx " ]
@@ -393,7 +390,7 @@ let reactFabric = RNTarget(
393390 " components/view/tests " ,
394391 " components/view/platform/android " ,
395392 " components/view/platform/windows " ,
396- // "components/view/platform/macos", // [macOS] moved to reactFabricViewPlatformExcludes for conditional exclusion
393+ // "components/view/platform/macos", // [macOS]
397394 " components/scrollview/tests " ,
398395 " components/scrollview/platform/android " ,
399396 " mounting/tests " ,
@@ -437,16 +434,16 @@ let reactFabricComponents = RNTarget(
437434 " components/modal/platform/cxx " ,
438435 " components/view/platform/android " ,
439436 " components/view/platform/windows " ,
440- // "components/view/platform/macos", // [macOS] not needed here — sources don't include components/view
437+ // "components/view/platform/macos", // [macOS]
441438 " components/textinput/platform/android " ,
442- // "components/textinput/platform/macos", // [macOS] removed — directory does not exist
439+ // "components/textinput/platform/macos", // [macOS]
443440 " components/text/platform/android " ,
444441 " components/text/tests " ,
445442 " textlayoutmanager/tests " ,
446443 " textlayoutmanager/platform/android " ,
447444 " textlayoutmanager/platform/cxx " ,
448445 " textlayoutmanager/platform/windows " ,
449- // "textlayoutmanager/platform/macos", // [macOS] removed — directory does not exist
446+ // "textlayoutmanager/platform/macos", // [macOS]
450447 " conponents/rncore " , // this was the old folder where RN Core Components were generated. If you ran codegen in the past, you might have some files in it that might make the build fail.
451448 ] ,
452449 dependencies: [ . reactNativeDependencies, . reactCore, . reactJsiExecutor, . reactTurboModuleCore, . jsi, . logger, . reactDebug, . reactFeatureFlags, . reactUtils, . reactRuntimeScheduler, . reactCxxReact, . yoga, . reactRendererDebug, . reactGraphics, . reactFabric, . reactTurboModuleBridging] ,
@@ -662,7 +659,7 @@ class BinaryTarget: BaseTarget {
662659
663660class RNTarget : BaseTarget {
664661 let linkedFrameworks : [ String ]
665- let platformLinkerSettings : [ LinkerSetting ] // [macOS] Platform-conditional framework linking (e.g. UIKit vs AppKit)
662+ let platformLinkerSettings : [ LinkerSetting ] // [macOS]
666663 let excludedPaths : [ String ]
667664 let dependencies : [ String ]
668665 let sources : [ String ] ?
0 commit comments