Closed anthonysaltarelli closed 6 years ago
Hi, try this 1) Add breakpoint to this line 2) Add new contact
Does breakpoint fire?
I determined the problem. It was only fetching contacts that had phone numbers attached. I changed the line to check for names instead of phones:
addressBook.filterBlock = { (contact: APContact) -> Bool in if let names = contact.name?.firstName { return names.count > 0 } return false }
Which fixed the problem.
Running APAddressBook with swift 4, using the example code. However, when I add new contacts, they do not appear to be returned. When I modify or delete contacts, those changes are made, however.
I have looked into past issues and tried to fix the problem, but none of the solutions have fixed this issue.
How should I proceed?