Offroad

Chris' blog

Offroad header image 2

Retrieve local IPv4/IPv6 on Wifi/Cellular on iPhone

2011/04/29 12:47 · Aucun Commentaire

On iOS, you want to know your local IP (for example, when an application opens a webpage on the wifi interface) but the iOS SDK provides no simple way to get the IP Address for the wifi connection.

I found an interesting Method in Objective-C which retrieve the IPv4 address of the wifi connexion as a NSString on Zach Waugh’s blog.

Sadly it doesn’t work with IPv6. So I modified it and here is the code:

http://wiki.gonzofamily.com/a/Retrieve_local_IPv4/IPv6_on_Wifi/Cellular

Tags: apple · dev · en · IT · phone

0 réponse ↓

  • There are no comments yet...Kick things off by filling out the form below.

Laissez un Commentaire