I have a project that I want to be a part of cocoapods or just have an easy installation via cocoapods.
Ok, let's see in it.
It has directories in root:
Tools/ #directory where all items of project stored
ExternalLibraries/ # directory where all external libraries stored (.a libraries of third party guys with their .h header files)
Submodules/ # directory where all external projects stored that have open source code and can be placed as submodule
Example/ # directory with example
Ok, which options I should specify in Podspec file for correct behaviour?
I ended up with this spec.
Pod::Spec.new do |s|
s.name = "WowProjectTools"
s.source = {
:git => "https://github.com/wow/WowProjectTools.git",
:submodules => true
}
s.source_files = "Tools/**/*.{h,m}" # include all tools files
s.exclude_files = "Example" # exclude all examples
s.frameworks = "Foundation", "SystemConfiguration", "CoreData" # add all frameworks (system frameworks)
s.libraries = "icucore", "z" # ok, I need these libraries like libz.dylib and libicucore.dylib
s.vendored_libraries = 'ExternalLibraries/**' # hmm, these libraries are third party, no?
s.requires_arc = true #
s.xcconfig = { "HEADER_SEARCH_PATHS" => ["./Submodules/**/*.h","./ExternalLibraries/**/*.h"] } # add header search paths
end