Sebastian
Sebastian

Reputation: 3399

Cocoapods - Hide implementation?

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.

Upvotes: 6

Views: 2626

Answers (1)

DàChún
DàChún

Reputation: 5156

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

Upvotes: 1

Related Questions