Pages

Labels

Sunday, September 20, 2015

          CNContactPicker - Swift Version



Sample Code :

https://github.com/imayaselvan/CNContact-Example


Sample code for geting the specific contact :


let predicate = CNContact.predicateForContactsMatchingName("Appleseed")
let keysToFetch = [CNContactGivenNameKey, CNContactFamilyNameKey]
let store = CNContactStore()
let contacts = try store.unifiedContactsMatchingPredicate(predicate,
    keysToFetch: keysToFetch)
for contact in contacts {
   print("\(contact.givenName) \(contact.familyName)")
}


For creating New Contact :

let imay = CNMutableContact()
imay.givenName = "imay"
imay.familyName = "Selvan"
let saveRequest = CNSaveRequest()
saveRequest.addContact(john, toContainerWithIdentifier: nil)
try store.executeSaveRequest(saveRequest)







Friday, November 14, 2014

Document Extension /Document Picker

Document Extension /Document Picker


























Please download the code  here

Thursday, May 29, 2014

Sunday, January 12, 2014

 
Loading