Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addressbook support #101

Open
rawcreative opened this issue Apr 12, 2014 · 3 comments
Open

Addressbook support #101

rawcreative opened this issue Apr 12, 2014 · 3 comments

Comments

@rawcreative
Copy link
Member

It would be great if the MacGap API had a way to interact with the OSX shared addressbook. This could be a huge benefit for a wide range of apps, and seems to be the only thing really missing from the API.

@jeff-h
Copy link
Member

jeff-h commented Apr 13, 2014

This is a great idea. How extensive would the implementation need to be to be useful? I think implementing the whole API would be a big job. I'm wondering if we could simply supply the user's entire address book as a single object to the JavaScript, and do all searching / filtering etc on the JS side?

Would you also need the ability to add data into the address book?

Finally, can anyone add any insight into how this affects App Sandboxing? If we include code to access an Addressbook, do we then have to check "Contacts" under App Sandbox in Xcode regardless of whether a particular app needs it? I'm not sure that Apple accepts apps that claim the need to use an address book but have no apparent functional reason for requiring it. e.g. if you're creating an HTML5 game for the MAS, we don't want you to have to tick "Contacts" and likely be rejected for it, just because MacGap includes the code.

Either way, it looks increasingly likely that JS coders using MacGap are going to have to dig at least somewhat into the Xcode project in order to configure it to their needs. Not sure how comfortable people are with that?

@jeff-h
Copy link
Member

jeff-h commented Apr 13, 2014

Hmm, contrary to some of my suggestions above, I've just read the following from https://developer.apple.com/library/mac/documentation/userexperience/conceptual/AddressBook/Tasks/Searching.html#//apple_ref/doc/uid/20001024-BABHHIHC:

Letting the framework handle the search can yield significant performance benefits compared to performing the search inside your application, because the framework is aware of the low-level layout of the underlying database, and it can optimize disk access accordingly.

@jeff-h
Copy link
Member

jeff-h commented Apr 20, 2014

It would be great to add Address Book access. I've taken a good look at it and it really wouldn't be that difficult, if it weren't for the issue of serialising the address book data into JSON, which looks surprisingly painful. The ABPerson object is comprised of a whole load of different non-simple object classes.

Anyone care to take a look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants