Why Does Every Library in the IOS Standard Library Start With NS?

The standard Apple libraries goes back all the ways to the NeXTSTEP days. NeXTSTEP was an operating system written by NeXT Inc. the company Steve Jobs setup during his time away from Apple (1985 - 1997).

The programming language of NeXTSTEP was Objective-C which is an extension of C. Seeing as C didn’t have a module system or ability to namespace components, a common pattern was to prefix library/framework elements with some sort of unique prefix. For NeXT, their original prefix was NX (though that wasn’t always the case, a lot of framework components didn’t have prefixes at first).

The big change that had the NS prefix take off was the creation of NSString. Seeing as a string is one of the most common data objects you are likely to use in a language system it kind of went viral/was probably enforced internally.

Contray to popular belief the NS did not come from the combination of NeXT and Sun under the OpenStep standard. That it would seem that that was just a happy accident.