[FB7841910] Safari App Extensions can no longer be installed into Safari after any changes to the content script are made (100% reproducible).

ENVIRONMENT
– macOS 10.15.5
– Xcode Version 11.5 (11E608c)
– Affects both:
1) Safari Version 13.1.1 (15609.2.9.1.2)
2) Safari Technology Preview Release 109 (Safari 14.0, WebKit 15610.1.17.2)

As demonstrated in the video attached to the Feedback Assistant post, "safari_cannot_reinstall_app_extension.mp4":

1) My App Extension with a comment-only content script can run happily in Safari TP the first time round.

2) Changing the content script in any way, however, causes subsequent installs of the App Extension to fail.

3) Re-enabling the Safari App Extension from Safari's preferences has no effect, nor does allowing unsigned extensions. The Safari App Extension simply cannot be installed again.

4) Cleaning the build is the only thing that allows the Safari App Extension to be installed again.

Could you please tell me how to surmount this issue? It doesn't seem to be expected working behaviour, and it's tediously slow to do a cold rebuild every time I change my content script. I'd expect to just be able to click 'run' in Xcode after any change to the content script and for the updated Safari App Extension to install without a problem.
Accepted Answer
This is a known issue with Xcode 11 that has been fixed with the Xcode 12 beta. Clean builds or touching the Swift/ObjC code are the correct workaround for Xcode 11.

The issue revolves around the code signature not being updated when you change a resource in the extension, but not the compiled code.
[FB7841910] Safari App Extensions can no longer be installed into Safari after any changes to the content script are made (100% reproducible).
 
 
Q