mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-07 09:31:31 +01:00
feat: simple log that checks if autofill is enabled
This commit is contained in:
parent
b527337a10
commit
bf01217e3a
@ -1,10 +1,28 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AuthenticationServices/ASCredentialIdentityStore.h>
|
||||
#import <AuthenticationServices/ASCredentialIdentityStoreState.h>
|
||||
|
||||
void hello_world(char* value, char* output, int output_size)
|
||||
{
|
||||
NSString *string = [[NSString alloc] initWithUTF8String:value];
|
||||
NSLog(@"Objc from rust, hello: %@", string);
|
||||
NSLog(@"[BW] Objc from rust, hello: %@", string);
|
||||
|
||||
NSString *outputString = @"Hello, World from objc!";
|
||||
[outputString getCString:output maxLength:output_size encoding:NSUTF8StringEncoding];
|
||||
|
||||
if (@available(macos 11, *)) {
|
||||
NSLog(@"[BW] macOS 11 or later");
|
||||
|
||||
ASCredentialIdentityStore *store = [ASCredentialIdentityStore sharedStore];
|
||||
[store getCredentialIdentityStoreStateWithCompletion:^(ASCredentialIdentityStoreState * _Nonnull state) {
|
||||
NSLog(@"[BW] state: %@", state);
|
||||
if (state.enabled) {
|
||||
NSLog(@"[BW] ASCredentialIdentityStore enabled");
|
||||
} else {
|
||||
NSLog(@"[BW] ASCredentialIdentityStore disabled");
|
||||
}
|
||||
}];
|
||||
} else {
|
||||
NSLog(@"[BW] earlier than macOS 11");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user