1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// A helper class to provide static utility methods for quick access to settings related to credential providers.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/assettingshelper?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct ASSettingsHelper;
);
extern_conformance!(
unsafe impl NSObjectProtocol for ASSettingsHelper {}
);
impl ASSettingsHelper {
extern_methods!(
#[cfg(feature = "block2")]
/// Calling this method will open the Settings app and navigate directly to the AutoFill provider settings.
#[unsafe(method(openCredentialProviderAppSettingsWithCompletionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn openCredentialProviderAppSettingsWithCompletionHandler(
completion_handler: Option<&block2::DynBlock<dyn Fn(*mut NSError)>>,
);
#[cfg(feature = "block2")]
/// Calling this method will open the Settings app and navigate directly to the Verification Code provider settings.
#[unsafe(method(openVerificationCodeAppSettingsWithCompletionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn openVerificationCodeAppSettingsWithCompletionHandler(
completion_handler: Option<&block2::DynBlock<dyn Fn(*mut NSError)>>,
);
#[cfg(feature = "block2")]
/// Call this method from your containing app to request to turn on a contained Credential Provider Extension.
/// If the extension is not currently enabled, a prompt will be shown to allow it to be turned on.
/// The completion handler is called with YES or NO depending on whether the credential provider is enabled.
/// You need to wait 10 seconds in order to make additional request to this API.
#[unsafe(method(requestToTurnOnCredentialProviderExtensionWithCompletionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn requestToTurnOnCredentialProviderExtensionWithCompletionHandler(
completion_handler: &block2::DynBlock<dyn Fn(Bool)>,
);
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}