gpt4 book ai didi

iOS Cocoapods 文件未找到错误

转载 作者:行者123 更新时间:2023-12-02 22:53:09 24 4
gpt4 key购买 nike

我正在使用 Objective-C 和 Swift 代码相结合的项目。当我从 Jenkins 安装 cocoa pod 时,出现错误文件未找到。我想为 swift 安装 ObjectMapper,为 Objective-C 安装其余的。

 target ‘XXXXXXX’ do
pod 'GoogleAnalytics’
pod 'GoogleTagManager’,’~> 3.15.0’
pod 'KeychainItemWrapper'
pod 'Base64nl'

use_frameworks!
pod 'ObjectMapper'
end

但是我收到类似错误 - fatal error :找不到“Base64.h”文件 #导入“Base64.h”

但是 base64 pod 已安装在我的项目中,源文件也在我的 PODs 文件夹中。

最佳答案

如果你使用use_frameworks!在 Podfile 中,您不必在桥接 header 中包含每个 Objective-C pod。如果 pod 作为静态库而不是框架分发,则只需执行此操作。

With the use_frameworks! directive, you can now consume Swift libraries using CocoaPods! After you've added use_frameworks! to your Podfile, you can directly import Swift libraries from your Swift code using the framework name (i.e. import AFNetworking).

Potential Issue: Unfortunately, all Objective-C Pods haven't been updated to work with the new dynamic frameworks behavior. You might come across certain Objective-C Pods that no longer build after adding the use_frameworks! directive. In these cases you can either not use the use_frameworks! directive (you'll now need to create a bridging header) or manually edit the offending Pod to help it find the headers (as done in the linked issue). Cocoapods

关于iOS Cocoapods 文件未找到错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44794764/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com