NSHost *h = [NSHost hostWithName:name];
即时得到两个错误,从该行的代码 ARC Issue: Receiver 'NSHost' for class message is a forward declaration.
ARC Issue: No known class message for selector 'hostWithName:'
谷歌搜
我想在应用程序中查找IP地址。我能找到它。但是,问题是,它在iPhone OS 2.0左右起作用。但是,在iPhone OS 3.0它给我一个警告: warning: no '+currentHost' method found
warning: (Messages without a matching method signature)
我使用此代码,它可以正常使用操作系统版本2.0。