We use File Provider Extension in our main app, and it is working fine. We always call "NSFileProviderManager.add(_:completionHandler:)" function to start the extension, and "NSFileProviderManager.disconnect(reason:options:completionHandler:)" to temporarily quit the extension with the reason which will be shown in the Finder at the top of the FP domain folder.
But sometimes, when the main app calls the above functions, the following issue cases occur, and the extension does not start/stop:
- The completionHandler function doesn't get called (As we noticed, we waited for 2 minutes. Then, we restarted the main app.)
- One of the following errors returned: i) "The application cannot be used right now", ii) "Couldn't communicate with the helper application", iii) "No valid file provider found with identifier"
Here, the important thing is that restarting the main app once or twice clears the issue, and the extension starts. But it is frustrating to restart the app each time we get this issue.
We want to know the following things:
- Why and when do the above issues occur?
- Why do they occur only sometimes, and how does the app restart clear the issue?
- How do we resolve them without restarting the main app?
This has become a critical issue, so a detailed explanation would be greatly appreciated. TIA.