Widgets not working with TestFlight since Xcode 12 beta 3

I have noticed a strange problem today. I have uploaded a build of my app to TestFlight for internal testing using Xcode 12 beta 3. The app has widgets and if I run the app locally from Xcode widgets are working on device.

However, when I install a beta from TestFlight the widgets are not suggested by iOS and I can see in the logs that the widgets are actually crashing (something is going on with WidgetKit in the crash logs).

This has started only with beta 3, I have previously used TestFlight with widgets in beta 1 and beta 2.

Does anyone else have this problem? My feedback number is FB8122742.

Accepted Reply

Ok, here is the solution to this problem.
  1. Make sure that you use Xcode 12 beta 4 and iOS 14 beta 4 on your devices.

  2. Make sure that you have placeholder(in:) implemented. Make sure that you don't have placeholder(with:) because that's what the previous beta of Xcode was suggesting with autocompletion and without that you won't get your placeholder working. I think this whole problem is caused by the WidgetKit methods getting renamed but that's another story.

  3. As per the release notes, you need to set "Dead Code Stripping" to NO in your extension target's build settings. This is only necessary for the extension's target. When uploading your archive to the App Store Connect, uncheck "Include bitcode for iOS content".

  4. Delete your old build from a device when installing a new beta.

That should do the trick.

Replies

Hi, I just published my app to TestFlight and facing the same problem. Can find widgets in widgets list, but there are empty...
I tried all I found here, but nothing works for me.
Appreciate any help...
Facing the same problem. It seems to be Apple gift to waste our time...
We are recently facing this issue. The widget works great in the simulator and debug mode but then doesn’t show in release builds or on TestFlight. I have tried all the above recommendations including the no bitcode, and turning off dead code stripping(throughout the project). Any new solutions out there?
Same issue, followed all the advice here, still the widget is not showing up when installing the app via TestFlight.
Any solutions?

Same issue with XCode(Version 12.5.1 (12E507)) and iPhone(14.6)

Same issue with XCode v14.1 and iPhone(16.0)