views:

305

answers:

2

How to add private APIs and frameworks to an iPhone App. Like Apple80211.

+1  A: 

Assuming you're asking "how do I call a function declared in a private API", this app will show you how. Look in -[MSNetworksManager init].

void * dlopen(const char*, int) is the function you're looking for, declared in dlcfn.h, used like this:

int (*scan)(void *, NSArray **, void *);
void *libHandle = dlopen("/System/Library/Frameworks/Preferences.framework/Preferences", RTLD_LAZY);
scan = dlsym(libHandle, "Apple80211Scan");
Frank Shearar
Thanks Frank...I will check it out. Thanks for the help.
A: 

Please do not use any private APIs since there is every chance that Apple will reject your application.

Hetal Vora
:) I was actually aware of the consequences, but i just basically wanted to check out some features at my end. So my question still stands :)