我正在尝试安装SwiftValidator库(Accessible here,但我无法让它工作。
基本打开终端和cd到xcode项目的目录。在那里,我创建了一个包含以下内容的Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, "8.1"
use_frameworks!
pod 'SwiftValidator', '3.0.1'
之后我输入了终端:
pod install
这是我在控制台中得到的输出:
Updating local specs repositories
Updating spec repo `master`
$ /usr/bin/git pull --ff-only
From https://github.com/CocoaPods/Specs
435c890..1ee4098 master -> origin/master
Updating 435c890..1ee4098
Fast-forward
Specs/KMCache/0.1.1/KMCache.podspec.json | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100644 Specs/KMCache/0.1.1/KMCache.podspec.json
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods`: (``)
Finding Podfile changes
- SwiftValidator
Resolving dependencies of `Podfile`
Comparing resolved specification to the sandbox manifest
- SwiftValidator
Downloading dependencies
-> Using SwiftValidator (3.0.1)
- Running pre install hooks
Generating Pods project
- Creating Pods project
- Adding source files to Pods project
- Adding frameworks to Pods project
- Adding libraries to Pods project
- Adding resources to Pods project
- Linking headers
- Installing targets
- Installing target `SwiftValidator` iOS 8.1
- Generating Info.plist file at `Pods/Target Support
Files/SwiftValidator/Info.plist`
- Generating module map file at `Pods/Target Support
Files/SwiftValidator/SwiftValidator.modulemap`
- Generating umbrella header at `Pods/Target Support
Files/SwiftValidator/SwiftValidator-umbrella.h`
- Installing target `Pods` iOS 8.1
- Generating Info.plist file at `Pods/Target Support
Files/Pods/Info.plist`
- Generating module map file at `Pods/Target Support
Files/Pods/Pods.modulemap`
- Generating umbrella header at `Pods/Target Support
Files/Pods/Pods-umbrella.h`
- Running post install hooks
- Writing Xcode project file to `Pods/Pods.xcodeproj`
- Generating deterministic UUIDs
- Writing Lockfile in `Podfile.lock`
- Writing Manifest in `Pods/Manifest.lock`
Integrating client project
Integrating target `Pods` (`Mawq.xcodeproj` project)
- Running post install hooks
- cocoapods-stats from
`/Library/Ruby/Gems/2.0.0/gems/cocoapods-stats-0.6.2/lib/cocoapods_plugin.rb`
Sending stats
- SwiftValidator, 3.0.1
Pod installation complete! There is 1 dependency from the Podfile and 1 total
pod installed.
事情似乎很棒,但是当我打开项目(不是.xcodeproj文件而不是.xcworkspace)并且我输入以下视图控制器类时,它表示它无法识别底层模块
import SwiftValidator
当事情似乎正确安装时,知道为什么会发生这种情况吗?
更新:添加了项目目录的图像......