Reputation: 665
I downloaded SpringBoardServices.h file given in SpringBoardServices and added it to my project. But how to access one of the method present inside SpringBoardServices.h file. I am trying to call BOOL SBSProcessIDForDisplayIdentifier(CFStringRef identifier, pid_t *pid); this method present inside SpringBoardServices.h from MyClass.m file. How to call above method from my .m file?
I used below approach, but it is returning null.
Class myclass = NSClassFromString(@"SpringBoardServices");
NSLog(@" myclass %@", myclass); //null
id myobj = [[myclass alloc] init];
I downloaded SpringBoardServices.h file from this link.
Upvotes: 0
Views: 308
Reputation: 23268
There are couple of methods to access C methods from private framework:
Method 1:
SBSProcessIDForDisplayIdentifier(...)
Method 2:
BTW. This is applicable to C method's and second method won't work for ObjectiveC methods.
Upvotes: 1