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?
精彩评论