title: cast of indirect pointer to an Objective-C pointer
body: <p>I have the following code:</p>
  
  <pre><code> OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)attrDictionary, (CFTypeRef *)&amp;value);
  </code></pre>
  
  <p>which causes an error of:</p>
  
  <pre><code>Implicit conversion of an indirect pointer to an Objective-C pointer to 'CFTypeRef *' (aka 'const void **') is disallowed with ARC
  </code></pre>
  
  <p>Any idea on how to fix this? I have tried changing <code>CFTypeRef *</code> to an <code>id *</code> but it didn't work out</p>
  
  <p>Here's the full method:</p>
  
  <pre><code>+ (NSData *)keychainValueForKey:(NSString *)key {
    if (key == nil) {
      return nil;
    }
  
    NSMutableDictionary *attrDictionary = [self attributesDictionaryForKey:key];
  
    // Only want one match
    [attrDictionary setObject:(id)kSecMatchLimitOne forKey:(id)kSecMatchLimit];
  
    // Only one value being searched only need a bool to tell us if it was successful
    [attrDictionary setObject:(id)kCFBooleanTrue forKey:(id)kSecReturnData];
  
    NSData *value = nil;
    OSStatus status = SecItemCopyMatching((CFDictionaryRef)attrDictionary, (CFTypeRef *)&amp;value);
    if (status != errSecSuccess) {
      DLog(@"KeychainUtils keychainValueForKey: - Error finding keychain value for key. Status code = %d", status);
    }
    return [value autorelease];
  }
  </code></pre>