Pod安装在cocoapods版本1.0.0.beta.1中显示错误

时间:2023-01-18 00:07:50

My podfile was working but after updating to cocoapods version 1.0.0.beta.1

我的播客正在工作,但是在更新到cocoapods版本1.0.0.beta.1之后

pod install displays following error

pod安装显示以下错误

MacBook-Pro:iOS-TuneIn home$ pod install
Fully deintegrating due to major version update
Deleted 1 'Copy Pods Resources' build phases.
Deleted 1 'Check Pods Manifest.lock' build phases.
Deleted 1 'Embed Pods Frameworks' build phases.
- libPods.a
- Pods.debug.xcconfig
- Pods.release.xcconfig
Deleted 1 'Copy Pods Resources' build phases.
Deleted 1 'Check Pods Manifest.lock' build phases.
- libPods.a
Deleted 1 'Copy Pods Resources' build phases.
Deleted 1 'Check Pods Manifest.lock' build phases.
- libPods.a
Deleted 1 'Copy Pods Resources' build phases.
Deleted 1 'Check Pods Manifest.lock' build phases.
- libPods.a
Deleted 1 'Copy Pods Resources' build phases.
Deleted 1 'Check Pods Manifest.lock' build phases.
- libPods.a
- libPods.a
Deleted 1 empty `Pods` groups from project.
Removing `Pods` directory.

Project has been deintegrated. No traces of CocoaPods left in project.
Note: The workspace referencing the Pods project still remains.
Updating local specs repositories
Analyzing dependencies
[!] The dependency `AFNetworking (= 2.6.3)` is not used in any concrete target.
The dependency `MBProgressHUD (~> 0.9.1)` is not used in any concrete target.
The dependency `PDKeychainBindingsController (~> 0.0.1)` is not used in any concrete target.
The dependency `FMDB/SQLCipher` is not used in any concrete target.
The dependency `ZXingObjC (~> 3.1.0)` is not used in any concrete target.
The dependency `SDWebImage (~> 3.7.2)` is not used in any concrete target.
The dependency `SignalR-ObjC (~> 2.0.0.beta3)` is not used in any concrete target.
The dependency `CJPAdController (from `https://github.com/nabeelarif100/CJPAdController.git`)` is not used in any concrete target.
The dependency `ECSlidingViewController (~> 2.0.3)` is not used in any concrete target.
The dependency `VGParallaxHeader` is not used in any concrete target.
The dependency `EMString` is not used in any concrete target.
The dependency `Google/SignIn` is not used in any concrete target.
The dependency `VIPhotoView (~> 0.1)` is not used in any concrete target.
The dependency `EncryptedCoreData (from `https://github.com/project-imas/encrypted-core-data.git`)` is not used in any concrete target.
MacBook-Pro:iOS-TuneIn home$ 

Podfile:

Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
pod 'AFNetworking', '2.6.3'
pod 'MBProgressHUD', '~> 0.9.1'
pod 'PDKeychainBindingsController', '~> 0.0.1'
pod 'FMDB/SQLCipher'
pod 'ZXingObjC', '~> 3.1.0'
pod 'SDWebImage', '~>3.7.2'
pod 'SignalR-ObjC','~>2.0.0.beta3'
pod 'CJPAdController', :git => 'https://github.com/nabeelarif100/CJPAdController.git'
pod 'ECSlidingViewController', '~> 2.0.3'
pod 'VGParallaxHeader'
pod 'EMString'
pod 'Google/SignIn'
pod 'VIPhotoView', '~> 0.1'
pod 'EncryptedCoreData', :git => 'https://github.com/project-imas/encrypted-core-data.git'

12 个解决方案

#1


497  

You have to specify a target for each pod.

您必须为每个pod指定一个目标。

e.g. if before you had your Podfile written like this:

例如,如果你的播客文件是这样写的:

pod 'Alamofire', '~> 3.1.4'
pod 'SwiftyJSON', '~> 2.3.2'

just change it to

只是改变它

target "TargetName" do
    pod 'Alamofire', '~> 3.1.4'
    pod 'SwiftyJSON', '~> 2.3.2'
end

#2


58  

After the new changes to cocoapods, You have to add the following lines to your podfile.

在对cocoapods进行了新的更改之后,您必须将以下代码添加到您的podfile中。

target "YOUR_PROJECT_NAME" do

     pod "YOUR_POD"

end

#3


19  

From the CocoaPods website:

从CocoaPods网站:

CocoaPods provides a pod init command to create a Podfile with smart defaults. You should use it.

CocoaPods提供了pod init命令来创建一个具有智能默认的Podfile。你应该使用它。

#4


9  

you must add target 'your target' do and end around you pod like below.

你必须添加目标“你的目标”做和结束在你周围像下面。

target 'your target' do
pod 'AFNetworking', '2.6.3'
pod 'MBProgressHUD', '~> 0.9.1'
pod 'PDKeychainBindingsController', '~> 0.0.1'
end

plus: You may be need remove the pods dir, Podfile.lock and xcworkspace file, run the pod install again.

另外:你可能需要删除豆荚目录,播客。锁定和xcworkspace文件,再次运行pod安装。

#5


3  

I got the same issue today. For mitigation, I unintall cocoapod, then install again version 0.39.

我今天也有同样的问题。为了缓解这一问题,我将首先安装cocoapod,然后再次安装0.39版本。

here is the link how to uninstall: https://superuser.com/questions/686317/how-to-fully-uninstall-the-cocoapods-from-the-mac-machine

下面是如何卸载的链接:https://superuser.com/questions/686317/how to-full -uninstall-the- mac-machine

This answer does not fix the root cause, but can get you unblocked. I don't have enough reputation to leave comments, so I put an answer here to unblock you.

这个答案没有修复根本原因,但是可以让你畅通无阻。我没有足够的声誉来留下评论,所以我在这里给你一个答案。

#6


2  

I was this operation in the podfile:

我是podfile这个操作:

source 'https://github.com/CocoaPods/Specs.git'

源“https://github.com/CocoaPods/Specs.git”

platform :ios, '8.0'

ios平台:,“8.0”

target "targetprojectname" do

目标“targetprojectname”

pod "AFNetworking"

豆荚“AFNetworking”

end

结束

#7


1  

My podfile was formatted correctly, so the answer did not work for me. What I had to do was all of the following: First,

我的播客文件格式正确,所以答案对我不起作用。我要做的是:首先,

  1. gem uninstall cocoapods
  2. 宝石卸载cocoapods
  3. rvm get stable --auto-dotfiles
  4. ——auto-dotfiles rvm得到稳定
  5. rvm use ruby-2.1.2
  6. rvm使用ruby-2.1.2
  7. rvm osx-ssl-certs update all
  8. rvm osx-ssl-certs更新所有
  9. rvm rubygems latest
  10. rvm rubygems最新
  11. sudo gem sources -r https://rubygems.org/
  12. sudo gem源-r https://rubygems.org/
  13. sudo gem sources -a http://rubygems.org/
  14. sudo gem来源-a http://rubygems.org/
  15. gem install cocoapods -v 1.0.0.beta.1 --pre -V
  16. gem安装cocoapods -v 1.0.0.beta1——pre - v

I had SSL errors, timeout errors, and path errors. This fixed all of these. I am adding this answer in hopes that it will help someone - most people with this issue will NOT need to go through all of these steps, and should not do so if it is not neccesary. Keep in mind, that this is changing the d/l link to not use https, so be sure to change it back once you have resolved this issue. This, this, and this Stack Overflow question helped me finally resolve these issues.

我有SSL错误、超时错误和路径错误。这就解决了所有这些问题。我添加这个答案是希望它能对某些人有所帮助——大多数有这个问题的人不需要经历所有这些步骤,如果不是必要的话也不应该这样做。请记住,这是将d/l链接更改为不使用https,因此在解决了这个问题之后,请务必将其更改回原来的位置。这个、这个和这个堆栈溢出问题帮助我最终解决了这些问题。

#8


0  

I have the same problem, and even I changed to

我也有同样的问题,甚至我也变成了

target "TargetName" do pod 'Alamofire', '~> 3.1.4' pod 'SwiftyJSON', '~> 2.3.2' end

目标" target " do pod 'Alamofire', '~> 3.1.4' pod 'SwiftyJSON', '~> 2.3.2' end

It seems has some cache problem, it always read old version of PodFile, even I remove PodFile, the same error show up. It's weird.

它似乎有一些缓存问题,它总是读取旧版本的PodFile,甚至我删除了PodFile,同样的错误出现了。这很奇怪。

However, when I open a new terminal , running pod install, it works.

但是,当我打开一个新的终端,运行pod安装时,它就可以工作了。

#9


0  

1) Add and Open Podfile in Xcode instead of TextEdit or any other editor. (Syntax highlighting while viewing a pod file will simplify the process of finding syntax errors)

1)在Xcode中添加和打开Podfile,而不是TextEdit或任何其他编辑器。(查看pod文件时突出显示语法将简化查找语法错误的过程)

2) Add project dependancies as follows in your Podfile

2)在你的播客文件中添加项目依赖项

def pods
  pod 'AFNetworking', '~> 2.6'
  pod 'ORStackView', '~> 3.0'
  pod 'SwiftyJSON', '~> 2.3'
end

3) Add above define pods in project target as follows

3)在项目目标中添加以上定义pod,如下所示。

target 'App_Target_Name' do
  pods
end

#10


0  

for New version of cocoapods i.i 1.0.1

新版本的茧蜂。我1.0.1

pod 'SlideMenuControllerSwift' pod 'SDWebImage' pod 'SearchTextField'

pod 'SlideMenuControllerSwift' pod 'SDWebImage' pod 'SearchTextField'

I was getting error:

我收到了错误:

The dependency SlideMenuControllerSwift is not used in any concrete target. The dependency SDWebImage is not used in any concrete target. The dependency SearchTextField is not used in any concrete target.

依赖SlideMenuControllerSwift在任何具体目标中都不使用。依赖SDWebImage在任何具体目标中都不使用。任何具体目标都不使用依赖项SearchTextField。

than i changed it to

我把它改成了

target "YOUR_PROJECT_NAME" do

目标“YOUR_PROJECT_NAME”

 pod "YOUR_POD"

end

结束

than it worked

比工作

#11


0  

Pod file is just a ruby file, you need to specify required pod for all target. one of the available solution is to define all required pods in shared_pos, and use that for each target.

Pod文件只是一个ruby文件,您需要为所有目标指定所需的Pod。可用的解决方案之一是在shared_pos中定义所有必需的pod,并将其用于每个目标。

For ex:

为例:

Podfile

platform :ios, '9.0'

use_frameworks!

def Shared_Pods
    pod 'Quick', '0.5.0'
    pod 'Nimble', '2.0.0-rc.1'
end

target 'MyMainTarget' do
    Shared_Pods
end

target 'MyUITests' do
    Shared_Pods
end

#12


0  

platform :ios, '8.0'
target 'YourTargetName' do

  ALL PODS HERE

end

open terminal, go to project folder and enter code

打开终端,进入项目文件夹并输入代码

pod update

#1


497  

You have to specify a target for each pod.

您必须为每个pod指定一个目标。

e.g. if before you had your Podfile written like this:

例如,如果你的播客文件是这样写的:

pod 'Alamofire', '~> 3.1.4'
pod 'SwiftyJSON', '~> 2.3.2'

just change it to

只是改变它

target "TargetName" do
    pod 'Alamofire', '~> 3.1.4'
    pod 'SwiftyJSON', '~> 2.3.2'
end

#2


58  

After the new changes to cocoapods, You have to add the following lines to your podfile.

在对cocoapods进行了新的更改之后,您必须将以下代码添加到您的podfile中。

target "YOUR_PROJECT_NAME" do

     pod "YOUR_POD"

end

#3


19  

From the CocoaPods website:

从CocoaPods网站:

CocoaPods provides a pod init command to create a Podfile with smart defaults. You should use it.

CocoaPods提供了pod init命令来创建一个具有智能默认的Podfile。你应该使用它。

#4


9  

you must add target 'your target' do and end around you pod like below.

你必须添加目标“你的目标”做和结束在你周围像下面。

target 'your target' do
pod 'AFNetworking', '2.6.3'
pod 'MBProgressHUD', '~> 0.9.1'
pod 'PDKeychainBindingsController', '~> 0.0.1'
end

plus: You may be need remove the pods dir, Podfile.lock and xcworkspace file, run the pod install again.

另外:你可能需要删除豆荚目录,播客。锁定和xcworkspace文件,再次运行pod安装。

#5


3  

I got the same issue today. For mitigation, I unintall cocoapod, then install again version 0.39.

我今天也有同样的问题。为了缓解这一问题,我将首先安装cocoapod,然后再次安装0.39版本。

here is the link how to uninstall: https://superuser.com/questions/686317/how-to-fully-uninstall-the-cocoapods-from-the-mac-machine

下面是如何卸载的链接:https://superuser.com/questions/686317/how to-full -uninstall-the- mac-machine

This answer does not fix the root cause, but can get you unblocked. I don't have enough reputation to leave comments, so I put an answer here to unblock you.

这个答案没有修复根本原因,但是可以让你畅通无阻。我没有足够的声誉来留下评论,所以我在这里给你一个答案。

#6


2  

I was this operation in the podfile:

我是podfile这个操作:

source 'https://github.com/CocoaPods/Specs.git'

源“https://github.com/CocoaPods/Specs.git”

platform :ios, '8.0'

ios平台:,“8.0”

target "targetprojectname" do

目标“targetprojectname”

pod "AFNetworking"

豆荚“AFNetworking”

end

结束

#7


1  

My podfile was formatted correctly, so the answer did not work for me. What I had to do was all of the following: First,

我的播客文件格式正确,所以答案对我不起作用。我要做的是:首先,

  1. gem uninstall cocoapods
  2. 宝石卸载cocoapods
  3. rvm get stable --auto-dotfiles
  4. ——auto-dotfiles rvm得到稳定
  5. rvm use ruby-2.1.2
  6. rvm使用ruby-2.1.2
  7. rvm osx-ssl-certs update all
  8. rvm osx-ssl-certs更新所有
  9. rvm rubygems latest
  10. rvm rubygems最新
  11. sudo gem sources -r https://rubygems.org/
  12. sudo gem源-r https://rubygems.org/
  13. sudo gem sources -a http://rubygems.org/
  14. sudo gem来源-a http://rubygems.org/
  15. gem install cocoapods -v 1.0.0.beta.1 --pre -V
  16. gem安装cocoapods -v 1.0.0.beta1——pre - v

I had SSL errors, timeout errors, and path errors. This fixed all of these. I am adding this answer in hopes that it will help someone - most people with this issue will NOT need to go through all of these steps, and should not do so if it is not neccesary. Keep in mind, that this is changing the d/l link to not use https, so be sure to change it back once you have resolved this issue. This, this, and this Stack Overflow question helped me finally resolve these issues.

我有SSL错误、超时错误和路径错误。这就解决了所有这些问题。我添加这个答案是希望它能对某些人有所帮助——大多数有这个问题的人不需要经历所有这些步骤,如果不是必要的话也不应该这样做。请记住,这是将d/l链接更改为不使用https,因此在解决了这个问题之后,请务必将其更改回原来的位置。这个、这个和这个堆栈溢出问题帮助我最终解决了这些问题。

#8


0  

I have the same problem, and even I changed to

我也有同样的问题,甚至我也变成了

target "TargetName" do pod 'Alamofire', '~> 3.1.4' pod 'SwiftyJSON', '~> 2.3.2' end

目标" target " do pod 'Alamofire', '~> 3.1.4' pod 'SwiftyJSON', '~> 2.3.2' end

It seems has some cache problem, it always read old version of PodFile, even I remove PodFile, the same error show up. It's weird.

它似乎有一些缓存问题,它总是读取旧版本的PodFile,甚至我删除了PodFile,同样的错误出现了。这很奇怪。

However, when I open a new terminal , running pod install, it works.

但是,当我打开一个新的终端,运行pod安装时,它就可以工作了。

#9


0  

1) Add and Open Podfile in Xcode instead of TextEdit or any other editor. (Syntax highlighting while viewing a pod file will simplify the process of finding syntax errors)

1)在Xcode中添加和打开Podfile,而不是TextEdit或任何其他编辑器。(查看pod文件时突出显示语法将简化查找语法错误的过程)

2) Add project dependancies as follows in your Podfile

2)在你的播客文件中添加项目依赖项

def pods
  pod 'AFNetworking', '~> 2.6'
  pod 'ORStackView', '~> 3.0'
  pod 'SwiftyJSON', '~> 2.3'
end

3) Add above define pods in project target as follows

3)在项目目标中添加以上定义pod,如下所示。

target 'App_Target_Name' do
  pods
end

#10


0  

for New version of cocoapods i.i 1.0.1

新版本的茧蜂。我1.0.1

pod 'SlideMenuControllerSwift' pod 'SDWebImage' pod 'SearchTextField'

pod 'SlideMenuControllerSwift' pod 'SDWebImage' pod 'SearchTextField'

I was getting error:

我收到了错误:

The dependency SlideMenuControllerSwift is not used in any concrete target. The dependency SDWebImage is not used in any concrete target. The dependency SearchTextField is not used in any concrete target.

依赖SlideMenuControllerSwift在任何具体目标中都不使用。依赖SDWebImage在任何具体目标中都不使用。任何具体目标都不使用依赖项SearchTextField。

than i changed it to

我把它改成了

target "YOUR_PROJECT_NAME" do

目标“YOUR_PROJECT_NAME”

 pod "YOUR_POD"

end

结束

than it worked

比工作

#11


0  

Pod file is just a ruby file, you need to specify required pod for all target. one of the available solution is to define all required pods in shared_pos, and use that for each target.

Pod文件只是一个ruby文件,您需要为所有目标指定所需的Pod。可用的解决方案之一是在shared_pos中定义所有必需的pod,并将其用于每个目标。

For ex:

为例:

Podfile

platform :ios, '9.0'

use_frameworks!

def Shared_Pods
    pod 'Quick', '0.5.0'
    pod 'Nimble', '2.0.0-rc.1'
end

target 'MyMainTarget' do
    Shared_Pods
end

target 'MyUITests' do
    Shared_Pods
end

#12


0  

platform :ios, '8.0'
target 'YourTargetName' do

  ALL PODS HERE

end

open terminal, go to project folder and enter code

打开终端,进入项目文件夹并输入代码

pod update