Mavericks & Sandboxing behaviour

Hi

I have just loaded Mavericks on my Mac mini and notice a different behaviour when I run the app I am developing.

The app accesses Apple’s Contacts app using MBS plugins. Under Mountain Lion on first install and run of the app it would ask if the app could access contacts. Under Mavericks it asks the same question every time the app is run (both runtime and debug) - and it introduces a long delay before the question pops up.

So my question is, is this a Sandboxing issue, an MBS issue or a Mavericks issue? How do I fix it?

Jim

My suggestion would be to find a similar product to yours and figure out if acts the same way.

Or you may want to ask on the Apple Developer Forums, there are plenty of Apple engineers there who are great at answering questions.

What I do know, is that there is a plist entry “NSContactsUsageDescription”, have you added this to your application? While I wouldn’t immediately think that this would solve your problem, it might?

Go to System Preferences/Security and Privacy/Privacy/Contacts section and add your app.

I was just about to say, check and see if your application in that System Preferences section, if not then perhaps there is something you need to add to your application to allow to be in that list?

Oh and lastly… You have added the entitlement for accessing the address book when Sandboxing your application right?

In App Wrapper there is an option for “Contacts” under “Personal”, while in App Wrapper Mini, it’s under “Personal Data Access”.

Thanks for the comments. Yes, it was already listed as an app under system Preferences/Security/Privacy/Contacts - that fixed it in Mountain Lion but doesn’t seem to fix it in Mavericks.

I’ve not got as far yet as using App wrapper - just running it in the IDE debugger causes the problem (which it didn’t previously).

Any other ideas whilst I go and ask on an Apple Forum.

Jim

Do you a self very BIG favour and use App Wrapper. Its cheap and is worth every little penny you spend on it.
imo it is a must have utility for every Xojo OS X developer.

Christoph - yes I had intended doing that - was really curious though why behaviour had changed twixt Lion and Mavericks and appWrapper doesn’t do anything to debug mode.

I’ll let you know if appWrapper fixes the runtime problem.

Jim

Nope, that didn’t quite fix it.

In appWrapper I turned on Sandboxing and checked the Personal/Contacts - and wrapped it - but still the same result - a long delay (and by long I mean long, like 6 mins) in the never-never land of “application not responding” (whilst burning about 60-80% of CPU cycles). The request to access contacts now appears on the first run, but not subsequent runs - but the delay occurs on all runs.

So it seems like sandboxing is working but something else causing the long delay.

Jim

Ah, it seems the app’s own plist was somehow corrupted (perhaps during he Mavericks upgrade where I suffered some corrupted disk error messages). Removed the old plist and started again and seems to be working.

Thanks for your help.

Jim