【问题标题】:What should the "source" in the podspec be for a privately hosted react-native library?对于私有托管的 react-native 库,podspec 中的“源”应该是什么?
【发布时间】:2020-04-24 10:40:06
【问题描述】:

我正在为 ios 开发一个私有的 react-native 库。 该代码托管在私人 git 存储库上,只有少数人可以访问。 我目前拥有的 podspec 文件是这样的:


Pod::Spec.new do |s|
  s.name         = "SomeName"
  s.version      = "0.0.1"
  s.summary      = "SomeSummary"
  s.description  = <<-DESC
                  SomeDescription
                   DESC
  s.homepage     = "https://somehomepage.com"
  s.platform     = :ios, "9.0"
  s.source_files  = "*.{h,m}"
  s.requires_arc = true
  s.author       = "someAuthor"
  s.dependency "React"
end

我遇到的问题是,当我在本地 react-native 应用程序上使用该库并执行 pod install 时,出现错误:

The `SomeName` pod failed to validate due to 1 error:
    - WARN  | attributes: Missing required attribute `license`.
    - ERROR | attributes: Missing required attribute `source`.
    - WARN  | license: Missing license type.
    - WARN  | description: The description is equal to the summary.

在这种情况下,source 应该是什么?

【问题讨论】:

    标签: react-native cocoapods react-native-ios


    【解决方案1】:

    source 应该指定私有 github 存储库。请参阅文档和示例here。

    【讨论】:

      猜你喜欢
      • 2021-06-18
      • 2013-02-02
      • 1970-01-01
      • 1970-01-01
      • 2020-02-11
      • 1970-01-01
      • 2011-03-26
      • 2020-11-04
      相关资源
      最近更新 更多