Take the 2-minute tour ×

Is there any official way to get the IP Address of NIC ?

I found a way with the use of getIfAddrs. But it seems that it is not mentioned in SDK. So is the risk (banned by AppStore) high ?


share|improve this question
possible duplicate of Finding local ip address in the iphone –  Brad Larson Dec 6 '10 at 17:24
add comment

2 Answers

up vote 1 down vote accepted

Speaking to the use of getIfAddrs(3), as a BSD system call, it's not a private API, so its use should not be prohibited in any way.

share|improve this answer
add comment

never tried before, but i kept reference of this function to retrieve ip address. it might work


share|improve this answer
add comment

Your Answer


