首页 文章

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

提问于
浏览
175

我的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 回答

  • 3

    您必须为每个pod指定目标 .

    例如如果之前你的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
    
  • 0

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

    target "YOUR_PROJECT_NAME" do
    
         pod "YOUR_POD"
    
    end
    
  • 497

    来自CocoaPods网站:

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

  • 0

    你必须在下面添加 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目录,Podfile.lock和xcworkspace文件,再次运行 pod install .

  • 0

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

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

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

  • 58

    我是podfile中的这个操作:

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

    平台:ios,'8.0'

    目标“targetprojectname”做

    pod“AFNetworking”

    结束

  • 19

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

    • gem卸载cocoapods

    • rvm获得稳定--auto-dotfiles

    • rvm使用ruby-2.1.2

    • rvm osx-ssl-certs全部更新

    • rvm rubygems最新

    • sudo gem sources -r https://rubygems.org/

    • sudo gem sources -a http://rubygems.org/

    • gem install cocoapods -v 1.0.0.beta.1 --pre -V

    我有SSL错误,超时错误和路径错误 . 这解决了所有这些问题 . 我正在添加这个答案,希望它可以帮助某些人 - 大多数有这个问题的人不需要完成所有这些步骤,如果不是必要的话,不应该这样做 . 请记住,这会将d / l链接更改为不使用https,因此请务必在解决此问题后将其更改回来 . Thisthisthis Stack Overflow问题帮助我最终解决了这些问题 .

  • 1

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

    目标“TargetName”做pod'Alamofire','〜> 3.1.4'pod'SwiftyJSON','〜> 2.3.2'结束

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

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

  • 0

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

    2)在 Podfile 中添加如下项目依赖项

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

    3)在 project target 中添加以上定义 pods ,如下所示

    target 'App_Target_Name' do
      pods
    end
    
  • 2

    新版cocoapods i.i 1.0.1

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

    我收到了错误:

    依赖项 SlideMenuControllerSwift 未在任何具体目标中使用 . 依赖项 SDWebImage 未在任何具体目标中使用 . 依赖项 SearchTextField 未在任何具体目标中使用 .

    比我改成了

    目标“YOUR_PROJECT_NAME”做

    pod "YOUR_POD"
    

    结束

    比它的工作

  • 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
    
  • 9
    platform :ios, '8.0'
    target 'YourTargetName' do
    
      ALL PODS HERE
    
    end
    

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

    pod update
    

相关问题