Skip to main content
1 of 3

Now in beta 4, they added access modifiers to Swift.

from XCode 6 beta 4 realese notes:

Swift access control has three access levels:

  • private entities can only be accessed from within the source file where they are defined.
  • internal entities can be accessed anywhere within the target where they are defined.
  • public entities can be accessed from anywhere within the target and from any other context that imports the current target’s module.

By default, most entities in a source file have internal access. This allows application developers to largely ignore access control while allowing framework developers full control over a framework's API.