title: cast of Objective-C pointer type 'NSString *' to C pointer type 'CFStringRef' (aka 'const struct __CFString *') requires a bridged cast
body: <p>When converting an Objective-C program to a Objective-C ARC, I get the error:</p>
  
  <pre><code>"cast of Objective-C pointer type 'NSString *' to C pointer type 'CFStringRef' (aka 'const struct __CFString *') requires a bridged cast "
  </code></pre>
  
  <p>The code is as follows:</p>
  
  <pre><code>- (NSString *)_encodeString:(NSString *)string
  {
      NSString *result = (NSString *)CFURLCreateStringByAddingPercentEscapes(NULL, 
                                     (CFStringRef)string, // this is line in error
                                     NULL, 
                                     (CFStringRef)@";/?:@&amp;=$+{}&lt;&gt;,",
                                     kCFStringEncodingUTF8);
      return [result autorelease];
  }
  </code></pre>
  
  <p>What is a bridged cast?</p>
  
  <p><img src="https://i.stack.imgur.com/FVBdB.png" alt="Screenshot for error"></p>