大佬教程收集整理的这篇文章主要介绍了自定义 React Native 库中的 CocoaLumberjack 依赖,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我们的团队为 IOS 创建了一个 SDK,我已将其导入到我的 react 本机自定义库中。 SDK 还依赖于 Swift Package CocoaLumberjack。
我在我的 podspec 中添加了“s.dependency 'CocoaLumberjack','~> 3.7.0'”。 当我将我的库添加到 @R_874_2083@ 应用程序并运行 pod install 时,我收到如下错误:
The following Swift pods cAnnot yet bE integrated as static librarIEs:
The Swift pod `react-native-sdk` depends upon `CocoaLumberjack`,which does not define modules. To opt into those targets generaTing module maps (which is necessary to import them from Swift when building as static librarIEs),you may set `use_modular_headers!` globally in your Podfile,or specify `:modular_headers => true` for particular dependencIEs.
我的应用程序 pod 文件如下:
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios,'11.0'
target 'SdkExample' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
pod 'react-native-sdk',:path => '../..'
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled,Flipper will not work and
# you should disable these next few lines.
use_flipper!({ 'Flipper' => '0.80.0' })
post_install do |installer|
flipper_post_install(installer)
end
end
我的自定义库的 podspec 是这样的:
require "Json"
package = JsON.parse(file.read(file.join(__dir__,"package.Json")))
Pod::Spec.new do |s|
s.name = "react-native-sdk"
s.version = package["version"]
s.sumMary = package["description"]
s.homepage = package["homepage"]
s.license = package["license"]
s.authors = package["author"]
s.platforms = { :ios => "11.0" }
s.source = { :git => "https://github.com/ankushss/react-native-sdk.git",:tag => "#{s.version}" }
s.source_files = "ios/**/*.{h,m,mm,swift}"
s.dependency "React-Core"
s.dependency 'CocoaLumberjack','~> 3.7.0'
s.vendored_framework = 'ios/CustomFramework.framework'
end
请帮助我。
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
以上是大佬教程为你收集整理的自定义 React Native 库中的 CocoaLumberjack 依赖全部内容,希望文章能够帮你解决自定义 React Native 库中的 CocoaLumberjack 依赖所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。