简体   繁体   中英

Can a Objective C Framework/Static Library consist of third party framework

This is just an informational question, I have been examining several ways to make frameworks in iOS.

I made Swift Pure frameworks :- There I got to know that, you have to include the xcodeproject to the application project to use the .framework included in .xocdeproject. So I thought this is not the secure way to giving code to third party and I also I did not find ways to include the third party frameworks to my own framework.

Objective Static Libraries:- In this type libraries, the system is generated a .a file which is secure and the person gonna use does not know the implementation part however found out that if I want to include a third party framework to this, I will have to ask the end user to include that third party project to end application to compile it which will show the end user what all dependancies I have, which I don't want.

My issue is I wan to make a Framework which will consist of all the third party frameworks however, they would be hidden from end user although the codes from them can still be used by end user as required however, end user should not see them listing in my framework.

Is there a way out?

I have gone through many links and found out that many have this doubt as well

Like

Adding FacebookSDK.framework into my own Static library

In this post, one person is asked to get all header files and the framework file and then add that to static libraries to build to add the framework itself, I tried that too without success.

Do not do that.

There is literally no good outcome of what you're trying to do. This is very confusing and couples your library API with a different library's API, forcing the user to stick with your version of the 3rd party lib.

If the user will want to use a newer version of the 3rd party dependency, he won't be able to, because it will result in duplicate symbols.

You can't find any information about such practice on the internet, because nobody does this .

If you want to distribute an already compiled library, there's no other way than just compile all 3rd party code with it, without exposing the header files.

There's one very big important thing left: you have to make sure that users of your SDK will not end up with duplicate symbols if they also use the 3rd party library!

More here...

And here...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM