Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios &引用;PROVIDECREDERTIALWITHOUTHUSERINTERACTIONFORIDENTITY:“在没有用户交互的情况下;它不起作用了_Ios_Objective C_Autofill - Fatal编程技术网

Ios &引用;PROVIDECREDERTIALWITHOUTHUSERINTERACTIONFORIDENTITY:“在没有用户交互的情况下;它不起作用了

Ios &引用;PROVIDECREDERTIALWITHOUTHUSERINTERACTIONFORIDENTITY:“在没有用户交互的情况下;它不起作用了,ios,objective-c,autofill,Ios,Objective C,Autofill,我有一个在iOS 12上自动填充密码的应用程序。现在我想实现这个功能: - (void)provideCredentialWithoutUserInteractionForIdentity:(ASPasswordCredentialIdentity *)credentialIdentity; 但我不能让它正常工作 自动填充已在“设置”中启用,也已在“我的应用”中启用 我已经阅读了文档,但这对我没有帮助 我已尝试从viewDidLoad,prepareCredentialistForServic

我有一个在iOS 12上自动填充密码的应用程序。现在我想实现这个功能:

- (void)provideCredentialWithoutUserInteractionForIdentity:(ASPasswordCredentialIdentity *)credentialIdentity;
但我不能让它正常工作

自动填充已在“设置”中启用,也已在“我的应用”中启用

我已经阅读了文档,但这对我没有帮助

我已尝试从
viewDidLoad
prepareCredentialistForServiceIdentifiers
,…调用此函数,。。但这是愚蠢的,肯定行不通

- (void)provideCredentialWithoutUserInteractionForIdentity:(ASPasswordCredentialIdentity *)credentialIdentity {
    ASPasswordCredential *credential = [[ASPasswordCredential alloc] initWithUser:@"theUsername" password:@"thePassword"];
    [self.extensionContext completeRequestWithSelectedCredential:credential completionHandler:nil];
}
该函数应该在键盘上方显示凭据,但这不会发生。它只显示默认的“密码”按钮