{
	"id": "52966e5a-f8ac-45e5-8b41-a33f090d8bdd",
	"created_at": "2026-04-06T00:09:51.261589Z",
	"updated_at": "2026-04-10T03:21:02.337653Z",
	"deleted_at": null,
	"sha1_hash": "b2b759fe5f5bbdeecb3e91af44ae62c90bbb55c3",
	"title": "Requesting authorization to capture and save media | Apple Developer Documentation",
	"llm_title": "",
	"authors": "",
	"file_creation_date": "0001-01-01T00:00:00Z",
	"file_modification_date": "0001-01-01T00:00:00Z",
	"file_size": 685762,
	"plain_text": "Requesting authorization to capture and save media | Apple\r\nDeveloper Documentation\r\nBy Verify and request authorization for capture\r\nArchived: 2026-04-05 23:15:19 UTC\r\nOverview\r\nIn iOS and macOS 10.14 and later, the user must explicitly grant permission for each app to access the camera and\r\nmicrophone. Before your app can use a capture device for the first time, the system presents an alert with an app-specific message that you specify, to ask the user to grant your app access to the capture device. For example, the\r\nfollowing screenshots show the camera access alert in iOS and macOS 10.14 and later:\r\nThe system remembers the user’s response to each access alert, so subsequent uses of the corresponding capture\r\ndevice don’t cause the alert to appear again. The user can change permission settings for your app in Settings \u003e\r\nPrivacy in iOS and in System Preferences \u003e Security \u0026 Privacy in macOS.\r\nhttps://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/requesting_authorization_for_media_capture_on_ios\r\nPage 1 of 4\n\nThis article outlines the steps you can take to ensure your app has permission before it attempts to capture media.\r\nConfigure access alerts\r\nThe system requires that your app provides static messages to display to the user when the system asks for\r\npermission to access the camera or microphone:\r\nIf your app uses device cameras, include the NSCameraUsageDescription key in your app’s Info.plist\r\nfile.\r\nIf your app uses device microphones, include the NSMicrophoneUsageDescription key in your app’s Info\r\n.plist file.\r\nFor each key, provide a message that explains to the user why your app needs to capture media so the user can feel\r\nconfident granting permission to your app.\r\nEnable entitlements in macOS\r\nIn macOS, you also need to enable the following entitlements in Signing \u0026 Capabilities for your app targets:\r\nIf your app uses device cameras, enable the Camera entitlement .\r\nIf your app uses device microphones, enable the Audio Input Entitlement .\r\nhttps://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/requesting_authorization_for_media_capture_on_ios\r\nPage 2 of 4\n\nAlways test the AVCaptureDevice authorizationStatus(for:) method before setting up a capture session. If\r\nthe user hasn’t granted or denied capture permission, the authorization status is AVAuthorizationStatus.not\r\nDetermined . In this case, use the requestAccess(for:completionHandler:) method to tell the system to prompt\r\nthe user.\r\nCall requestAccess(for:completionHandler:) before starting capture, but only at a time that’s appropriate for\r\nyour app. For example, if photo or video capture isn’t the main focus of your app, check for permission only when\r\nthe user invokes your app’s camera-related features. Here’s an example:\r\nvar isAuthorized: Bool {\r\n get async {\r\n let status = AVCaptureDevice.authorizationStatus(for: .video)\r\n \r\n // Determine if the user previously authorized camera access.\r\n var isAuthorized = status == .authorized\r\n \r\n // If the system hasn't determined the user's authorization status,\r\n // explicitly prompt them for approval.\r\nhttps://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/requesting_authorization_for_media_capture_on_ios\r\nPage 3 of 4\n\nif status == .notDetermined {\r\n isAuthorized = await AVCaptureDevice.requestAccess(for: .video)\r\n }\r\n \r\n return isAuthorized\r\n }\r\n}\r\nfunc setUpCaptureSession() async {\r\n guard await isAuthorized else { return }\r\n // Set up the capture session.\r\n}\r\nRequest authorization to save captured media\r\nYour app must get permission to access the photo library before it attempts to save photos or videos; otherwise the\r\nsystem terminates your app. Which permission you request depends on the types of media you want to save:\r\nFor most photo and video capture workflows, including Live Photos and RAW format capture, use the\r\nPHPhotoLibrary and PHAssetCreationRequest classes. These classes require read/write access to the\r\nphoto library, so you need to use the NSPhotoLibraryUsageDescription key in your Info.plist file to\r\nprovide the user a message to request access. For additional information, see Delivering an Enhanced\r\nPrivacy Experience in Your Photos App.\r\nIf your app only needs to save video to the photo library, the UISaveVideoAtPathToSavedPhotosAlbum(_:_:\r\n_:_:) function is a simpler alternative to PHPhotoLibrary . This function only requires write access to the\r\nlibrary. Use the NSPhotoLibraryAddUsageDescription key in your Info.plist file to provide the user a\r\nmessage to request permission to save to the photo library.\r\nSource: https://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/requesting_authorization_for_media_capture_o\r\nn_ios\r\nhttps://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/requesting_authorization_for_media_capture_on_ios\r\nPage 4 of 4",
	"extraction_quality": 1,
	"language": "EN",
	"sources": [
		"MITRE"
	],
	"references": [
		"https://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/requesting_authorization_for_media_capture_on_ios"
	],
	"report_names": [
		"requesting_authorization_for_media_capture_on_ios"
	],
	"threat_actors": [],
	"ts_created_at": 1775434191,
	"ts_updated_at": 1775791262,
	"ts_creation_date": 0,
	"ts_modification_date": 0,
	"files": {
		"pdf": "https://archive.orkl.eu/b2b759fe5f5bbdeecb3e91af44ae62c90bbb55c3.pdf",
		"text": "https://archive.orkl.eu/b2b759fe5f5bbdeecb3e91af44ae62c90bbb55c3.txt",
		"img": "https://archive.orkl.eu/b2b759fe5f5bbdeecb3e91af44ae62c90bbb55c3.jpg"
	}
}