@clenart
We tried the startAccessingSecurityScopedResource method on the URL passed. But the same 'operation not permitted' error is still occurring.
What might be the reason for this?
Are there any other ways to get access to the URL?
Post
Replies
Boosts
Views
Activity
I too faced the same exact issue ie. when I was running my app from the '/Applications' folder, my file provider wasn't started and got the exact error "The application cannot be used right now". After doing a lot of trial and error, I found that the app-id and group-id keys in entitlements should be set with the prefix 'teamIdentifier' for example: {teamIdentifier}.{existing-group-id}.
The necessary conditions are:
Your main app and file provider extension should be signed with entitlements that must contain the below keys (Not about the Info.plist keys):
key1 - 'com.apple.application-identifier', sample value - '{teamIdentifier}.{BundleIdentifier}'
key2 - 'com.apple.security.application-groups', sample value - '{teamIdentifier}.{groupIdentifier}'
Then, in your file provider extension, set the value '{teamIdentifier}.{groupIdentifier}' you used in the above key 'application-groups' to the 'NSExtensionFileProviderDocumentGroup' key in the extension's Info.plist.
The above two things resolved the issue to me and IDK whether the above solution is the proper one or not but I suspect using the teamIdentifiers in the entitlements would set proper permissions for both our main app and the extension.
If someone knows the exact solution or exact reason for the working of above steps, let us know.
Thanks.