我的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'
Gasper Kolen.. 498
您必须为每个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
那很有效.要将相同的pod添加到多个目标,请参阅http://natashatherobot.com/cocoapods-installing-same-pod-multiple-targets/ (10认同)
目标是目标名称:) (3认同)
谢谢它现在正在工作,但奇怪的是(在我早期的Xcode项目中不需要指定目标)! (3认同)
我想两次投票给你的答案:[] (3认同)
Karthik damo.. 58
对cocoapods进行新的更改后,您必须将以下行添加到podfile中.
target "YOUR_PROJECT_NAME" do pod "YOUR_POD" end
你应该得到更多的选票@Karthik.任何人都没有提到这里的"目标"是什么意思 (2认同)
Tr0yJ.. 19
来自CocoaPods网站:
CocoaPods提供了一个
pod init
创建具有智能默认值的Podfile 的命令.你应该使用它.
它不会添加"目标"名称'do end` (2认同)
小智.. 9
你必须添加target 'your target' do
和end
你周围的荚状之下.
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
再次运行.
您必须为每个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
对cocoapods进行新的更改后,您必须将以下行添加到podfile中.
target "YOUR_PROJECT_NAME" do pod "YOUR_POD" end
来自CocoaPods网站:
CocoaPods提供了一个
pod init
创建具有智能默认值的Podfile 的命令.你应该使用它.
你必须添加target 'your target' do
和end
你周围的荚状之下.
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
再次运行.