I'm creating a project that has a requirement of having a Widget. My project is created using Xcode 12.4, the minimum iOS version supported by my iOS App is iOS 13, hence my App's target deployment iOS version is iOS 13. Since WidgetKit is available only in iOS 14, I created a new target for my Widget with a deployment target of iOS 14.
Could it be possible to make the deployment iOS version of my Widget to iOS 13 so that I can run it in iOS 13 iPhones? Actually I tried it but I'm getting an error "'main()' is only available in application extensions for iOS 14.0 or newer". I tried adding @available annotation above @main but it is not working. See photo below.
I want to make this work because Today's Widget is no longer available in Xcode 12. We still want to show some widgets when our user is running in iOS 13, like the Calendar and Weather Apps widgets.