What's causing applicationQuit?

My extension has a problem (state gets out of sync) each time I get the following message in the system console:


Process: loginwindow

Message: -[PersistentAppsSupport applicationQuit:] | for app: <app name> Extension (Safari), _appTrackingState = 2


I get this message when I leave Safari alone for a minute, or when my extension opens a new tab.


Do you know what is causing this problem?


My extension is unsigned.

macOS 10.14.5

Safari 12.1.1

Xcode 10.2.1

Replies

What kind of state is getting out of sync?


A couple things to keep in mind here:

1) If your users aren't actively using Safari, your extension process could be terminated due to inactivity

2) Each time Safari calls into your extension, a new instance of your extension's principal object is created


So maybe after inactivity your extension's process ends, and that's the state getting out of sync?