Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cocoapods podspec preserve_paths

Tags:

cocoapods

Podspec documentation says preserve_path is for "Any file that should not be cleaned (CocoaPods cleans all files by default)."

What does it mean by "clean"?

like image 974
huggie Avatar asked Aug 22 '13 07:08

huggie


People also ask

What is Podspec in CocoaPods?

A Podspec, or Spec, describes a version of a Pod library. One Pod, over the course of time, will have many Specs. It includes details about where the source should be fetched from, what files to use, the build settings to apply, and other general metadata such as its name, version, and description.


1 Answers

'Clean' means that it will delete the files that should be 'cleaned'

For example if you have a directory with a few files

  • source.h
  • source.m
  • readme.md
  • other.txt

If you just specify the source files as *.{h,m} then those will be added to the project and readme.md and other.txt will be removed. If you for some reason wanted the user to be able to access one of those files you would add it to the preserve_paths so it would not get delete.

like image 149
Keith Smiley Avatar answered Sep 16 '22 12:09

Keith Smiley