I was able to add new domain with 'NSFileProviderManager.add' function in Xcode past 2 months. Yesterday I created .pkg file (installer file) for distribution with 'pkgbuild' and 'productbuild' commands in terminal.
I successfully install application and test it then uninstall it. However after this, In Xcode I cannot add new domain anymore. I keep getting "Error Domain=NSFileProviderErrorDomain Code=-2001 "No valid file provider found with identifier ‘’."
Command that used to create .pkg file
- pkgbuild --root "path" --scripts "path" --identifier "same bundle identifier with app" --version 1.0 --install-location /Applications "newpkg.pkg"
- productbuild --synthesize --package "newpkg.pkg" Distribution.xml
- productbuild --distribution Distribution.xml --package-path "newpath.pkg" "newpathrelease.pkg"
NOTE: When app is installed (But not running). I am able to add new domain in Xcode. After I uninstall app, I start to get same error again
NOTE: I uninstall app by move it to Trash from Applications directory in finder
Any suggestion about add new domain in Xcode during development? Or How to fix 'No valid file provider found with identifier' error