在现有项目中添加新Pod时,“未能发出预编译头文件” [英] 'failed to emit precompiled header' while adding new pod into existing Project

查看:78
本文介绍了在现有项目中添加新Pod时,“未能发出预编译头文件”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Obj-C中有一个项目。

I had one project that in Obj-C.

我面临的问题是在向Project中添加新的pod后无法发出预编译的头文件。

in that I'm facing issue failed to emit precompiled header after adding new pod into Project.

在项目中我正在使用objd头同时处理obj-C和swift。

in Project I'm working on both obj-C and swift using Bridging header.

在Pod文件中,我添加了 SendBird

In Pod File, I added the SendBird

我的Pod文件是:

平台:ios,'9.0'

platform :ios, '9.0'

抽象目标'Virgla'做
use_frameworks!

abstract_target 'Virgla' do use_frameworks!

pod 'ACKategories', :git => 'https://github.com/AckeeCZ/ACKategories.git', :tag => '2.3'    
pod 'FlurrySDK'
pod 'Fabric'
pod 'Crashlytics'

pod 'SSZipArchive'
pod 'SVProgressHUD'
pod 'MWFeedParser'
pod 'SDWebImage', '~> 3.7'
pod 'UIActivityIndicator-for-SDWebImage', '1.2'
pod 'RestKit', '~> 0.24' #was 0.20.3
pod 'MagicalRecord', '2.2'
pod 'MSCellAccessory'
pod 'UIAlertView+Blocks'
pod 'RMPickerViewController', '2.0.3'
pod 'Masonry', '1.0.2'
pod 'DateTools'
pod 'Parse', '~> 1.6'
pod 'TTTAttributedLabel', '2.0.0'
pod 'AFNetworking', '~> 2.6'

pod 'SendBirdSDK'


target 'SoMinn' do
end

target 'GrandAuto' do
end

target 'Tests' do
    inherit! :search_paths

    pod 'Kiwi'
    # pod 'Kiwi/XCTest'
end

与此同时,添加时无法建立错误

第一个错误:


/Users/narvind/Desktop/Project/Project-Bridging-Header.h:34:9: AFNetworking.h文件未找到

/Users/narvind/Desktop/Project/Project-Bridging-Header.h:34:9: 'AFNetworking.h' file not found

如果我从桥接头中删除了它,那么它将移至下一个,如果我也将其删除了,则移至下一。

if I removed this from bridging header then it move to next and go one if I also removed next.

第二个错误:


发射失败预编译的标头'/Users/narvind/Library/Developer/Xcode/DerivedData/Virgla-fqsvarxwchjhswedkkofchexhztp/Build/Intermediates.noindex/PrecompiledHeaders/Project_1-Bridging-Header-swift_108K1C1LI14S-ZpJVZJXP3Z /Project/Project_1-Bridging-Header.h'

Failed to emit precompiled header '/Users/narvind/Library/Developer/Xcode/DerivedData/Virgla-fqsvarxwchjhswedkkofchexhztp/Build/Intermediates.noindex/PrecompiledHeaders/Project_1-Bridging-Header-swift_108K1C1LI14RC-clang_FJJZJV3ZS8XP.pch' for bridging header '/Users/narvind/Desktop/Project/Project_1-Bridging-Header.h'


推荐答案

这是我的方法解决未能发出预编译的标头警告:

Here‘s my way to solve failed to emit precompiled header warning:

NetworkingHelper.h (我的网络管理员),使用 @import AFNetworking; 代替 #import AFHTTPSessionManager.h

in NetworkingHelper.h(my networking manager), using @import AFNetworking; instead of #import "AFHTTPSessionManager.h"

这篇关于在现有项目中添加新Pod时,“未能发出预编译头文件”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆