In my content blocker app I added an action extension for Safari. When I tap on the close button of my action extensions view controller the view disappears but with a big delay. Sometimes the view starts the closing animation after 2-3 seconds and sometimes directly. I removed all of the code inside the buttons delegate method so when the user taps the button only self.extensionContext!.completeRequestReturningItems will be called where the completion block is empty. But this has the same effect.
The strange thing is that I dont see this delay in other Safari extensions. Their views vanish directly when you press the close button.
Has someone of you an idea what the reason is for this delay? This app and the action extension I wrote completely in Swift.