我们可以访问从应用程序共享同一应用程序组启用钥匙串共享之前保存的钥匙串项吗?如果不是那么什么可能是最好的解决方法?
答案 0 :(得分:0)
在启用钥匙串共享所有钥匙串项目之前" accessGroup"是(AppIdentifierPrefix).bundleIdentifier,打开后更改为(AppIdentifierPrefix).keyChainGroupName。
解决方法是通过访问钥匙串来删除所有钥匙串项目。
AWSUICKeyChainStore *keychain = [AWSUICKeyChainStore keyChainStoreWithService:@"ServiceName"];
for (NSDictionary *dictionary in keychain.allItems)
if ([dictionary[@"accessGroup"] isEqualToString:"(AppIdentifierPrefix).bundleIdentifier"])
[keychain removeItemForKey:dictionary[@"key"]];