Post

Replies

Boosts

Views

Activity

Folder handling of the FileProvider extension
Hi all, I'm building a non-replicated FileProvider extension for iOS 11+. I'm trying to understand what the expected behaviour is for folders in the FileProvider. When I'm navigating folders, there's no placeholders being created in the shared storage. I know that, because providePlaceholder(at:completionHandler:) isn't called. However, suddenly, it does get called when I'm copying a folder with nested folders for example. Then, I'll also see startProvidingItem getting called on a folder sometimes, while the same action sometimes doesn't get triggered on another sibling folder. Is something wrong in my setup/nodes, or is it expected that I randomly download a folder and unzip it instead of just downloading an item?
0
0
754
Sep ’22
FileProvider duplicating files
Hi, When I've got a folder with 49 items in it and I long press that folder and choose "duplicate", why does that download + re-upload the files that are already on disk in our datacenter? Is there a way to be less wasteful about this and just use the copy operation on our API instead of downloading + re-uploading every file individually? Thanks in advance!
0
0
542
Aug ’22
URLSessionUploadTask memory usage
Hi all, I'm working on a FileProvider extension and currently using a library to do networking. However, my app extension gets killed when uploading files because they are loaded into memory. Now, in WWDC 2017 session 243 (FileProvider Enhancements) it is mentioned that an URLSessionDownloadTask and URLSessionUploadTask are the way to go because they don't use memory allocations. Is that a guarantee? Or does it differ per instantiation method (InputStream, Data, fileURL)?
1
0
959
Aug ’22
Data .alwaysMapped question
Hi all, I've got a question about the Data type functionality. If I load a fileURL through the Data(contentsOf:options:) initializer with .alwaysMapped, if I subscript that variable, does that still reference the local file or does it keep it in memory somehow? extension Collection {     func unfoldSubSequences(limitedTo maxLength: Int) -> UnfoldSequence<SubSequence, Index> {         sequence(state: startIndex) { start in             guard start < endIndex else { return nil }             let end = index(start, offsetBy: maxLength, limitedBy: endIndex) ?? endIndex             defer { start = end }             return self[start..<end]         }     }          func subSequences(of n: Int) -> [SubSequence] {         .init(unfoldSubSequences(limitedTo: n))     } } Thank you in advance!
1
0
671
Aug ’22
Enumerator doesn't enumerate changes on PushKit notification
I'm seeing a notification come in through PushKit for my FileProvider extension on iOS: func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for type: PKPushType, completion: @escaping () -> Void) { print("FileProvider::pushDelegate::didReceiveIncomingPush", type.rawValue, payload.dictionaryPayload)     } For example, I'm seeing: FileProvider::pushDelegate::didReceiveIncomingPush PKPushTypeFileProvider [AnyHashable("aps"): {     "" = "{\"container-identifier\":\"NSFileProviderRootContainerItemIdentifier\"}"; }] But I'm not getting a ping to enumerateChanges in the enumerator that is currently active. What would cause this?
1
0
948
May ’22
FileProvider Validation Tool missing
At least one other user has been asking for the FileProvider validation tool on this forum. I'd like to know when this will be placed back, because it currently looks like Apple doesn't care about companies trying to integrate with Files.app. The documentation is lacking, unclear or dubious, sometimes even outdated. Please give us the FileProvider Validation Tool back.
0
0
606
May ’22
FileProvider won't stop refresh indicator on reparenting action
Hi all, I'm wondering if anyone could help me out. I'm working on the file actions and I've noticed that when I want to reparent an item, I first update it locally and call the completionHandler. Then I update it on the server and call NSFileProviderManager.default.signalEnumerator(identifier:completionHandler), but the UI won't stop showing the refresh indicator and ultimately crash. What am I doing wrong?
1
0
604
Jan ’22
FileProvider extension approach
Hi all, I'm working on a FileProvider extension and I'm getting kind of lost. My questions: The working set of the app is local, offline and shouldn't contact the cloud. Do I build a working set on-device, or should I -after login- collect all working set data and cache it on device and signal a change to the working set? My assumption is that I don't save folder nodes to disk when enumerated from the cloud, but only the actual files, is that correct? Thanks in advance and have a wonderful day!
2
0
1.2k
Oct ’21