【问题标题】:'failed to emit precompiled header' while adding new pod into existing Project在将新 pod 添加到现有项目时“未能发出预编译的标头”
【发布时间】:2018-05-27 02:37:14
【问题描述】:

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

我面临的问题是在将新 pod 添加到 Project 后无法发出预编译的标头。

在项目中,我正在使用桥接头处理 obj-C 和 swift。

在 Pod 文件中,我添加了 SendBird

我的 Pod 文件是:

Podfile

平台:ios,'9.0'

abstract_target 'Virgla' 做 使用_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/Library/Developer/Xcode/DerivedData/Virgla-fqsvarxwchjhswedkkofchexhztp/Build/Intermediates.noindex/PrecompiledHeaders/Project_1-Bridging-Header-swift_108K1C1LI14RC-clang_FJJZJV3ZS8XP.pch” /Users/narvind/Desktop/Project/Project_1-Bridging-Header.h'

【问题讨论】:

  • 我在 TwitterKit 上遇到了同样的问题
  • 嗨..我也面临着与桥接头相同的问题。你能找到根本原因吗?

标签: objective-c swift cocoapods


【解决方案1】:

这是我解决failed to emit precompiled header警告的方法:

NetworkingHelper.h(我的网络管理员)中,使用@import AFNetworking; 而不是#import "AFHTTPSessionManager.h"

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-03-05
    • 1970-01-01
    • 2018-02-27
    • 2018-09-17
    • 2016-03-12
    • 2018-07-16
    • 2017-06-08
    • 1970-01-01
    相关资源
    最近更新 更多