Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Including a plist file with my cocoapod

I am building a private framework to be used within a private pod specs repository. Lets call the framework "IOSExampleFramework".

I am having a problem trying to bundle a plist along with my source files. An example of my pod spec is:

   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" => "[email protected]" }

  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

My sources work fine, however the plist is in the same directory as these sources and does not pull down when I'm trying to do a pod update in the application I need it for.

I've also tried specifying a wildcard "*.plist" in resources, however I don't want to pull down info.plist, although it didn't work anyway.

Any help would be appreciated

like image 499
Biggs Avatar asked Apr 22 '16 15:04

Biggs


1 Answers

For anyone else viewing this issue, I resolved it by creating a Folder called "assets" to place the Plist. I then proceeded to add the line:

s.resources = "CTYCrashReporter/Assets/*"

The pods then seemed to pull in the file fine. Unusual that it didn't work with the specific name.

like image 128
Biggs Avatar answered Sep 20 '22 13:09

Biggs