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