@@ -249,9 +249,8 @@ let reactJsErrorHandler = RNTarget(
249249let reactGraphicsApple = RNTarget (
250250 name: . reactGraphicsApple,
251251 path: " ReactCommon/react/renderer/graphics/platform/ios " ,
252- linkedFrameworks: [ " CoreGraphics " ] , // [macOS] UIKit removed; linked conditionally via platformLinkerSettings below
253- // [macOS] Package.swift evaluates on the host (macOS), not the target, so #if os(macOS) doesn't work for cross-compilation.
254- // not the target. Use .when(platforms:) for cross-compilation support.
252+ linkedFrameworks: [ " CoreGraphics " ] ,
253+ // [macOS] UIKit/AppKit linked conditionally for cross-compilation
255254 platformLinkerSettings: [
256255 . linkedFramework( " UIKit " , . when( platforms: [ . iOS, . visionOS] ) ) ,
257256 . linkedFramework( " AppKit " , . when( platforms: [ . macOS] ) ) ,
@@ -369,19 +368,18 @@ let reactCore = RNTarget(
369368 " ReactCommon/react/runtime/platform/ios " , // explicit header search path to break circular dependency. RCTHost imports `RCTDefines.h` in ReactCore, ReacCore needs to import RCTHost
370369 ] ,
371370 linkedFrameworks: [ " CoreServices " ] ,
372- // [macOS] RCTUIKit is part of React-Core on 0.81 — add platform-conditional UIKit/AppKit linking
371+ // [macOS]
373372 platformLinkerSettings: [
374373 . linkedFramework( " UIKit " , . when( platforms: [ . iOS, . visionOS] ) ) ,
375374 . linkedFramework( " AppKit " , . when( platforms: [ . macOS] ) ) ,
376375 ] ,
377- // macOS]
378376 excludedPaths: [ " Fabric " , " Tests " , " Resources " , " Runtime/RCTJscInstanceFactory.mm " , " I18n/strings " , " CxxBridge/JSCExecutorFactory.mm " , " CoreModules " ] ,
379377 dependencies: [ . reactNativeDependencies, . reactCxxReact, . reactPerfLogger, . jsi, . reactJsiExecutor, . reactUtils, . reactFeatureFlags, . reactRuntimeScheduler, . yoga, . reactJsInspector, . reactJsiTooling, . rctDeprecation, . reactCoreRCTWebsocket, . reactRCTImage, . reactTurboModuleCore, . reactRCTText, . reactRCTBlob, . reactRCTAnimation, . reactRCTNetwork, . reactFabric, . hermesPrebuilt] ,
380378 sources: [ " . " , " Runtime/RCTHermesInstanceFactory.mm " ]
381379)
382380
383381/// React-Fabric.podspec
384- // [macOS: on macOS, use platform/macos view sources instead of platform/cxx
382+ // [macOS
385383#if os(macOS)
386384let reactFabricViewPlatformSources = [ " components/view/platform/macos " ]
387385let reactFabricViewPlatformExcludes = [ " components/view/platform/cxx " ]
@@ -400,7 +398,7 @@ let reactFabric = RNTarget(
400398 " components/view/tests " ,
401399 " components/view/platform/android " ,
402400 " components/view/platform/windows " ,
403- // "components/view/platform/macos", // [macOS] moved to reactFabricViewPlatformExcludes for conditional exclusion
401+ // "components/view/platform/macos", // [macOS]
404402 " components/scrollview/tests " ,
405403 " components/scrollview/platform/android " ,
406404 " mounting/tests " ,
@@ -445,8 +443,7 @@ let reactFabricComponents = RNTarget(
445443 " components/view/platform/android " ,
446444 " components/view/platform/windows " ,
447445 " components/view/platform/macos " ,
448- // [macOS] Both IOSSwitchShadowNode.mm and MacOSSwitchShadowNode.mm are included;
449- // they use #if TARGET_OS_OSX guards internally so only the correct one compiles.
446+ // [macOS] Both switch files included; TARGET_OS_OSX guards select the correct one.
450447 " components/textinput/platform/android " ,
451448 " components/text/platform/android " ,
452449 " components/textinput/platform/macos " ,
@@ -654,7 +651,7 @@ class BinaryTarget: BaseTarget {
654651
655652class RNTarget : BaseTarget {
656653 let linkedFrameworks : [ String ]
657- let platformLinkerSettings : [ LinkerSetting ] // [macOS] Platform-conditional framework linking (e.g. UIKit vs AppKit)
654+ let platformLinkerSettings : [ LinkerSetting ] // [macOS]
658655 let excludedPaths : [ String ]
659656 let dependencies : [ String ]
660657 let sources : [ String ] ?
0 commit comments