Cocoapods 版本1.0.0. beta.1中的 Pod 安装显示错误

我的 podfile 在升级到 cocoapods 版本1.0.0. beta.1之后还能用

Pod install 显示以下错误

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$

播客:

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'
76657 次浏览

我今天遇到了同样的问题。为了缓解,我卸载 cocoapod,然后再安装0.39版本。

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

这个答案并不能解决问题的根本原因,但是可以帮助你解决问题。我没有足够的名声留言,所以我在这里放了一个答案来解除你的封锁。

你必须为每个分离舱指定一个目标。

例如,如果之前你的 Podfile 是这样写的:

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

改成

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

我的 podfile 格式正确,所以答案对我不起作用。我 曾经要做的是: 首先,

  1. Gem 卸载 cocoapods
  2. Rvm 稳定下来,自动文件
  3. Rvm 使用 ruby-2.1.2
  4. Rvmosx-ssl-certs 更新所有
  5. 最新的红宝石
  6. Sudo gem source-r https://rubygems.org/
  7. Sudo gem source-a http://rubygems.org/
  8. Gem install cocoapods-v1.0.0. beta.1—— pre-V

我有 SSL 错误、超时错误和路径错误。这些都修好了。我添加这个答案,希望它将帮助某人-大多数人与这个问题将不需要通过所有这些步骤,不应该这样做,如果它是不必要的。请记住,这是将 d/l 链接更改为不使用 https,因此一旦您解决了这个问题,请务必将其更改回来。这个这个这个堆栈溢出问题帮助我最终解决了这些问题。

来自 CocoaPods 网站:

CocoaPods 提供了一个 pod init命令来创建具有智能默认值的 Podfile。

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

target "YOUR_PROJECT_NAME" do


pod "YOUR_POD"


end

我也有同样的问题,就连我也改变了

目标“ TargetName”执行 豆荚“ Alamofire”,’~ > 3.1.4’ Pod‘ SwiftyJSON’,’~ > 2.3.2’ 结束

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

但是,当我打开一个新的终端,运行吊舱安装,它的工作。

您必须添加 target 'your target' doend围绕您的豆荚如下。

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

附加: 您可能需要删除 pods dir、 Podfile.lock 和 xcworkspace 文件,再次运行 pod install

1)在 Xcode 添加和打开 < em > Podfile ,而不是使用 TextEdit 或任何其他编辑器

2)在你的 < em > Podfile 中添加项目依赖关系如下

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

3)在 项目目标中添加以上定义的 豆荚如下

target 'App_Target_Name' do
pods
end

对于 cocoapods 的新版本 i 1.0.1

Pod‘ SlideMenuControllerSwift’ 吊舱「 SDWebImage 」 Pod‘ SearchTextField’

我犯了一个错误:

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

比我改成的还多

目标“ YOUR _ PROJECT _ NAME”执行

 pod "YOUR_POD"

结束

更有效

我是这个行动在 podfile:

资料来源「 https://github.com/CocoaPods/Specs.git

平台: ios,’8.0’

目标“ targetprojectname”执行

吊舱“ AFNetworking”

结束

Pod 文件只是一个 ruby 文件,您需要为所有目标指定所需的 Pod。 可用的解决方案之一是在 share _ pos 中定义所有必需的 pods,并对每个目标使用它。

例如:

文件夹

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
platform :ios, '8.0'
target 'YourTargetName' do


ALL PODS HERE


end

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

pod update