Posts

Post marked as solved
8 Replies
2.6k Views
Hi All,I have noticed some really strange behavior with File and Folder Permissions on Catalina 10.15(19A603). I have done some simple tests such as using a text editor to read, view, create, update a file in Documents and I was able to successfully perform these operations even though I did NOT give the text editor File and Folder permissions. I also did not give the text editor Full Disk Access permissions.My question is this normal behavior, is this a bug? This seems to defeat the point of the permssions. These programs to not have permissions but they seem to work just fine.I have noticed some othe applications requesting permissions to so and when I Do Not Allow, they do not have access to read or write to specific files and folders. Does seem like consitent behavior.Edit: This is related to an issue we are experiencing. We develop a File/Folder sharing Application and some users who upgraded to Catalina are experiencing bad behavior because our App cannot read/write to their folder. What is strange is other users experienced no issues. I have personally experienced these cases below:1. MacOS notifies me to allow the App Folder/FIle permissions and I grant the app permission. (Everything works fine)2. App has no permissions and MacOS does not prompt me to allow Folder/File permission. (App Fails)3. App has no permissions but can still perform operations on Documents and Folders. (What?! This is really weird.)I have no idea what is going on here, just need some clarification as to what the behavior should be and what work needs to be done on our end.
Posted Last updated
.
Post not yet marked as solved
12 Replies
4.8k Views
Hi all,We have a Google Drive like application that reads the user's documents folders. In Catalina, Documents are protected and require user consent. I understand that when apps attempt to access these locations a User Consent pop up should be presented to the user by the OS.I have observed in Catalina 10.15 (19A602) that no user prompt appears when we try to access a file in Documents. The app is attempting to read these files without a user initiating the request thus we do not have "implicit" permissions. In our app logs I can clearly see that we try to access `~/Documents/someFile.txt`. This fails and the the error message I see is `Operation not permitted.` This brings up a question, why didn't the user get a pop up to allow access to the Documents folder?To workaround this I directed users to the `Security & Privacy` pane to give the app File and Folder permissions. This would get around the problem however our app does not appear in the File and Folder permission section. Users also can not add apps using the plus icon since it is greyed out. I read that only apps that attempt to access the resource will appear in the File and Folder permissions. Requesting for Full Disk Access fixes these issues however it is a no go. We attempted to read a file from Documents, why isn't our app appearing in File and Folder permissions? I feel like I am at a dead end. Is there another workaround?Thanks in advance! 🙂
Posted Last updated
.
Post not yet marked as solved
4 Replies
963 Views
Hi all,We have a non sandboxed mac app along with a finder sync app extension. The main goal for this Finder sync app extension is to monitor a folder and display contextual menu items when the user right clicks a file in this location. This works great most of the time however during upgrade/reinstalls we sometimes see duplicate menu items. We have noticed that during these times that there are two Finder sync processes running at the same time and this may be causing the duplicate menu items. After observing the console logs i can see launchd launching the extension twice. Why is launchd doing this?I also noticed the most of the time Runningboardd notices that their are duplicated processes running and kills one of them. Is there anything we can/should do in our app extension that will prevent the launchd from executing the Findersync extension multiple times?Any help and insight would be greatly apperiated
Posted Last updated
.
Post not yet marked as solved
0 Replies
1.2k Views
Hi,The problem I am seeing occurs only for large file uploads (300-500 MBs). What I am observing is that iOS sometimes does NOT call didCompleteWithError even after my server sends a response. In the client logs I can see that the didSendBodyData method gets called several times. Which is expected, however it does not seem to stop even after sending all the bytes. I have also noticed that sometimes the taskId changes or the totalBytesSent gets reset. Which does not make any sense since I have not queued up another upload task. I only called resume once.Also note: This behavior happens when the app is in the foreground. I have not attempted testing background uploads yet. Additionally I have tired using the default session and still observe the same behavior.Everything works as expected the file is small.(~50 Mbs). The didRecieveData method gets called along with the didCompleteWithError method.Below are some code snippets of the background task://FileOperationsDelegate.mm - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didSendBodyData:(int64_t)bytesSent totalBytesSent:(int64_t)totalBytesSent totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend { NSNumber* taskId = [NSNumber numberWithUnsignedInteger:task.taskIdentifier]; AwLog(@"DidSendBodyData for taskID: %@ BytesSent: %lld TotalBytesSent: %lld ExpectedToSend: %lld\n", taskId, bytesSent, totalBytesSent, totalBytesExpectedToSend); if (updateFileProgressCallback != NULL) { updateFileProgressCallback(bytesSent, totalBytesSent); } }Here is by backgroundSession.//FileOperationsDelegate.mm - (NSURLSession *)backgroundSession { static NSURLSession *session = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier: KEY_BACKGROUND_SESSSION_ID]; configuration.discretionary = YES; configuration.sessionSendsLaunchEvents = YES; configuration.URLCache = nil; bool wifiOnly = [ClientConfiguration.sharedInstance isWifiOnlyEnabled]; if (wifiOnly) { configuration.allowsCellularAccess = false; } NSOperationQueue* delegateMainQueue = [NSOperationQueue mainQueue]; delegateMainQueue.maxConcurrentOperationCount = 1; session = [NSURLSession sessionWithConfiguration:configuration delegate:self delegateQueue: delegateMainQueue]; }); return session; }Creating the upload task//FileUploader.mm NSURLSession* backgroundSession = [FileOperationsSessionDelegate.sharedInstance backgroundSession]; NSMutableString *file = [[NSMutableString alloc] initWithString:absLocalPath]; [file insertString:@"file://" atIndex:0]; NSURL* fileToBeUploaded = [NSURL URLWithString:file]; NSURLSessionUploadTask* uploadTask = [backgroundSession uploadTaskWithRequest:urlRequest fromFile:fileToBeUploaded]; uploadTask.countOfBytesClientExpectsToSend = self.uploadSizeBytes; uploadTask.countOfBytesClientExpectsToReceive = 450; ConnectionCallback uploadCompleteCallback = ^(NSURLResponse * response, NSData * data, NSError * error) { // A callback to complete the file upload. It will update the UI and notify the user // on how the upload went. } BytesUploadedCallback updateFileProgressCallback = ^(long bytesWritten, long totalBytesWritten) // A callback that will update the progress bar. }; [FileOperationsSessionDelegate.sharedInstance setUploadCallback:uploadCompleteCallback]; [FileOperationsSessionDelegate.sharedInstance setConnectionCallback:updateFileProgressCallback];; [uploadTask resume];Any help with this will be greatly apperiated.Thanks : )Specs:iOS version 12.3Device: iPad Pro 11Xcode: 10.1
Posted Last updated
.