Jump to content

Google contacts not found in Alfred


deanishe
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by deanishe
Link to comment
Share on other sites

 Share

×
×
  • Create New...