1, before writing the code base structure components are relatively simple, but the actual process of carrying out the project components, structural engineering is more complicated, and therefore involves the stratification of the document, many articles are on the way to subsepc component files stratification, in fact, this is too cumbersome, and podspec vulnerable, I have tried this method in the assembly process, the so bad. Here are a simple way:
The component library s.source_files podspec file = 'YHTestSevenEight / Classes / ** / *' written in this format, it is not necessary then subspec layered on the file, and write files directly podspec to normal manner, effective pro-test .
Resolution:
* Means match all files
*. {H, m} indicates matches all files ending .h and .m
** Indicates match all subdirectories
For example:
Download folder YHTestSevenEight all the documents, does not recognize subfolders: s.source_files = 'YHTestSevenEight'
Download folder for all files in a directory format YHTestSevenEight: s.source_files = 'YHTestSevenEight /*.*'
All files in the download directory and its subdirectories YHTestSevenEight: s.source_files = 'YHTestSevenEight / ** / *'
Download folder name of AppManInfo AppWomanInfo .m and .h file: s.source_files = '. YHTestSevenEight / App {Man, Woman} Info {h, m}'
At the target file is not the file path for download: s.ios.exclude_files = 'YHTestSevenEight / Classes / json'
2, collect all documents required to import the component library with .h file
SevenEight.h file created in the component project, the file contents
#import "YHTestSevenViewController.h"
#import "YHTestEightViewController.h"
#import "YHTestSevenCell.h"
#import "YHTestEightCell.h"
Classes for the location of the file folder, as shown:
The reason put Classes folder, because podspec file s.source_files = 'YHTestSevenEight / Classes / ** / *' only source you can write this file