@@ -34,8 +34,21 @@ Pod::Spec.new do |s|
3434 s . source_files = podspec_sources ( "**/*.{cpp,h}" , "**/*.h" )
3535 s . header_dir = "react/renderer/runtimescheduler"
3636 s . exclude_files = "tests"
37+ # POC (public C++ API surface reduction): RuntimeScheduler exposes a single
38+ # public umbrella header (RuntimeScheduler.umbrella.h). Including any other
39+ # module header directly is gated by an opt-in guard that is inert unless
40+ # REACT_RUNTIMESCHEDULER_ENFORCE_UMBRELLA is defined. CocoaPods exposes the
41+ # whole header_dir, so the individual headers remain includable here; the guard
42+ # macro is the only way to enforce "umbrella only" in the pods build.
43+ #
44+ # To enable enforcement: add REACT_RUNTIMESCHEDULER_BUILDING=1 to this pod's own
45+ # compilation via the GCC_PREPROCESSOR_DEFINITIONS line below, and propagate
46+ # REACT_RUNTIMESCHEDULER_ENFORCE_UMBRELLA to consumers. NOTE: enforcing on
47+ # consumers needs `user_target_xcconfig`, which CocoaPods discourages (xcconfig
48+ # collisions), and it breaks consumers that still include the headers directly.
3749 s . pod_target_xcconfig = {
3850 "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard ( ) ,
51+ # "GCC_PREPROCESSOR_DEFINITIONS" => "$(inherited) REACT_RUNTIMESCHEDULER_BUILDING=1",
3952 "HEADER_SEARCH_PATHS" => header_search_paths . join ( ' ' ) }
4053
4154 resolve_use_frameworks ( s , header_mappings_dir : "../../.." , module_name : "React_runtimescheduler" )
0 commit comments