离子 - 添加/删除phonegap-push-plugin - 找不到CocoaPods [英] Ionic - Add/Remove phonegap-push-plugin - CocoaPods was not found

查看:268
本文介绍了离子 - 添加/删除phonegap-push-plugin - 找不到CocoaPods的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写一个Ionic应用程序但是我遇到了很多问题。特别是一个问题是当我尝试使用命令添加phonegap-push-plugin

I'm writing an Ionic app but I'm getting so many issues. One issue in particular is that when I try to add the phonegap-push-plugin using the command

sudo ionic plugin add phonegap-plugin-push

我收到以下错误:

Error: CocoaPods was not found. Please install version 1.0.1 or greater from https://cocoapods.org/

我很明显尝试安装此软件,因为错误显示,但我无法在任何地方找到版本1.0.1。

I've obviously tried installing this software as the error suggests, but I cannot find version 1.0.1 anywhere.

我也想了解这是什么需要以及为什么Ionic认为需要它。

I'd also like to understand what this is required for and why Ionic thinks it needs it.

非常感谢

推荐答案

安装 push 你必须先安装 cocoapods 。在Ionic项目目录中的终端上执行以下步骤。

To install push you must first install cocoapods. Follow these steps on your terminal in the Ionic project directory.

首先删除您尝试安装的内容

First remove what you tried to install

ionic cordova plugin remove phonegap-plugin-push

下一步安装cocoapods

Next install cocoapods

sudo gem install cocoapods

然后你需要同步cocoapods repo

Then you need to sync the cocoapods repo

pod setup




这可能需要一段时间

This may take a while

最后安装推送

ionic plugin add phonegap-plugin-push --variable SENDER_ID="XXXXXXX"

这篇关于离子 - 添加/删除phonegap-push-plugin - 找不到CocoaPods的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆