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

510 views Asked by At

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?

1

There are 1 answers

1
Georg Schölly On BEST ANSWER

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