我一直在最近围绕Safari浏览器保存密码,并且通过WWDC会话详细讨论了从safari访问已保存的凭据并添加已保存的凭据。iOS在第三方应用程序中抓取Safari保存的信用卡信息
https://developer.apple.com/videos/play/wwdc2014-506/
我也读这个,发现这样的代码来获取保存的凭据了Safari浏览器,
SecRequestSharedWebCredential(NULL, NULL, ^(CFArrayRef credentials, CFErrorRef error) {
if (error != NULL) {
// If an error occurs, handle the error here.
[self handleError:error];
return;
}
BOOL success = NO;
CFStringRef server = NULL;
CFStringRef userName = NULL;
CFStringRef password = NULL;
// If credentials are found, use them.
if (CFArrayGetCount(credentials) > 0) {
// There will only ever be one credential dictionary
CFDictionaryRef credentialDict =
CFArrayGetValueAtIndex(credentials, 0);
server = CFDictionaryGetValue(credentialDict, kSecAttrServer);
userName = CFDictionaryGetValue(credentialDict, kSecAttrAccount);
password = CFDictionaryGetValue(credentialDict, kSecSharedPassword);
}
});
这是非常明显的是,我们可以访问共享来自safari的凭证,我已经看到应用程序做这些事情,我也看到这个tutorial详细说明了集成的步骤。
一切都很好,直到这一点,现在我也看到你可以在safari中保存信用卡信息,它会自动帮助用户预先填写支付网站上的信用卡信息。
现在问题来了,可以第三方应用获取该被保存在Safari浏览器,反之亦然保存的信用卡信息?我做了这么多谷歌搜索,这是点黑色,没有完全匹配如何以编程方式。有没有可能?
面临同样的问题。 http://9to5mac.com/2014/10/11/ios-8-how-to-use-camera-to-enter-in-credit-card-info/我想在我的应用程序中实现这样的东西。 – Abhi
@Ahi很抱歉,即使在iOS 10中也没有这样的apis。 – satheeshwaran