NSHost “currentHost” not recognized
问题 i'd like to use this code to know my ip, but i got 2 warnings that i can't fix for now. I also found this post : Accessing IP Address with NSHost but i just wanted to understand why this code does not work, if anyone has an answer? here's my code : -(NSString*)getAddress { NSString *iphone_ip = [NSString initWithString:@"127.0.0.1"]; NSHost* myhost =[NSHost currentHost]; if (myhost) { NSString *ad = [myhost address]; if (ad) strcpy(iphone_ip,[ad cStringUsingEncoding: NSISOLatin1StringEncoding