Hi Quinn, thanks as always for your reply.
I did have hardened runtime enabled and I still see the error. I tried enabling the library validation because the error relates to a library. I removed it and the issue persists.
I've refactored my code to remove the dependency on the library, but now the widget won't appear as available to install† at all. Out of desperation I've tried converting to the new AppIntents, that seems like a good idea generally but it hasn't helped in this case.
Here's what I've found most recently:
make a new widgets extension with a bundle id with that ends in widgets instead of widget. it appears
remove the old widget extension and rename the new one to without the S it doesn't appear
rename it to with the S it appears again
So I assume this is something to do with signing or security, as at that point it's nothing to do with my code.
As an aside, the default widget target generated by Xcode doesn't have a hardened runtime entitlement and it works. But it's also just hello world so 🤷
I should have said, I went through quite a bit of your post, but ran out of time that day. I'll go through it again. My is currently just in development for macOS but I don't intend to make it available outside of the Mac App Store, and I'm developing in Xcode so I think quite a lot of it is out of scope for this issue.
Any advice on how to debug this further would be appreciated.
† by available to install I mean if you bring up Notification Centre and tap "Edit Widgets" it doesn't appear on the list of apps