On Sun, Oct 30, 2011 at 4:46 PM, Gideon King <gid...@novamind.com> wrote: > Further to my previous questions about sandboxing, I have now done more > research and experimentation, and the more I find out about it the more > questions it throws up. > > 1. I have a folder in the Application Support folder that my apps have been > using to store and retrieve log data, but even if I add an entitlement > relative to the home folder to /Library/Application Support/My Folder/ I > still can't access it. I would have expected the sandbox to have a link to > that folder created in the container folder, but it doesn't. I'm interested > in knowing what I may have done wrong with this…
Read the "Migrating an App to a Sandbox" section of the App Sandbox Design Guide: http://developer.apple.com/library/mac/#documentation/Security/Conceptual/AppSandboxDesignGuide/MigratingALegacyApp/MigratingALegacyApp.html#//apple_ref/doc/uid/TP40011183-CH6-SW8 > > 2. My application allows users to drag files on to the documents to create > links to those files, and when they click the links, it uses NSWorkspace to > open the files, which initially works, but then when the user restarts the > application, and tries to open the file, it says that I don't have permission > to view it. I think this is a fundamental limitation of the sandbox, and > believe that there is no workaround for this. I would love to be proved wrong > on this. > > 3. In my application, you can embed files as part of the file that is saved, > and when you want to open the embedded file, it copies it to a temporary > folder (using NSTemporaryDirectory() ), and uses NSWorkspace to open the > file. This is being denied by the sandbox with a message "deny > file-issue-extension", and "Quarantine resolution refused". So this gets > blocked too… Is there some way around this? Do not use NSTemporaryDirectory. Use -[NSFileManager URLForDirectory:inDomains:]. > > 4. When I try to launch my error reporting application from my main > application, I get an error LSOpenFromURLSpec() returned -10827. Again, this > only happens when using sandboxing - any clues? LSOpenFromURLSpec is prohibited under sandboxing. > > 5. I use CFPreferencesCopyAppValue to read information about the user's > iPhoto preferences (so that I know where to look to load their iPhoto > library), but this doesn't seem to work in the sandbox either - is there a > workaround for this? This is prohibited under sandboxing. Read "Accessing Preferences of Other Apps" in the App Sandbox Design Guide: http://developer.apple.com/library/mac/documentation/Security/Conceptual/AppSandboxDesignGuide/DesigningYourSandbox/DesigningYourSandbox.html#//apple_ref/doc/uid/TP40011183-CH4-SW12 > All of these issues are show stoppers for me being able to use the sandbox, > and with Apple declaring that all apps submitted to the app store must be > sandboxed, this becomes a major issue. If any of these is not able to be > resolved, then I will not be able to submit my app to the app store. If these > issues are not resolved, I can think of quite a number of productivity > applications that won't be able to be sandboxed for these same reasons. File Radars describing your issues with App Sandboxing, and visit the Application Sandboxing Dev Forums: https://devforums.apple.com/community/mac/lion/appsandbox --Kyle Sluder _______________________________________________ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com