are there any entitlements required to use NSSharing?
NSUUID* uuid = [NSUUID new];
NSString* tempDir = [NSTemporaryDirectory() stringByAppendingPathComponent:[uuid UUIDString]];
NSFileManager* fm = [NSFileManager new];
[fm createDirectoryAtPath:tempDir withIntermediateDirectories:YES attributes:nil error:nil];
NSString* tempFile = [tempDir stringByAppendingPathComponent:pdfFileName];
NSURL* fileURL = [NSURL fileURLWithPath:tempFile];
NSData *data = [self.mainPlainTextView dataWithPDFInsideRect:[self.mainPlainTextView bounds]];
PDFDocument *pdfDoc =[[PDFDocument alloc] initWithData:data];
[pdfDoc writeToURL:fileURL];
self.shareStdItemsArray= @[fileURL,self.sharedString];
NSSharingServicePicker * picker = [[NSSharingServicePicker alloc] initWithItems:self.shareStdItemsArray];
picker.delegate = self;
[picker showRelativeToRect:[sender bounds] ofView:sender preferredEdge:NSMinYEdge];
2017-01-04 22:40:24.349028 macEnact[16037:4771223] --error: [ShareKit] SHKSandbox: No read access to file file:/
2017-01-04 22:40:30.937291 macEnact[16037:4771223] warning: illegal subclass SHKRemoteView instantiating; client should use only NSRemoteView (
What am I doing wrong?
macOS10.12.2 xc 8.2.1