如何删除USE_FRAMEMS!在Objective-c项目上继续使用快速吊舱?

人气:557 发布:2022-10-16 标签: ios swift cocoapods react-native-firebase react-native-ios

问题描述

我们的项目是Objective-c项目。

由于我们在CocoaPods中不再使用react-native-firebaseWEcan't useuse_frameworks!

问题是我们有一个快速Pod依赖关系(PromiseKit),据我所知,要使用快速依赖关系,我们必须使用use_frameworks!

我想做的是两全其美,也就是:

删除use_frameworks!,以便react-native-firebase工作, 保留PromiseKit快速依赖项。

当前Podfile:

platform :ios, '10.0'

target 'TestApp' do

    use_frameworks!

    # swift pod
    pod 'PromiseKit'

    # react-native-firebase
    pod 'Firebase/Core', '~> 5.3.0'
    pod 'Firebase/DynamicLinks', '~> 5.3.0'
    pod 'Firebase/Messaging', '~> 5.3.0'

end

我注意到有此命令:modular_headers => trueuse_modular_headers,我感觉它们可能与我正在寻找的解决方案Cocoapods 1.5相关,也可能不相关,但我似乎无法将这些点连接起来。

编辑:

如果删除use_frameworks!(即使我将其替换为use_modular_headers!),我会收到此错误:

有什么需要帮忙的吗?

推荐答案

我也遇到过这个问题。并为此找到完美的解决方案。

https://github.com/joncardasis/cocoapods-user-defined-build-types

这是CocoaPods的一个插件,我们可以通过它指定在特定的Pod上使用"dynamic framework"(即"use_framework"所做的事情)。CocoaPods当前不支持此功能,这就是使用此插件解决问题的原因。

524