Post not yet marked as solved
In my project, when I try to build, one of my many packages is crashing the linker:
can't find atom for stabs BNSYM at 000273FC in /Users/scott/Library/Developer/Xcode/DerivedData/MailMaven-ahgcnebtfdhjorasdlhlivramzrp/Build/Products/Debug/SCBaseTagKit.o
clang: error: unable to execute command: Segmentation fault: 11
The same project builds fine within Xcode 13.3, but in 14.0 (betas 1 & 2) it crashes.
I have tried cleaning many times & deleting the derived data with no change.
Does any one know what this means and what I might be able to do to fix it? Searching for any of this in many different ways has turned up nothing helpful at all.
Thanks in advance,
Scott
I am trying to allow the user to save a set of files (generated from my app) into a folder chosen by the user via the NSOpenPanel API, but am constantly getting errors that the end URL (with the folder URL and appended file name) cannot be written to.
I am not doing this across app sessions, so I can see why I should need Security Scope management, but I have been trying that and am just not sure where it should be used, if so.
On previous os versions it seems I could have simply appended my file name and write the file. I haven't found any examples of how this should be done anywhere that are recent.
Here is what I am currently doing:
URLList contains list of temporary file URLs.
NSOpenPanel * openPanel = NSOpenPanel.openPanel;
openPanel.prompt = MVNLocalizedString(@"SAVE");
openPanel.canCreateDirectories = YES;
openPanel.canChooseFiles = NO;
openPanel.canChooseDirectories = YES;
openPanel.allowsMultipleSelection = NO;
[openPanel beginSheetModalForWindow:self.view.window completionHandler:^(NSModalResponse result) {
if ((result == NSModalResponseOK) && openPanel.URL) {
NSURL * locationURL = openPanel.URL;
BOOL accessed = [locationURL startAccessingSecurityScopedResource];
NSFileManager * manager = [NSFileManager new];
for (NSURL * aURL in URLList) {
NSURL * newFileURL = [locationURL URLByAppendingPathComponent:aURL.lastPathComponent];
NSError * error = nil;
if (![manager copyItemAtURL:aURL toURL:newFileURL error:&error]) {
NSLog(@"There was an error saving a file: %@", error);
}
}
[locationURL stopAccessingSecurityScopedResource];
}
}];
My calling of the startAccessingSecurityScopedResource is me attempting to make that work, but doesn't seem correct to me. It doesn't work with or without that though.
Can anyone tell me what I am doing wrong here?
Thanks,
Scott
Post not yet marked as solved
Hello all,So I am working on our app that uses the Contacts database. Of course we need to ask for permission to access the database. In order to test this I need to reset the tcc database, using tccutil, however it does reset the system, so I cannot retest the ask for permissions.I am running on 10.15.3 for the moment on two different systems. The app only exists in one location (I had an issue with this previously, but I seemed to fix it by ensuring there was only one copy of the app on the machine). Both machines do have SIP disabled (due to some other development that I regularly do that needs SIP disabled), but I did try reenabling it and reseting the database, but that did not work either.When I looked at the tcc.db itself (getting desparate), I don't see either my app, nor the other apps that have AddressBook access.I would really appreciate any help with this issue – it is getting very frustrating.Thanks,Scott Little