{"version":"1.0","type":"rich","title":"get ip address of device","description":"This example shows how to retrieve the local IP address of an iOS device, specifically the Wi-Fi connection interface labeled “en0.” The code iterates through the system’s network interfaces using the `getifaddrs` function, filtering for IPv4 (`AF_INET`) addresses. It returns the address as an `NSString` using `inet_ntoa`, or “error” if no matching interface is found. The implementation relies on the `ifaddrs` structure and Foundation’s `NSString` utilities, with memory freed via `freeifaddrs`.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-1158572?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}