In the current Safari App Extension framework the background Swift process can be removed by the OS at any point while Safari is still running. This creates multiple issues:
1. You cannot store any state about the tab in the background, which is neccessary if you want to update the button label and icon, or context menu options based on the state of the tab
2. There may be a big delay between user pressing the extension button and any visible response, since the background app extension process needs to be reinitialized if it got killed.
My question is whether there is a way to maintain the background app extension process running for as long as Safari itself is open and/or would that be considered bad practice? If it is, what would be the way to mitigate the issues outlined above?