deanishe Posted February 2, 2016 Posted February 2, 2016 Alfred 2.8.3 (433) / OS X 10.11.2 As noted in this thread, Alfred doesn't find contacts from Google accounts in normal (non-Spotlight-metadata) mode. I've confirmed it with my own Google account. It appears to be an issue with Alfred, as my MailTo workflow, which uses the AddressBook API, finds 'em just fine. Spotlight metadata mode works just fine with Google contacts.
Andrew Posted February 5, 2016 Posted February 5, 2016 Hmm interesting - in the past, Apple specifically stated that only local contacts were available through the AddressBook API. I've taken a look at Alfred's ABAddressBook integration and I'm not doing anything specifically to filter out non Apple contacts. I'll have to setup my google account to take a deeper look into this. Cheers, Andrew
deanishe Posted February 5, 2016 Author Posted February 5, 2016 Yeah, that put me off using the AddressBook API in MailTo initially, but when I gave it a try, it returned contacts from all these kinds of accounts (I could never figure out how to get my LDAP server to work with Contacts.app).
Andrew Posted February 5, 2016 Posted February 5, 2016 I know you cache the data (something Alfred will do in the future too), Out of interest, are you searching the address book with an essentially * query or using another method to return all the data? Alfred is using the AB search and Apple still claims: "You can only search the user’s local Address Book database, not remote directories such as CardDAV or Exchange." https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/AddressBook/Tasks/Searching.html
deanishe Posted February 5, 2016 Author Posted February 5, 2016 Apple's telling porkies. Perhaps they just say that so they don't get grief when a new account type doesn't work. Note that Alfred works just fine with iCloud contacts, which technically aren't local either… I've just tested this on my MacBook Air, which is still running Yosemite, and Google contacts show up just fine with Alfred. This is the same Google account that didn't work on my other machine. Could it be an El Cap issue? WRT to using the AddressBook API, I'm just looping through all contacts and extracting the interesting data: ABAddressBook *AB = [ABAddressBook sharedAddressBook]; for (ABPerson *person in [AB people]) { … … } The actual implementation is in Python using the pyObjC bridge, but here's the proof-of-concept Objective-C program I made. I just tested it, and it dumps Google and Facebook contacts just fine. I'll test the program again on my El Cap machine when I get home.
Andrew Posted February 5, 2016 Posted February 5, 2016 Cheers Dean - I wonder if the search part just doesn't work on non-local contacts (Alfred currently uses ABSearchElement and recordsMatchingSearchElement on ABAddressBook).
deanishe Posted February 5, 2016 Author Posted February 5, 2016 (edited) I just tried again on my main Mac. Alfred is finding Google contacts no problem now. Same software, same Google account. I've tried adding and removing accounts on both machines (they're synced via Keychain). It appears that fiddling with the configuration on my Yosemite machine "fixed" it on the El Cap one. There seems to be something wrong with contacts in El Cap: my machine is currently going berserk asking for the password for my CardDAV account, claiming it can't log in. I'm watching the server log, and AddressBook seems to have turned it into 2 accounts, 1 correct and 1 invisible and wrong. Weird. Edited February 5, 2016 by deanishe
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now