Title: Issues with NSExtensionMainStoryboard or NSExtensionPrincipalClass in Widget Extensions for iOS 14

I'm working on an app that has the following structure:

MyApp

MyWidgetExtension MyWatchKitApp -- MyWatchKitAppExtension ---- MyWatchKitAppWidgetExtension

Both MyWidgetExtension and MyWatchKitAppWidgetExtension were developed using a shared MyWidgetBundle defined as follows:

@main
struct MyWidgetBundle : WidgetBundle

However, I'm running into an issue when attempting to run this on devices with iOS 14. I get an error stating "App extensions must define either NSExtensionMainStoryboard or NSExtensionPrincipalClass keys in the NSExtension dictionary in their Info.plist."

Interestingly, if I remove MyWatchKitAppWidgetExtension, the app installs just fine. But, if I add NSExtensionPrincipalClass or NSExtensionMainStoryboard, when I try to distribute the app to TestFlight, I receive an error stating "Unexpected key NSExtensionPrincipalClass found in extension Info.plist".

I'm at a loss as to how to resolve this issue. Does anyone have any suggestions or insights?

same issue, do you find solution?

There's a similar thread here: https://forums.developer.apple.com/forums/thread/732892

It didn't help me. What happens to me is that if I define NSExtensionPrincipalClass, the organizer won't let me upload to AppStore because NSExtensionPrincipalClass is unexpected. If I remove NSExtensionPrincipalClass, TestFlight fails to install because NSExtensionPrincipalClass is missing...

Title: Issues with NSExtensionMainStoryboard or NSExtensionPrincipalClass in Widget Extensions for iOS 14
 
 
Q