I have applied content policy as "downloadEagerlyAndKeepDownloaded" on the folder which i want to materialise (want to implement windows similar feature Always keep on this device feature in mac os in FileProvider).
For root item the policy is downloadLazily and for rest of the item it is inherited.
The issue i am facing is, while dematerialising the folder, the file provider'e evictItem api is continuously failing with resource busy error though there is no file from that folder in an open state. And it keeps giving the same error and unable to dematerialise that folder.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I am using NetFS's NetFSMountURLAsync api to mount SMB share in mac os app. I am able to mount the share however this share is not automatically appearing in Finder's sidebar. I tried using LSSharedFileListInsertItemURL to make the mount point available in Finder's side bar however facing crash on line,
kLSSharedFileListItemBeforeFirst.takeRetainedValue()
from below code snippet.
let itemType: CFString = kLSSharedFileListFavoriteItems.takeRetainedValue()
if let list: LSSharedFileList = LSSharedFileListCreate(nil, itemType, nil)?.takeRetainedValue() {
let inPropertiesToSet: CFMutableDictionary = CFDictionaryCreateMutable(nil, 1, nil, nil)
CFDictionaryAddValue(inPropertiesToSet, unsafeBitCast(kLSSharedFileListVolumesNetworkVisible, to: UnsafeRawPointer.self), unsafeBitCast(kCFBooleanTrue, to: UnsafeRawPointer.self))
let driveUrl = URL(fileURLWithPath: mountPoint)
let shareUrl: CFURL = driveUrl as CFURL
if let item: LSSharedFileListItem = LSSharedFileListInsertItemURL(
list,
kLSSharedFileListItemBeforeFirst.takeRetainedValue(),
nil, iconRef, shareUrl, inPropertiesToSet, nil) {
let itemRefId = LSSharedFileListItemGetID(item)
let itemRefIdStr = "\(itemRefId)"
userDefaults.set(itemRefIdStr, forKey: mountPoint)
}
}
Anything wrong in above code? Also since this api is deprecated is there any alternative API to achieve this. The goal is to make the mount point available in Finder's sidebar so that user can easily access it.
Topic:
App & System Services
SubTopic:
Core OS
Tags:
macOS
File Provider
Core Services
Files and Storage
We have QuickLook thumbnailing framework which is used to provide thumbnails for custom file types. However, how can we provide thumbnails for system defined file types for eg. image file types?
Is there any way to achieve this?
Topic:
Programming Languages
SubTopic:
Swift
Tags:
Files and Storage
macOS
QuickLook
QuickLook Thumbnailing
I want to provide my own thumbnails for the file types which System already provides thumbnails for. I tried using QLThumbnailProvider however it works only when the file type is custom. For system supported file types it doesn't allow me to override my own thumbnails. Is there any alternative to this?
Default behaviour of the macOS when interacting via Finder with a network share is to create thumbnails to provide a nice user experience. This behaviour is implemented by QuickLook framework.
This triggers the full file download and quickly lead to cache using large disk space and even cache trashing.
We can disable QuickLook selectively by injecting specially prepared .DS_Store file with instruction/setup to disable thumbnails in that directory but still degrades user's experience only in the network share ecosystem.
Is there any way we can provide our own thumbnails or ask Finder to not download full file to generate the thumbnail?
Topic:
App & System Services
SubTopic:
General
Tags:
Extensions
macOS
QuickLook Thumbnailing
Files and Storage
Hi,
I have a file provider based MacOS application where i have a drive added and am trying to download a folder from that drive.
The folder has sub folders and large files in it.
After some time of download started, i keep getting below error.
error: ["The operation could not be completed. Cannot allocate memory", [code: 12, domain: "NSPOSIXErrorDomain"]
The download action is triggered via Finder's download icon(cloud icon with down arrow).
I am using native URLSession to download the files from server. No third party library is used.
What could be the possible reasons for "can not allocate memory" issue?
I have FileProvider based MacOS application, where user is trying to copy the folder having mix of small and large files. Large files are having size ~ 1.5 GB from FileProvider based drive to locally on Desktop.
Since the folder was on cloud and not downloaded the copy action triggered the download. Small files were downloaded successfully however during large file download the URLSession timed out.
We are using default timeout for URLSession which is 1 min.
I tried to capture logs Console.app where i found FileProvider daemon errors. PFA
Solutions tried so far:
Increased timeout for URLSession from 5 to 10 mins - configuration.timeoutIntervalForRequest
Set timeout for resource - configuration.timeoutIntervalForResource
It happens when we have low network bandwidth. Network connectivity is there but the bandwidth is low.
Any clue by looking at these errors?
Hello,
I am currently investigating if we can disable usage of QUIC on application level.
I know we can set enable_quic from /Library/Preferences/com.apple.networkd.plist to false but it will have a global impact since this is a system file, all the applications on machine will stop using QUIC. I don't want that. What i am looking for is to disable QUIC only for my application.
Is there any way i can modify URLSession object in my application and disable QUIC? or modify URLSessionConfiguration so system will not use QUIC?