@@ -382,6 +382,44 @@ def test_fixReactBridgingHeaderSearchPaths_correctlySetsTheHeaderSearchPathsForA
382382 end
383383 end
384384
385+ # ===================================== #
386+ # Test - Apply Xcode14 React-Core patch #
387+ # ===================================== #
388+
389+ def test_turnOffResourceBundleReactCore_correctlyAppliesPatch
390+ # Arrange
391+ react_core_debug_config = prepare_Code_Signing_YES_build_configuration ( "Debug" )
392+ react_core_release_config = prepare_Code_Signing_YES_build_configuration ( "Release" )
393+
394+ user_project_mock = UserProjectMock . new ( "a/path" , [
395+ prepare_config ( "Debug" ) ,
396+ prepare_config ( "Release" ) ,
397+ ] )
398+
399+ pods_projects_mock = PodsProjectMock . new ( [ ] ,
400+ {
401+ "hermes-engine" => { } ,
402+ "React-Core" => [ react_core_debug_config , react_core_release_config ] ,
403+ } )
404+
405+ installer = InstallerMock . new ( pods_projects_mock , [
406+ AggregatedProjectMock . new ( user_project_mock )
407+ ] )
408+
409+ # Act
410+ ReactNativePodsUtils . turn_off_resource_bundle_react_core ( installer )
411+
412+ # Assert
413+ # something like this?
414+ # assert_equal(pods_projects_mock.build_settings['CODE_SIGNING_ALLOWED'], "NO")
415+
416+ user_project_mock . native_targets . each do |target |
417+ target . build_configurations . each do |config |
418+ assert_equal ( config . build_configurations [ 'CODE_SIGNING_ALLOWED' ] , "NO" )
419+ end
420+ end
421+ end
422+
385423 # ================================= #
386424 # Test - Apply Mac Catalyst Patches #
387425 # ================================= #
@@ -502,3 +540,9 @@ def prepare_target(name, product_type = nil)
502540 prepare_config ( "Release" )
503541 ] , product_type )
504542end
543+
544+ def prepare_Code_Signing_YES_build_configuration ( name )
545+ return BuildConfigurationMock . new ( name , {
546+ "CODE_SIGNING_ALLOWED" => "YES"
547+ } )
548+ end
0 commit comments