Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cocoapods - Hide implementation?

Tags:

ios

cocoapods

I have a iOS library that I created. Quite now I shipped this lib in a .framework file with only some .h files. Now I would like to use Cocoapods instead of the framework.

Is it possible to hide the .m files and expose only some header files (like with the framework)?

According to this question I don't understand the relation between the podspec settings source_files and public_header_files.

I assumed that public_header_files would be my needed option, but I don't understand what this property is doing.

Edit: I think I misunderstood the design of Cocoapods. public_header_files seems to make sense when using the use_framework! setting. Maybe I'm trying Carthage instead.

like image 513
Sebastian Avatar asked Jul 11 '14 13:07

Sebastian


1 Answers

For the Objective-C static framework, it is possible, you can try cocoapods-packager. For Swift framework, so far it is impossible to use cocoapods-packager because of no volunteers. You can find the detailed information here:

But there is another way to Hide implementation of Swift framework when distributing it

like image 184
DàChún Avatar answered Sep 20 '22 02:09

DàChún