pub unsafe trait NSFileProviderUserInteractionSuppressing: NSObjectProtocol {
// Provided methods
unsafe fn setInteractionSuppressed_forIdentifier(
&self,
suppression: bool,
suppression_identifier: &NSString,
)
where Self: Sized + Message { ... }
unsafe fn isInteractionSuppressedForIdentifier(
&self,
suppression_identifier: &NSString,
) -> bool
where Self: Sized + Message { ... }
}NSFileProviderReplicatedExtension only.Expand description
Protocol to implement for managing UserInteraction alerts.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn setInteractionSuppressed_forIdentifier(
&self,
suppression: bool,
suppression_identifier: &NSString,
)
unsafe fn setInteractionSuppressed_forIdentifier( &self, suppression: bool, suppression_identifier: &NSString, )
Suppression management:
The extension may choose to give the user the option to suppress certain UserInteraction alerts.
In order to do so, the extension must both implement NSFileProviderUserInteractionSuppressing, as well as
configure the desired UserInteractions in the Info.plist with the SuppressionIdentifier field.
When FileProvider needs to evaluate whether to display a UserInteraction alert, it will call -[NSFileProviderUserInteractionSuppressing isInteractionSuppressedForIdentifier:]. When the user indicates that they do not wish to see a given SuppressionIdentifiers’s alert again, FileProvider will call -[NSFileProviderUserInteractionSuppressing setInteractionSuppressed:forIdentifier:].
The extension can choose whether the suppression should apply only to the domain upon which -[NSFileProviderUserInteractionSuppressing setInteractionSuppressed:forIdentifier:] was called, or if it should apply to all domains for their provider. For instance, the extension could choose to suppress future alerts related to adding an item to a shared folder across all domains, after the user chooses to suppress the alerts in a specific domain’s context. Or, the extension could choose to only suppress that alert for the specific domain it was displayed within, and in the future, the user would see the same alert in the same context, if they take the same action in another domain.
§Execution time:
This method is expected to complete immediately.