Struct apple_bundle::info_plist::protected_resources::FilesAndFolders [−][src]
pub struct FilesAndFolders {
pub desktop_folder_usage_description: Option<String>,
pub documents_folder_usage_description: Option<String>,
pub downloads_folder_usage_description: Option<String>,
pub network_volumes_usage_description: Option<String>,
pub removable_volumes_usage_description: Option<String>,
pub file_provider_presence_usage_description: Option<String>,
pub file_provider_domain_usage_description: Option<String>,
}Expand description
Files and Folders
Fields
desktop_folder_usage_description: Option<String>A message that tells the user why the app needs access to the user’s Desktop folder.
The user implicitly grants your app access to a file in the Desktop folder when selecting the file in an Open or Save panel, dragging it onto your app, or opening it in Finder. Your app can access that file right away and any time in the future. In addition, if your app creates a new file in the Desktop folder, the app can access that file without user consent.
The first time your app tries to access a file in the user’s Desktop folder without implied user consent, the system prompts the user for permission to access the folder’s contents. Add the NSDesktopFolderUsageDescription key to your app’s Information Property List file to provide a message that explains why your app needs access. The usage description is optional, but highly recommended.
App Sandbox enforces stricter limits on Desktop folder access, so that policy may supersede this one if your app enables sandboxing. See App Sandbox for more information.
After the user chooses whether to grant access, the system remembers the user’s choice. To reset permissions, use the tccutil command line utility with your app’s bundle ID:
$ tccutil reset SystemPolicyDesktopFolder <bundleID>
Availability
- macOS 10.15+
Framework
- Foundation
documents_folder_usage_description: Option<String>A message that tells the user why the app needs access to the user’s Documents folder.
The user implicitly grants your app access to a file in the Documents folder when selecting the file in an Open or Save panel, dragging it onto your app, or opening it in Finder. Your app can access that file right away and any time in the future. In addition, if your app creates a new file in the Documents folder, the app can access that file without user consent.
The first time your app tries to access a file in the user’s Documents folder without implied user consent, the system prompts the user for permission to access the folder’s contents. Add the NSDocumentsFolderUsageDescription key to your app’s Information Property List file to provide a message that explains why your app needs access. The usage description is optional, but highly recommended.
App Sandbox enforces stricter limits on Documents folder access, so that policy may supersede this one if your app enables sandboxing. See App Sandbox for more information.
After the user chooses whether to grant access, the system remembers the user’s choice. To reset permissions, use the tccutil command line utility with your app’s bundle ID:
$ tccutil reset SystemPolicyDocumentsFolder <bundleID>
Availability
- macOS 10.15+
Framework
- Foundation
downloads_folder_usage_description: Option<String>A message that tells the user why the app needs access to the user’s Documents folder.
The user implicitly grants your app access to a file in the Documents folder when selecting the file in an Open or Save panel, dragging it onto your app, or opening it in Finder. Your app can access that file right away and any time in the future. In addition, if your app creates a new file in the Documents folder, the app can access that file without user consent.
The first time your app tries to access a file in the user’s Documents folder without implied user consent, the system prompts the user for permission to access the folder’s contents. Add the NSDocumentsFolderUsageDescription key to your app’s Information Property List file to provide a message that explains why your app needs access. The usage description is optional, but highly recommended.
App Sandbox enforces stricter limits on Documents folder access, so that policy may supersede this one if your app enables sandboxing. See App Sandbox for more information.
After the user chooses whether to grant access, the system remembers the user’s choice. To reset permissions, use the tccutil command line utility with your app’s bundle ID:
$ tccutil reset SystemPolicyDownloadsFolder <bundleID>
Availability
- macOS 10.15+
Framework
- Foundation
network_volumes_usage_description: Option<String>A message that tells the user why the app needs access to files on a network volume.
The user implicitly grants your app access to a file on a network volume when selecting the file in an Open or Save panel, dragging it onto your app, or opening it in Finder. Your app can access that file right away and any time in the future. In addition, if your app creates a new file on a network volume, the app can access that file without user consent.
The first time your app tries to access a file on a network volume without implied user consent, the system prompts the user for permission to access network volumes. Add the NSNetworkVolumesUsageDescription key to your app’s Information Property List file to provide a string for the prompt that explains why your app needs access. The usage description is optional, but highly recommended.
After the user chooses whether to grant access, the system remembers the user’s choice. To reset permissions, use the tccutil command line utility with your app’s bundle ID:
$ tccutil reset SystemPolicyNetworkVolumes <bundleID>
Availability
- macOS 10.15+
Framework
- Foundation
removable_volumes_usage_description: Option<String>A message that tells the user why the app needs access to files on a removable volume.
The user implicitly grants your app access to a file on a removable volume—like a USB thumb drive—when selecting the file in an Open or Save panel, dragging it onto your app, or opening it in Finder. Your app can access that file right away and any time in the future. In addition, if your app creates a new file on a removable volume, the app can access that file without user consent.
The first time your app tries to access a file on a removable volume without implied user consent, the system prompts the user for permission to access removable volumes. Add the NSRemovableVolumesUsageDescription key to your app’s Information Property List file to provide a string for the prompt that explains why your app needs access. The usage description is optional, but highly recommended.
After the user chooses whether to grant access, the system remembers the user’s choice. To reset permissions, use the tccutil command line utility with your app’s bundle ID:
$ tccutil reset SystemPolicyRemovableVolumes <bundleID>
Availability
- macOS 10.15+
Framework
- Foundation
file_provider_presence_usage_description: Option<String>A message that tells the user why the app needs to be informed when other apps access files that it manages
An app that adopts the File Provider framework can see when and with which other apps the user accesses managed files. Before providing this kind of information to a file provider, the system prompts the user to grant access. Add the NSFileProviderPresenceUsageDescription key to your file provider app’s Information Property List file to provide a string for the prompt that explains why your app needs this information.
After the user chooses whether to grant access, the system remembers the user’s choice. To reset permissions, use the tccutil command line utility with your app’s bundle ID:
$ tccutil reset FileProviderPresence <bundleID>
Availability
- macOS 10.15+
Framework
- Foundation
file_provider_domain_usage_description: Option<String>A message that tells the user why the app needs access to files managed by a file provider.
The user implicitly grants your app access to a file managed by a file provider when selecting the file in an Open or Save panel, dragging it onto your app, or opening it in Finder. Your app can access that file right away and any time in the future. In addition, if your app creates a new file managed by a file provider, the app can access that file without user consent.
The first time your app tries to access a file managed by a file provider without implied user consent, the system prompts the user for permission. Add the NSFileProviderDomainUsageDescription key to your app’s Information Property List file to provide a string for the prompt that explains why your app needs access. The usage description is optional, but highly recommended.
After the user chooses whether to grant access, the system remembers the user’s choice. To reset permissions, use the tccutil command line utility with your app’s bundle ID:
$ tccutil reset FileProviderDomain <bundleID>
Availability
- macOS 10.15+
Framework
- Foundation
Trait Implementations
Returns the “default value” for a type. Read more
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for FilesAndFoldersimpl Send for FilesAndFoldersimpl Sync for FilesAndFoldersimpl Unpin for FilesAndFoldersimpl UnwindSafe for FilesAndFoldersBlanket Implementations
Mutably borrows from an owned value. Read more