我现在一直在努力奋斗这几天,我可以使用一些指导。
以下是我原始Podfile的内容:
pod 'Parse', '~> 1.7.1'
pod 'ParseUI', '~> 1.1.3'
pod 'ParseCrashReporting'
一切正常,直到有一天我决定添加更多豆荚。这是我的Podfile现在的样子:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Parse', '~> 1.7.1'
pod 'ParseUI', '~> 1.1.3'
pod 'ParseCrashReporting'
pod 'Alamofire', '~> 1.2'
如您所见,我正在尝试添加Alamofire。当我做的时候
$ pod update
$ pod install
似乎所有东西都安装好了。然而,当我在Xcode中打开我的项目并完成索引时,所有的地狱都已经崩溃了(好吧,不是真的)。
似乎Parse不再与我的项目相关联,因为我有50多个错误:
Use of undeclared type 'PFLogInViewController'
我对Ruby / Gemfiles或命令行并不陌生,但我对Xcode和Cocoapods来说还是个新手。
任何帮助将不胜感激。谢谢。
编辑:下面是我的桥接标题。
// Objective-C Bridging File
#import <Foundation/Foundation.h>
#import <Parse/Parse.h>
#import <ParseCrashReporting/ParseCrashReporting.h>
#import <ParseUI/ParseUI.h>
#import <Bolts/Bolts.h>
编辑:
执行pod install
后,我收到以下错误:
Error: unable to read module map contents from 'Target Support Files/Pods-Parse/Pods-Parse.modulemap': Error Domain=NSCocoaErrorDomain Code=260 "The file “Pods-Parse.modulemap” couldn’t be opened because there is no such file." UserInfo=0x7fc988cd4920 {NSFilePath=/Volumes/BigMan/Code/Swift/ProjectName/Pods/Target Support Files/Pods-Parse/Pods-Parse.modulemap, NSUnderlyingError=0x7fc98ac96850 "The operation couldn’t be completed. No such file or directory"}
答案 0 :(得分:6)
只有在将CocoaPods构建到静态库时,才需要桥接头。切换到框架后,您应该在源文件中使用import ParseUI
。
答案 1 :(得分:2)
让pod install
为我工作以解决此问题。有时与团队合作时,可以安装其他pod。
答案 2 :(得分:2)
1)删除pod文件后,我再次尝试pod install
。
2)我仍然有错误。
3)再次尝试pod install
。
4)然后我做了pod repo update
它有效。