NSFileProviderUserInteractionSuppressing

Trait NSFileProviderUserInteractionSuppressing 

Source
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 { ... }
}
Available on crate feature NSFileProviderReplicatedExtension only.
Expand description

Protocol to implement for managing UserInteraction alerts.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn setInteractionSuppressed_forIdentifier( &self, suppression: bool, suppression_identifier: &NSString, )
where Self: Sized + Message,

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.

Source

unsafe fn isInteractionSuppressedForIdentifier( &self, suppression_identifier: &NSString, ) -> bool
where Self: Sized + Message,

Trait Implementations§

Source§

impl ProtocolType for dyn NSFileProviderUserInteractionSuppressing

Source§

const NAME: &'static str = "NSFileProviderUserInteractionSuppressing"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn NSFileProviderUserInteractionSuppressing

Implementations on Foreign Types§

Source§

impl<T> NSFileProviderUserInteractionSuppressing for ProtocolObject<T>

Implementors§