• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: A plugin for a sandboxed app - where to can I successfully store a temp file?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A plugin for a sandboxed app - where to can I successfully store a temp file?


  • Subject: Re: A plugin for a sandboxed app - where to can I successfully store a temp file?
  • From: Mike Abdullah <email@hidden>
  • Date: Fri, 22 Feb 2013 09:34:11 +0000

On 22 Feb 2013, at 01:34, Nick wrote:

> Hello.
> I am working on a plugin for Mail.app for Mountain Lion. The problem is
> whenever I try to save a file, I am getting an error. Which can be
> explained by the fact that Mail.app is sandboxed and I am not allowed to
> modify files anywhere on the system.
> So what I do instead - is call
>
>
> TempDir = [[[NSFileManager defaultManager] URLForDirectory:
> NSDownloadsDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:
> YES error:nil] path];
>
>
> and then create in this TempDir another directory using standard
> NSFileManager functions.
> On my Mail.app it works, on another system - it doesn't (the dir doesn't
> get created). I can't understand why. I was hoping to store a temporary
> file in Downloads, since Mail obviously should have access to this
> directory.

Why should Mail "obviously should have access to this directory”?
>
> I also tried calling this
>
> TempDir = [[[[NSFileManager defaultManager]
> URLForDirectory:NSItemReplacementDirectory inDomain:NSUserDomainMask
> appropriateForURL:[NSURL URLWithString:
> @"file:///private/var/tmp/my.great.app"] create:YES error:nil] path]
> retain];
>
>
> On my 10.8 system it works, on another - it doesn't (I can't save files to
> TempDir from my plugin). What am I doing wrong?

You’re not consulting/logging the error message for a start . That will tell you *why* it fails.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: A plugin for a sandboxed app - where to can I successfully store a temp file?
      • From: Nick <email@hidden>
References: 
 >A plugin for a sandboxed app - where to can I successfully store a temp file? (From: Nick <email@hidden>)

  • Prev by Date: Re: How to recognize mutability?
  • Next by Date: [OT] Sync vs ASync Server Comms
  • Previous by thread: A plugin for a sandboxed app - where to can I successfully store a temp file?
  • Next by thread: Re: A plugin for a sandboxed app - where to can I successfully store a temp file?
  • Index(es):
    • Date
    • Thread