Ios iCloud KVStore-代码签名权限错误

Ios iCloud KVStore-代码签名权限错误,ios,icloud,codesign,code-signing-entitlements,Ios,Icloud,Codesign,Code Signing Entitlements,我正在使用多个应用程序配置一个iCloud KVStore场景。在这个场景中,您有一个主应用程序写入其kvstore容器,以及从主应用程序的kvstore读取的辅助应用程序。主应用程序有一个kvstore标识符,默认情况下(当激活iCloud键值存储功能时) 事实上,它是正确的: ABCDEFGH.com.myCompany.myApp 我尝试了一个已经在AppStore上的应用程序,以及一个正在开发但在AppStore上配置的应用程序(因此BundleID,此BundleID提供的配置文件,都

我正在使用多个应用程序配置一个
iCloud KVStore
场景。在这个场景中,您有一个主应用程序写入其kvstore容器,以及从主应用程序的kvstore读取的辅助应用程序。主应用程序有一个kvstore标识符,默认情况下(当激活
iCloud键值存储功能时)

事实上,它是正确的:

ABCDEFGH.com.myCompany.myApp

我尝试了一个已经在AppStore上的应用程序,以及一个正在开发但在AppStore上配置的应用程序(因此BundleID,此BundleID提供的配置文件,都来自iTunes Connect),但错误仍然存在

<key>com.apple.developer.icloud-container-identifiers</key>
    <array/>
    <key>com.apple.developer.ubiquity-kvstore-identifier</key>
    <string>$(TeamIdentifierPrefix)$(CFBundleIdentifier)</string>
<key>com.apple.developer.icloud-container-identifiers</key>
    <array/>
    <key>com.apple.developer.ubiquity-kvstore-identifier</key>
    <string>ABCDEFGH.com.myCompany.myApp</string>
+ (NSString *)bundleSeedID {
    NSDictionary *query = [NSDictionary dictionaryWithObjectsAndKeys:
                           (__bridge NSString *)kSecClassGenericPassword, (__bridge NSString *)kSecClass,
                           @"bundleSeedID", kSecAttrAccount,
                           @"", kSecAttrService,
                           (id)kCFBooleanTrue, kSecReturnAttributes,
                           nil];
    CFDictionaryRef result = nil;
    OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, (CFTypeRef *)&result);
    if (status == errSecItemNotFound)
    status = SecItemAdd((__bridge CFDictionaryRef)query, (CFTypeRef *)&result);
    if (status != errSecSuccess)
    return nil;
    NSString *accessGroup = [(__bridge NSDictionary *)result objectForKey:(__bridge NSString *)kSecAttrAccessGroup];
    NSArray *components = [accessGroup componentsSeparatedByString:@"."];
    NSString *bundleSeedID = [[components objectEnumerator] nextObject];
    CFRelease(result);
    return bundleSeedID;
}