开发者

Why does code that uses NSHost compile correctly using the iPhone SDK?

I have some code that was written for Mac OS X and it makes a lot of use of the NSHost class. During my efforts to bring this code to the iPhone, I discovered that NSHost 开发者_运维技巧isn't available in the iPhone SDK, and should instead be replaced with NSStream and the related networking classes.

Anywho, I've been working on it to port it over to the iPhone and I noticed that even without removing the NSHost code, it still compiles without any errors. This is compiling against the device SDK (not simulator). Surely if the class isn't in the iPhone SDK it should give me a compile error saying it couldn't find the symbols or something?

Could it be that NSHost is available on the iPhone, but made private?


Looks like it's private API but still available. Still, it should give you some compiler warnings. Have you tried cleaning the build?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜