Xcode React本机初始化错误:未安装Cocoapods(在MAC上)

Xcode React本机初始化错误:未安装Cocoapods(在MAC上),xcode,react-native,cocoapods,Xcode,React Native,Cocoapods,在执行npx react native init MyProject时,我遇到了以下消息: 提示要求我安装Cocoapods,即使它已经安装 info Installing required CocoaPods dependencies? CocoaPods (https://cocoapods.org/) is not installed. CocoaPods is necessary for the iOS project to run correctly. Do you want to i

在执行
npx react native init MyProject
时,我遇到了以下消息:

提示要求我安装Cocoapods,即使它已经安装

info Installing required CocoaPods dependencies? CocoaPods (https://cocoapods.org/) is not installed. CocoaPods is necessary for the iOS project to run correctly. Do you want to install it?
当我选择使用GEM或自制软件安装时。以下消息将显示“已启动”:

UnhandledPromiseRejectionWarning: Error: An error occured while trying to install CocoaPods, which is required by this template.
Please try again manually: sudo gem install cocoapods.
CocoaPods documentation: https://cocoapods.org/
    at installCocoaPods (/Users/pedroaquino/Documents/ReactProjects/waves/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/installPods.js:180:13)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:16243) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
(node:16243) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
我的配置:

MacOS High Sierra 10.13.6
NPM 6.14.8
反应本机2.0.1

XCode 9.0

您确定已经安装了它吗?试试这个,检查一下