         }
         
         for rhNumber in rhPhoneNumbers! {
-            println(OSTPhoneUtility.normalizedPhoneStringFromString(n))
             let n: NSString! = rhNumber as! NSString
+//            println(OSTPhoneUtility.normalizedPhoneStringFromString(n))
         }
     }
     

import UIKit
import Realm

class OSTABManager {
    let ab = RHAddressBook()
    let realm = RLMRealm.inMemoryRealmWithIdentifier("OSTABManagerRealm")

    func hasPermission() -> Bool {
        return RHAddressBook.authorizationStatus() == RHAuthorizationStatus.Authorized
    }

        }
    }
    
    private func shouldSkip(rhPerson: RHPerson) -> Bool {
        return rhPerson.compositeName == nil
    }
    
    private func writeRecordWithPerson(rhPerson: RHPerson) {
        if (shouldSkip(rhPerson)) {
            return;
        }
        
        weak var weakSelf = self;
        
        var ostPerson = OSTPerson(
            fullName: rhPerson.compositeName,
            firstName: rhPerson.firstName != nil ? rhPerson.firstName : "",
            lastName: rhPerson.lastName != nil ? rhPerson.lastName : "",
            phoneNumber: "")
        
        OSTABManager.realm().transactionWithBlock { () -> Void in
            var matches = OSTPerson.objectsWhere("fullName = '\(ostPerson.fullName)'")
            if (matches.count > 0) {
                println("\(ostPerson.fullName) already exists")
            } else {
                OSTABManager.realm().addObject(ostPerson)
            }
        }
        
        let rhPhoneNumbers = rhPerson.phoneNumbers.values as Array?
