Chapter 14
Managing Access Control for Your Objects
In This Chapter
Understanding access control levels
Defining access control terminology
Working with access control modules, files, and entities
Access control isn't new with Swift: It’s found in many languages. The idea has been around for a long time — for as long as developers have confronted the need to reuse code in a variety of environments. If you’re writing code that’s meant to be shared among a number of projects (whether the code is a framework or a library), you need to think about the access you’ll grant to users of your code. (Users, in this sense, are developers who use your code rather than the end users who run the apps.) Often you can handle this issue by making everything open and public. This works if you’re within a firewall and in a secure environment, but it also works if you are working on a project that’s public and open.
For environments that aren’t totally open (either globally or within a secure organizational environment), remember to consider setting access controls when you develop your code.
Even if none of these circumstances apply to you, you still may not be off the hook for access control issues. ...
Get Swift For Dummies now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.