On Thu, 2 Aug 2012 08:47:27 -0400, Rob McBroom said:

>So maybe you can’t read the prefs from a sandboxed application?

That would seem to fit with the whole idea of a sandbox, wouldn't it?

It would probably work if you give yourself a temporary entitlement to Mail's 
pref file.  I would try that as a test.  It sucks as a solution, because you'd 
have to hardcode a path (always a fragile thing).  I've never used App Store, 
but I imagine they may not allow that solution either.  So if you care about 
App Store, you may need to degrade your user experience, as is apparently 
happening a lot because of App Sandbox.  Better to ditch App Store, but I 
digress.

But since you're looking for something pretty standard, like the user's SMTP 
server, and not some obscure Mail.app pref like font size, there may be API you 
can use.  After all, the UI for such things used to be in System Preferences.

In the old days, I'd have suggested the Internet Config APIs (see 
InternetConfig.h).  Indeed there is a kICSMTPHost constant there.  God knows if 
it still works, especially in App Sandbox.  Maybe Launch Services has an API to 
get the smtp server?

-- 
____________________________________________________________
Sean McBride, B. Eng                 s...@rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to