Repository: react-native
Issue: PhaseScriptExecution [CP-User]\ Generate\ Specs..in target 'React-rncore' from project 'Pods'
Labels: Needs: Triage :mag:

### Description

when I build a ios enviroment, has an error, like below:
<img width="1250" alt="image" src="https://github.com/facebook/react-native/assets/19200534/dfea16bc-f5e0-403c-8989-6c7e917a9888">

I have no idea, what's wrong , I followed the instructions step by step.

Really need help

### Steps to reproduce

1. brew install node
2. brew install watchman
3. sudo gem install cocoapods
4. npx react-native@latest init AwesomeProject
5. yarn start
6. yarn ios

### React Native Version

0.73.6

### Affected Platforms

Runtime - iOS

### Output of `npx react-native info`

```text
(node:92067) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
System:
  OS: macOS 14.4
  CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Memory: 162.29 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 21.6.2
    path: /usr/local/bin/node
  Yarn:
    version: 1.22.22
    path: /usr/local/bin/yarn
  npm:
    version: 10.2.4
    path: /usr/local/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.15.2
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.4
      - iOS 17.4
      - macOS 14.4
      - tvOS 17.4
      - visionOS 1.1
      - watchOS 10.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.2 AI-232.10227.8.2321.11479570
  Xcode:
    version: 15.3/15E204a
    path: /usr/bin/xcodebuild
Languages:
  Java: Not Found
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.6
    wanted: ^0.73.6
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false
```


### Stacktrace or Logs

```text
PhaseScriptExecution [CP]\ Copy\ XCFrameworks /Users/venus/Library/Developer/Xcode/DerivedData/LunarCalendar-gdgarmrdxrkqsmgszzfrqshwimzy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-Glog.build/Script-46EB2E0001DA10.sh (in target 'Flipper-Glog' from project 'Pods')
    cd /Users/venus/Downloads/Code/learn/react\ native/LunarCalendar/ios/Pods
    /bin/sh -c /Users/venus/Library/Developer/Xcode/DerivedData/LunarCalendar-gdgarmrdxrkqsmgszzfrqshwimzy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-Glog.build/Script-46EB2E0001DA10.sh

PhaseScriptExecution [CP]\ Copy\ XCFrameworks /Users/venus/Library/Developer/Xcode/DerivedData/LunarCalendar-gdgarmrdxrkqsmgszzfrqshwimzy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-DoubleConversion.build/Script-46EB2E0001DA00.sh (in target 'Flipper-DoubleConversion' from project 'Pods')
    cd /Users/venus/Downloads/Code/learn/react\ native/LunarCalendar/ios/Pods
    /bin/sh -c /Users/venus/Library/Developer/Xcode/DerivedData/LunarCalendar-gdgarmrdxrkqsmgszzfrqshwimzy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-DoubleConversion.build/Script-46EB2E0001DA00.sh

RegisterExecutionPolicyException /Users/venus/Library/Developer/Xcode/DerivedData/LunarCalendar-gdgarmrdxrkqsmgszzfrqshwimzy/Build/Products/Debug-iphonesimulator/React-Core/RCTI18nStrings.bundle (in target 'React-Core-RCTI18nStrings' from project 'Pods')
    cd /Users/venus/Downloads/Code/learn/react\ native/LunarCalendar/ios/Pods
    builtin-RegisterExecutionPolicyException /Users/venus/Library/Developer/Xcode/DerivedData/LunarCalendar-gdgarmrdxrkqsmgszzfrqshwimzy/Build/Products/Debug-iphonesimulator/React-Core/RCTI18nStrings.bundle

warning: Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'LunarCalendar' from project 'LunarCalendar')
warning: Run script build phase '[CP-User] [Hermes] Replace Hermes for the right configuration, if needed' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'hermes-engine' from project 'Pods')

** BUILD FAILED **


The following build commands failed:
        PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/venus/Library/Developer/Xcode/DerivedData/LunarCalendar-gdgarmrdxrkqsmgszzfrqshwimzy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-rncore.build/Script-46EB2E0001DA30.sh (in target 'React-rncore' from project 'Pods')
(1 failure)

error Command failed with exit code 1.
```


### Reproducer

https://github.com/dfsfyt/reactnativelearn

### Screenshots and Videos

_No response_