title: Error with fetching value from CFArray
body: <p>I'm trying to fetch contacts from address book. My code is working properly in Objective C, but when I converted it to swift I'm getting error </p>
  
  <p><strong>Could not cast value of type 'Swift.UnsafePointer&lt;()>' to 'Swift.AnyObject'</strong></p>
  
  <p>Below is my code</p>
  
  <pre><code>    var errorRef: Unmanaged&lt;CFError&gt;? = nil
      let addressBook: ABAddressBookRef = ABAddressBookCreateWithOptions(nil, &amp;errorRef).takeRetainedValue()
      let allPeople = ABAddressBookCopyArrayOfAllPeople(addressBook).takeRetainedValue() as NSArray //as [ABRecordRef]
      let numberOfPeople = ABAddressBookGetPersonCount(addressBook)
  
      for (var i=0; i &lt; numberOfPeople; i++){
          runOnMainQueueWithoutDeadlocking({ () -&gt; () in
              ProgressHUD.show("Reading Contact \(i) out of \(numberOfPeople)")
          })
  
          let aPerson = CFArrayGetValueAtIndex(allPeople, i) as! ABRecordRef     //Error here
      }
  </code></pre>
  
  <p>How can I convert record to ABRecordRef. Please help</p>