feedbackreporter icon indicating copy to clipboard operation
feedbackreporter copied to clipboard

Add Sandbox support

Open noahsw opened this issue 12 years ago • 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"];

noahsw avatar Oct 06 '12 18:10 noahsw

See also issue #23.

seanm avatar Nov 13 '12 20:11 seanm

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?

mthon avatar Jan 26 '13 04:01 mthon

@mike-thon -- which version of OSX? Mine is 10.7.

noahsw avatar Jan 27 '13 18:01 noahsw

On Jan 27, 2013, at 7:51 PM, noahsw [email protected] 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?

mthon avatar Jan 28 '13 04:01 mthon

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...

seanm avatar Jan 28 '13 14:01 seanm

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.

foozmeat avatar Nov 27 '13 21:11 foozmeat

I just filed http://openradar.appspot.com/radar?id=5795148369756160 to express my frustration about this.

foozmeat avatar Nov 27 '13 21:11 foozmeat

@foozmeat : did Apple ever reply to that bug? (I just filed a dupe rdar://33705774.)

seanm avatar Aug 03 '17 19:08 seanm

@seanm The bug is still open and there are no comments 😒

foozmeat avatar Aug 07 '17 15:08 foozmeat