Swift pod 依赖 Firebase,pod 规范 lint 错误

时间:2021-06-24 02:02:07

标签: ios swift firebase cocoapods

当我通过 swift 创建 cocoaPod 时遇到了一些问题,我的 swift pod 依赖项 firebase。当我开发 pod 时一切正常,但是当我 pod spec lint 时出现一个错误。 这是错误:

 - WARN  | source: Git SSH URLs will NOT work for people behind firewalls configured to only allow HTTP, therefore HTTPS is preferred.
    - WARN  | url: There was a problem validating the URL https://xxxxxxxxxxx.
    - ERROR | [iOS] unknown: Encountered an unknown error (The following Swift pods cannot yet be integrated as static libraries:

The Swift pod `MyPod` depends upon `FirebaseCore` and `FirebaseCrashlytics`, which do 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 规格:

  s.static_framework = true
  s.subspec 'Common' do |ss|
      ss.source_files = 'Source/Common/**/*.swift'
  end
   s.subspec 'MyPodFirebase' do |ss|
       ss.source_files = 'Source/Firebase/**/*.swift'
       ss.dependency 'FirebaseCore'
       ss.dependency 'FirebaseAnalytics'
       ss.dependency 'FirebaseCrashlytics'
       ss.dependency 'MyPod/Common'
   end

有人可以帮我吗?

0 个答案:

没有答案
相关问题