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

标签 ios xcode swift parse-platform cocoapods

我断断续续地为此苦苦挣扎了几天,我需要一些指导。

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

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

一切正常,直到前几天我决定添加更多 pod。这是我的 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。当我做一个

$ pods 更新 $ pod 安装

看起来一切都安装正常。然而,当我在 Xcode 中打开我的项目并完成索引时,一切都乱套了(好吧,不是真的)。​​

Parse 似乎不再链接到我的项目,因为我有 50 多个错误:

使用未声明的类型“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

关于ios - cocoapods 0.37.1 - 更新 Podfile 时,框架不再链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30363402/

相关文章:

ios - 从 URL 下载图像时 Nsurlsession 内存泄漏

swift - 基于嵌套类型属性反序列化 JSON 数组

iOS8 今日扩展 : Detect removed or added today extension

ios - Xcode 检查依赖关系错误 : OneSignalNotificationServiceExtension requires a provisioning profile

javascript - 从资源中将 javascript 加载到 UIWebView

ios - 核心数据实体新属性 - 是否需要新模型版本

arrays - 在swift中获取元组数组的子集

ios - UIStackView 高度,内容在中间而不是在顶部

ios - 在 iOS 中进行复制拟合的最佳方法?

ios - 使用Xcode在iPad上比在iPhone上放大字体