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.
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.
Ok, here is the solution to this problem.
Make sure that you use Xcode 12 beta 4 and iOS 14 beta 4 on your devices.
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.
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".
Delete your old build from a device when installing a new beta.