The bridging is actually in the swift libraries. Much of it in C++, not in swift, but still. <a href="https:&#x2F;&#x2F;github.com&#x2F;apple&#x2F;swift&#x2F;blob&#x2F;master&#x2F;stdlib&#x2F;public&#x2F;core&#x2F;BridgeObjectiveC.swift" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;apple&#x2F;swift&#x2F;blob&#x2F;master&#x2F;stdlib&#x2F;public&#x2F;cor...</a> is where the magic starts (and mostly refers to where the actual work is done).<p>AFAIK Foundation does not have any special handling for swift at all. Swift is just taking advantage of the fact that the people working on it can act with authority on the memory layout of Objective-C Foundation objects.<p>Also the OSS Foundation is... not quite the same thing as what apple ships on their platforms.