Sub-library of iOS development pod private library

First of all, when we add a new sub-library folder, we cannot directly add files to the development pods function directory of the pod library project

Folder, as shown in the figure, you can’t directly drag the file into the project directory in the box

The correct approach is,

Find the classes folder of the pod library

Add the folders you need to add to this classes folder

Include your own library files

Then add the configuration information of the sub-library to the .podspec file as shown in the figure

Including relative paths, dependent libraries of sub-libraries

Note that after many settings and tests here, it is found that as long as the last value is'*', such as

        sp.source_files = 'vv_bodylib_ios/Classes/ScrollViewHeaderHelper/**/**/**/***   

       vv_bodylib_ios/Classes/ScrollViewHeaderHelper/**/**/**/************

        sp.source_files = 'vv_bodylib_ios/Classes/ScrollViewHeaderHelper/**/*

        sp.source_files = 'vv_bodylib_ios/Classes/ScrollViewHeaderHelper/**/**/**/**

It's all ok

But this kind of path where the last character is'/' is not good as:

        sp.source_files = 'vv_bodylib_ios/Classes/ScrollViewHeaderHelper/**/**/**/

        sp.source_files = 'vv_bodylib_ios/Classes/ScrollViewHeaderHelper/**/**/

 

Then we cd to the sample project of the pod library. After pod install, we find that the sub-library has been added to the pod library.

So far, the sub-library has been added

Guess you like

Origin blog.csdn.net/LIUXIAOXIAOBO/article/details/112978129
Recommended