NSFileProviderExtension results in console errors and no breakpoints

Greetings! I'm trying to write a simple NSFileProviderExtension in Swift in a simple Single View iOS app with the new Xcode 9 / iOS 11 beta. I used the templates in Xcode to create a Single View universal iOS app in Swift, then added a new File Provider extension using the Xcode template in Swift. Everything builds and runs, but when I try to debug the File Provider extension against the Files app on my iPad Pro device connected to Xcode, I get these errors in the console when I switch to my file provider which shows up in the Locations list in Files:


2017-06-10 13:45:02.755981-0700 Files[3040:585145] [default] [ERROR] received an error while enumerating changes: Error Domain=NSCocoaErrorDomain Code=3328 "The requested operation couldn’t be completed because the feature is not supported."

2017-06-10 13:45:02.756438-0700 Files[3040:585145] [UI] collection(_:didEncounterError:): collection <FPItemCollection:0x1c01b2980 id:NSFileProviderRootContainerItemIdentifier> did encounter error Error Domain=NSCocoaErrorDomain Code=3328 "The requested operation couldn’t be completed because the feature is not supported."

2017-06-10 13:45:02.756499-0700 Files[3040:585145] [UI] Collection encountered error: Error Domain=NSCocoaErrorDomain Code=3328 "The requested operation couldn’t be completed because the feature is not supported."


I'm pretty new to writing extensions for iOS apps, so I'm probably doing something wrong. Any ideas?


I set breakpoints in every function in the FileProviderExtension, the FileProviderItem, and the FileProviderEnumerator classes - none fire. All I get are these errors everytime I switch to my file provider in the Files app.


Thanks for any help.

Hi cdisdero:


To debug an extension, once you run your app and bring up the Files application, make sure you go back to Xcode and attach the debugger to your extension process: Debug > Attach to Process. Your extension should be listed at the top of the process list (probably the 2nd item from the top). Once attached your breakpoints should get hit as you use the extension.

NSFileProviderExtension results in console errors and no breakpoints
 
 
Q