在我的 cocoapod 中包含一个 plist 文件

Big*_*ggs 5 objective-c plist ios cocoapods

我正在构建一个要在私有 pod 规范存储库中使用的私有框架。让我们将框架称为“IOSExampleFramework”。

我在尝试将 plist 与我的源文件捆绑在一起时遇到问题。我的 pod 规范的一个例子是:

   Pod::Spec.new do |s|

  s.name         = "IOSExampleFramework"
  s.version      = "0.0.2"
  s.summary      = "IOSExampleFramework Framwork"
  s.description  = <<-DESC
This framework is an example framework for stack overflow question purposes.
                   DESC

  s.homepage     = "http://example.com"

  s.license      = { :type => "Custom", :text => <<-LICENSE
                   Copyright Stephen Biggerstaff
                 LICENSE
               }

  s.author             = { "Stephen Biggerstaff" => "stephen.biggerstaff@example.com" }

  s.ios.deployment_target = "8.0"
  s.source       = { :git => "https://exampleRepo.git", :tag => "0.0.2" }
  s.source_files  = "Classes", "IOSExampleFramework/IOSExampleFramework/*.{h,m}"
  #s.resource = "DeviceIdentifiers.plist"

  s.ios.vendored_frameworks  = "IOSExampleFramework/CrashReporter.framework"

  #s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2", 'OTHER_LDFLAGS' => "-ObjC" }

end
Run Code Online (Sandbox Code Playgroud)

我的源工作正常,但是 plist 与这些源位于同一目录中,并且当我尝试在需要它的应用程序中进行 pod 更新时不会下拉。

我还尝试在资源中指定通配符“*.plist”,但是我不想下拉 info.plist,尽管它无论如何都不起作用。

任何帮助,将不胜感激

Big*_*ggs 5

对于查看此问题的其他任何人,我通过创建一个名为“assets”的文件夹来放置 Plist 来解决它。然后我继续添加以下行:

s.resources = "CTYCrashReporter/Assets/*"
Run Code Online (Sandbox Code Playgroud)

然后豆荚似乎可以很好地拉入文件。不寻常的是它不适用于特定名称。