hasrthur
hasrthur

Reputation: 1490

How to extract the part of code into framework

I have a project. And part of it is very general and can be developed separately. So I want to extract it into some framework/library. What is the right way to do this?

Upvotes: 2

Views: 1920

Answers (1)

Miknash
Miknash

Reputation: 7948

I had same situation to do so. You have to create library first and then convert it to framework.

Here is a very helpful link that you can follow (it is the same for framework for both objective c and swift).

http://www.raywenderlich.com/65964/create-a-framework-for-ios

Be very careful for .m and .h files. Sometimes, you have same declaration of the class and different implementation. In this case you can include .h files only. If you forget some .m files you will get linker-o error for missing symbol, and if you forget to remove from build phases some you will get duplicate symbol.

Hope this helps, if I remember something more I edit this answer.

Upvotes: 1

Related Questions