Question

I created a static Library but I am unable to import it. Here are the steps that i followed to add it to my project.

1) From finder, I dragged my library .xcodeproj into my main project.

2) I selected the main project, went to target and then build phases.

3) I added the library under Link Binary With Libraries and Target Dependencies.

4) Under Build Settings -- Header Search Paths, I added $(BUILT_PRODUCTS_DIR).

5) I also added -ObjC to Other Linker Flags.

However when I try importing the library, it's not being recognised. Can anyone help with this?

No correct solution

OTHER TIPS

You can include library by two ways either u can drag and drop library.xcodeproj into your project or you can include .lib file into your project. It might be possible that your lib file was not build properly. You could build ur lib file by opening ur library.xcodeproj in xcode select build target as iOS Device and build the project. If build is successful u could find the newly created .lib file to the following path LIbrary/Developer/Xcode/DerivedData now remove the previous lib file and include the new lib.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top