Adding FacebookSDK.framework into my own Static li

2019-06-01 20:21发布

问题:

I am creating a static library which i will be using for more than one projects, which i am developing. I will build the static library as .framework file and will drag and drop to use in other projects. It is working fine. Now i am adding some more functionalities to the framework. I am adding FacebookSDK.framework to the static library for log in purpose, but when i drag the framework to another project and build it, it throws an error.

"FacebookSDK/FacebookSDK.h" file not found.

Please help!

回答1:

You should change your import statement to

#import "FacebookSDK.h"

And add FacebookSDK.framework to the project which USES your static library.

If you want to build FacebookSDK.framework INTO your own static library. You should open FacebookSDK.framework and find all the .h and a file named FacebookSDK, and add these files into your static library project.