« Mac OS X 10.8 User No… | Home | CoreLocation GeoCoder… »

Addressbook Permission Dialog

Have you seen this dialog recently on Mac OS X 10.8?

Your language may be different, but the dialog is the same. It shows when your application wants to look into the addressbook for the first time. This happens when you call the sharedAddressbook method in ABAddressbook class. Or with our ABAddressBookMBS class with constructor to the sharedAddressbook shared method.

Now the problem with the dialog is that it blocks the application. So in order to avoid it, we created sharedAddressbookMT function. It runs the dialog on a preemptive thread in the background. You call it on a Real Studio thread, so the normal threading in Real Studio works. The result is that the permissions dialog does no longer block your app.

Also we add a function GotSharedAddressbook to ABAddressBookMBS class, so you can know whether the sharedAddressbook function has been queried before. Good to know whether a dialog may come.

This functions and the example project will be included in 12.3pr15.
29 07 12 - 12:56
No comments

Remember personal info?

Emoticons / Textile

Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.