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

时间:2016-01-01 14:30:02

标签: ios cocoapods

我的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$ 

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 个答案:

答案 0 :(得分:498)

您必须为每个广告连播指定目标。

e.g。如果之前你的Podfile写得像这样:

nameOfString.replaceRange(nameOfString.startIndex...nameOfString.startIndex, with: String(nameOfString[nameOfString.startIndex]).capitalizedString)

将其更改为

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

答案 1 :(得分:58)

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

target "YOUR_PROJECT_NAME" do

     pod "YOUR_POD"

end

答案 2 :(得分:19)

来自CocoaPods网站:

  

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

答案 3 :(得分:9)

您必须在下方添加target 'your target' doend

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

plus:您可能需要删除pod目录,Podfile.lock和xcworkspace文件,再次运行pod install

答案 4 :(得分:3)

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

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

这个答案并没有解决根本原因,但可以让你解除阻止。我没有足够的声誉留下评论,所以我在这里给你一个解答来解锁你。

答案 5 :(得分:2)

我在podfile中执行了此操作:

来源' https://github.com/CocoaPods/Specs.git'

平台:ios,' 8.0'

target" targetprojectname"做

pod" AFNetworking"

答案 6 :(得分:1)

我的podfile格式正确,所以答案对我不起作用。我做的是以下所有内容: 首先,

  1. gem uninstall cocoapods
  2. rvm get stable --auto-dotfiles
  3. rvm使用ruby-2.1.2
  4. rvm osx-ssl-certs update all
  5. rvm ruby​​gems latest
  6. sudo gem sources -r https://rubygems.org/
  7. sudo gem sources -a http://rubygems.org/
  8. gem install cocoapods -v 1.0.0.beta.1 --pre -V
  9. 我遇到了SSL错误,超时错误和路径错误。这解决了所有这些问题。我正在添加这个答案,希望它可以帮助某些人 - 大多数有这个问题的人不需要完成所有这些步骤,如果不是必要的话,不应该这样做。请记住,这会将d / l链接更改为不使用https,因此请务必在解决此问题后将其更改回来。 Thisthisthis Stack Overflow问题帮助我最终解决了这些问题。

答案 7 :(得分:0)

我有同样的问题,甚至我改为

目标" TargetName"做     pod' Alamofire','〜> 3.1.4'     pod' SwiftyJSON','〜> 2.3.2' 端

似乎有一些缓存问题,它总是读取旧版本的PodFile,即使我删除了PodFile,同样的错误也会显示出来。这很奇怪。

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

答案 8 :(得分:0)

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

2)在 Podfile

中添加项目依赖项,如下所示
def pods
  pod 'AFNetworking', '~> 2.6'
  pod 'ORStackView', '~> 3.0'
  pod 'SwiftyJSON', '~> 2.3'
end

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

target 'App_Target_Name' do
  pods
end

答案 9 :(得分:0)

用于新版cocoapods i.i 1.0.1

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

我收到了错误:

依赖项Selected Files: undefined未在任何具体目标中使用。 依赖项SlideMenuControllerSwift未在任何具体目标中使用。 依赖项SDWebImage未在任何具体目标中使用。

比我改为

目标“YOUR_PROJECT_NAME”执行

SearchTextField

比它的工作

答案 10 :(得分:0)

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

例如:

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

答案 11 :(得分:0)

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

  ALL PODS HERE

end

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

pod update