The error message is as follows:

Cycle inside FBReactNativeSpec; building could produce unreliable results. This usually can be resolved by moving the shell script phase '[CP-User] Generate Specs' so that it runs before the build phase that depends on its outputs. Cycle details: → Target 'FBReactNativeSpec' has link command with output '/Users/wangbaoxiang/Library/Developer/Xcode/DerivedData/Project-gsmkalbsqetinifxsldxkckelfrz/Build/Products/Debug-iphon Eos/FBReactNativeSpec/FBReactNativeSpec framework/FBReactNativeSpec 'educational Target' FBReactNativeSpec 'from the compile command with input '/Users/wangbaoxiang/Desktop/ReactNativeApp/ios/Project/Pods/Target Support Files/FBReactNativeSpec FBReactNativeSpec - dummy. M. a. That 'command depends on the command in the Target' FBReactNativeSpec ': Script phase "[cp-user] Generate Specs" ○ Target 'FBReactNativeSpec' has copy command from '/Users/wangbaoxiang/Desktop/ReactNativeApp/node_modules/react-native/React/FBReactNativeSpec/FBReactNativeSpec/FBReactN ativeSpec.h' to '/Users/wangbaoxiang/Library/Developer/Xcode/DerivedData/Project-gsmkalbsqetinifxsldxkckelfrz/Build/Products/Debug-iphon Eos/FBReactNativeSpec/FBReactNativeSpec framework/Headers/FBReactNativeSpec h 'protection That command depends on command in Target 'FBReactNativeSpec': Script phase "[cp-user] Generate Specs"Copy the code

Two solutions:

  1. Modify theXcodetheBuild SystemTo:Legacy Build System

Xcode->File->Workspace Settings->Build System

  1. inPodfileAdd the following code to the file:
# need to move 'Generate Specs' build_phase to be first for FBReactNativeSpec
post_install do |installer|
    installer.pods_project.targets.each do |target|
      if (target.name&.eql?('FBReactNativeSpec'))
        target.build_phases.each do |build_phase|
          if (build_phase.respond_to?(:name) && build_phase.name.eql?('[CP-User] Generate Specs'))
            target.build_phases.move(build_phase, 0)
          end
        end
      end
    end
Copy the code

Then execute pod Install