处理依赖
KDE Connect iOS 项目使用 CocoaPods 来管理依赖:
COCOAPODS 是什么
CocoaPods 是 Swift 和 Objective-C Cocoa 项目的依赖项管理器。 它拥有超过 7.2 万个库,并在超过300万个应用程序中使用。 CocoaPods可以帮助您优雅地扩展项目。
与 CocoaPods 有关的文件是 Podfile
,它指定了这个项目面向的 iOS 的版本 (7.0)
,依赖的名称、版本和源:
platform :ios, '7.0'
pod 'CocoaAsyncSocket', '~> 7.3.5'
pod 'MRProgress'
pod 'InAppSettingsKit', '~> 2.1'
pod 'VTAcknowledgementsViewController'
pod 'XbICalendar', :podspec => 'https://raw.githubusercontent.com/libical/XbICalendar/master/XbICalendar.podspec'
pod 'MYBlurIntroductionView'
构建的第一步就是安装这些依赖。在安装了 CocoaPods 之后,我根据官方文档运行了 pod install
,但是出现了问题:
$ pod install
Analyzing dependencies
Fetching podspec for `XbICalendar` from `https://raw.githubusercontent.com/libical/XbICalendar/master/XbICalendar.podspec`
Downloading dependencies
Installing CocoaAsyncSocket (7.3.5)
Installing InAppSettingsKit (2.15)
Installing MRProgress (0.8.3)
Installing MYBlurIntroductionView (1.0.3)
Installing VTAcknowledgementsViewController (1.5.2)
Installing XbICalendar (0.3.3)
Generating Pods project
Integrating client projects
[!] Could not automatically select an Xcode workspace. Specify one in your Podfile like so:
workspace 'path/to/Workspace.xcworkspace'
[!] The abstract target Pods is not inherited by a concrete target, so the following dependencies won't make it into any targets in your project:
- CocoaAsyncSocket (~> 7.3.5)
- InAppSettingsKit (~> 2.1)
- MRProgress
- MYBlurIntroductionView
- VTAcknowledgementsViewController
- XbICalendar