views:

295

answers:

1

Without using the private APIs, is it possible to programatically determine the MAC address of the access point that the iPhone is connected to?

I understand that this should be doable using the core BSD libraries, but we are new to this, so it would be great if someone can point us to some starter code.

Note: we're trying to determine the MAC address of the remote device - not the MAC address of the iPhone.

A: 

I believe that the NSHost class exists on the iPhone. If you create an NSHost instance for the machine you're connected to, then sending it an -addresses message should give you its IPV4 address and its MAC address, if I recall.

NSResponder