Add Sandbox support
noahsw opened this issue · 9 comments
Without temporary entitlements and some changes to FRCrashLogFinder, the app can't find any crash reports.
This can be solved by adding a temporary entitlement com.apple.security.temporary-exception.files.home-relative-path.read-only to:
- /Library/Logs/HangReporter/
- /Library/Logs/DiagnosticReports/
- /Library/Logs/CrashReporter/
and also update the way we find libraryDirectory in FRCrashLogFinder.m's findCrashLogsSince:
const char *home = getpwuid(getuid())->pw_dir;
NSString *path = [[NSFileManager defaultManager]
stringWithFileSystemRepresentation:home
length:strlen(home)];
NSURL *url = [NSURL fileURLWithPath:path isDirectory:YES];
libraryDirectory = [url.path stringByAppendingPathComponent:@"Library"];
I just tried the master branch and out of the box it isn't finding the crash reports for my sandboxed app. The crash reports are landing in the app's sandbox container directory, so a temporary exception shouldn't be needed. It seems like FeedBackReporter is looking in the wrong place, or maybe there's something I need to configure?
@mike-thon -- which version of OSX? Mine is 10.7.
On Jan 27, 2013, at 7:51 PM, noahsw notifications@github.com wrote:
@mike-thon -- which version of OSX? Mine is 10.7.
—
Reply to this email directly or view it on GitHub.
Oops, my bad. I looks like the system is logging crash reports in /Users/mike/Library/Logs/DiagnosticReports which is outside of the sandbox. this is on 10.75 and 10.8.2 Then, if I use this framework in a sandboxed app, do I need to request a temporary entitlement?
mike, you don't need to ask Apple for a temporary entitlement, you can just specify it and see if that fixes your issue.
As for whether it will be accepted on the MAS, only Apple knows that...
I updated my copy of feedbackReporter to work inside of the sandbox but my app was just rejected because I requested
com.apple.security.temporary-exception.files.home-relative-path.read-only: /Library/Logs/DiagnosticReports/
I'm going to appeal and investigate alternatives.
I just filed http://openradar.appspot.com/radar?id=5795148369756160 to express my frustration about this.