Widget extension showing when built directly to device but not via TestFlight

For some reason, if I build my app from Xcode directly to the device; the Widget extension works, shows in the gallery and behaves as expected.

However, if I then publish that build via TestFlight, no Widget extension appears on the device.

Does anyone have any thoughts as to why this could be?
Answered by aTinyFish in 625874022
I can confirm that with Xcode 12, beta 4, the following worked for me:
  • Set DEAD_CODE_STRIPPING to NO

  • Disabled bitcode when uploading to AppStore Connect

  • Installed on iPhone 11 running Public Beta 3 via TestFlight

Widgets appeared and looked appropriate in the widget picker interface, but appeared black when installing to home screen. Restarting the device resolved the issue, and the widgets now work
Accepted Answer
There seems to be a bug with widgets that are built for release. See here: https://developer.apple.com/forums/thread/655393?page=2

Apple's Xcode release notes says to set DEAD_CODE_STRIPPING to NO and then disable BitCode when submitting, but most developers seem to say that isn't working either.
Ahh amazing! Thank you for the reply. Glad to know it's not me being a doozy here. Probably should have read the release notes properly really!
Accepted Answer
I can confirm that with Xcode 12, beta 4, the following worked for me:
  • Set DEAD_CODE_STRIPPING to NO

  • Disabled bitcode when uploading to AppStore Connect

  • Installed on iPhone 11 running Public Beta 3 via TestFlight

Widgets appeared and looked appropriate in the widget picker interface, but appeared black when installing to home screen. Restarting the device resolved the issue, and the widgets now work
Unfortunately I have say, that any of solutions does not work for me.
Widget extension showing when built directly to device but not via TestFlight
 
 
Q