Skip to content

Instantly share code, notes, and snippets.

Prashant Rane prrane

  • Go-Jek Tech
  • Bangalore
Block or report user

Report or block prrane

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@prrane
prrane / ReadAddressBook.swift
Created Sep 4, 2014
Swift: Get contact emails from AddressBook
View ReadAddressBook.swift
// based on : http://stackoverflow.com/questions/24752627/accessing-ios-address-book-with-swift-array-count-of-zero
// http://stackoverflow.com/questions/24752627/accessing-ios-address-book-with-swift-array-count-of-zero
class func extractABAddressBookRef(abRef: Unmanaged<ABAddressBookRef>!) -> ABAddressBookRef? {
if let ab = abRef {
return Unmanaged<NSObject>.fromOpaque(ab.toOpaque()).takeUnretainedValue()
}
return nil
}
You can’t perform that action at this time.