2

I have a project (framework) including pods, frameworks, bridging headers and many other files with various types. I want to make it accessible using cocoapods and can be easily add to other projects. I read many tutorials but non of them mentioned how to include all files of project and all dependencies. I found this:

s.source_files = "YourDirectory/**/*.{swift}"

to add in podspec file but how to add my other files with many different file extensions? How to properly make a big XCode framework a pod?

Ali Samaiee
  • 301
  • 6
  • 14

1 Answers1

0

You can easily include multiple wildcard expression in s.source_files in your Podspec, like this:

s.source_files = "Dir1/**/*.swift", "Dir2/**/*.swift", "Dir3/**/*.{h,m,swift}"

Once you've set up your new pod like this, you can include it using

pod "YourNewPod", :path => ".../where/ever/your/pod/lives"

into your respective projects.

Gereon
  • 17,258
  • 4
  • 42
  • 73
  • 1
    `.mm` goes into the regular `source_files` list. For binary frameworks, there is the `vendored_frameworks` directive, for static libraries use `vendored_libraries`. See https://guides.cocoapods.org/syntax/podspec.html for more details. – Gereon Nov 22 '20 at 19:47