macOS FileProvider extension receives SIGTERM when running in Xcode debug session

I'm developing a macOS FileProvider extension and:

  1. Run extension in Xcode
  2. Leave it for a few minutes (ie 2-3 minutes) and use some other app
  3. The extension receives SIGTERM pointing to mach_msg_trap() on main thread.

Is this expected or there is something in my code that is causing the crash. Inspecting all the other threads doesn't show anything meaningful.

What about in production? Would the macOS automatically kill the extension process if user is not using the FileProvider Extension.

Answered by Engineer in 750034022

It is expected that the system may terminate the extension, if it is unused for some time. "Unused" meaning, the system is not waiting for completion handlers to be called for any outstanding requests to the extension.

That may happen in both development and production.

Accepted Answer

It is expected that the system may terminate the extension, if it is unused for some time. "Unused" meaning, the system is not waiting for completion handlers to be called for any outstanding requests to the extension.

That may happen in both development and production.

macOS FileProvider extension receives SIGTERM when running in Xcode debug session
 
 
Q