Secure the data your app manages, and control access to your app.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Use the Security framework to protect information, establish trust, and control access to software. Broadly, security services support these goals:
Establish a user’s identity (authentication) and then selectively grant access to resources (authorization).
Secure data, both on disk and in motion across a network connection.
Ensure the validity of code to be executed for a particular purpose.
As shown in Figure 1, you can also use lower level cryptographic resources to create new secure services. Cryptography is difficult and the cost of bugs typically so high that it's rarely a good idea to implement your own cryptography solution. Rely on the Security framework when you need cryptography in your app.