Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

importing private frameworks in Xcode

I am a novice iPhone programmer I want to use some of the functions in the private framework

https://github.com/kennytm/iphone-private-frameworks

The function that I want to use is in 'SpringBoard'

So I downloaded 'SpringBoard' folder in that github repo. And created a subdirectory called "Headers" in 'SpringBoard' and put all the header files in that folder.

And renamed 'SpringBoard' to 'SpringBoard.framework' and copied it to /Developer/Platforms/(iPhoneOS_and_iPhoneSimulator)/sdks/System/library/Frameworks folder (I can't recall full path correctly sorry)

And I got back to the xcode and right click on Frameworks -> Add existing framework -> other -> I selected 'SpringBoard.framework' folder and clicked Add.

And I built the project and got an error

'ld : framework SpringBoard not found'

My imported framework does appear on the Xcode and I can see header files in it. but when I built it I got that error.

What am I doing wrong?

like image 587
manatails008 Avatar asked Nov 17 '10 15:11

manatails008


1 Answers

Place all of your private headers in a directory like: /User/Name/Headers/ then set USER_HEADER_SEARCH_PATHS = "/User/Name/Headers/" and make sure that ALWAYS_SEARCH_USER_PATHS = YES

Also, SpringBoard.framework is not the way to do that.Simply place the folder named SpringBoard in the above Headers folder, making sure that the headers are directly inside them. For instance: SpringBoard/SBAlert.h

/*  SpringBoard is not a framework.  */

Notice that you wont have to add the SpringBoard folder to your project, they should appear as you start typing, as long as you set the above headers correctly.

like image 92
3 revs Avatar answered Sep 18 '22 23:09

3 revs