Is it possible to create Xcode widget in Xcode 12 but without the use of SwiftUI and instead use XIB files to construct the Widget UI?
SwiftUI is more than a framework. It is integrated into Xcode, enabling developers to build user interfaces much faster than ever before. You can edit the user interface of your application in code or in a visual editor that automatically reflects what your code translates to.
Go to the Home Screen page where you want to add the widget, then touch and hold the Home Screen background until the apps begin to jiggle. at the top of the screen to open the widget gallery. Scroll or search to find the widget you want, tap it, then swipe left and right through the size options.
Widget
protocol is only available in SwiftUI
framework, so you can only create widgets using SwiftUI.
https://developer.apple.com/documentation/swiftui/widget
Update
You can't use UIKit views wrapped in UIViewRepresentable
within SwiftUI for Widgets, It will appear blank.
https://developer.apple.com/forums/thread/653471
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With