1

I read on google that this is not possible, and that on OS 2.0, it was some undocumented Api to accomplish that, but then your app will got rejected ....

we are almosto on OS 4.0....any news regarding this?

Rodrigo
  • 11
  • 1
  • 3
  • Try the following link https://code.google.com/p/iphone-wireless/source/browse/trunk/Stumbler/MSNetworksManager.m – Durai Amuthan.H Dec 30 '13 at 07:41
  • Possible duplicate of [iPhone get a list of all SSIDs without private library](https://stackoverflow.com/questions/9684341/iphone-get-a-list-of-all-ssids-without-private-library) – Senseful Sep 24 '18 at 05:24

1 Answers1

2

There are pre-2.0 solutions to be found on the Internet. One of them seems to be as follows:

void *libHandle;
void *airportHandle;
int (*open)(void *);
int (*bind)(void *, NSString *);
int (*close)(void *);

libHandle = dlopen("/System/Library/Frameworks/Preferences.framework/Preferences", RTLD_LAZY);
open = dlsym(libHandle, "Apple80211Open");
bind = dlsym(libHandle, "Apple80211BindToInterface");
close = dlsym(libHandle, "Apple80211Close");

open(&airportHandle);
bind(airportHandle, CFSTR("en0"));
close(&airportHandle);

dlclose(libHandle);

I'm not sure if accessing this framework is off limits. But running it causes a EXC_BAD_ACCESS. So either the code is wrong, the framework has changed or it's somehow locked. Forgive me for any obvious Objective-C faux-pas. I've only been speaking Objective-C since Thursday, so my Objective-C fluency is probably like parachuting a latin speaker into a hostile Transylvanian mountian region.

karim
  • 15,408
  • 7
  • 58
  • 96