cocoapods 0.37.1 - 更新 Podfile 时,框架不再链接

cocoapods 0.37.1 - when updating Podfile, frameworks are no longer linked

几天来我一直在为这个问题苦苦挣扎,我需要一些指导。

下面是我原来的 Podfile 的内容:

pod 'Parse', '~> 1.7.1'
pod 'ParseUI', '~> 1.1.3'
pod 'ParseCrashReporting'

一切正常,直到前几天我决定再添加一些 pods。这是我的 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"}

仅当您将 CocoaPods 构建到静态库时才需要桥接 header。切换到框架后,您应该在源文件中使用 import ParseUI

pod install 对我来说解决了这个问题。有时与团队合作时,可以安装其他 pods。

1) 删除pod文件后,我再次尝试pod install

2) 还是报错。

3) 再次尝试 pod install

4) 然后我做了 pod repo update

它奏效了。