Let’s create an iPhone app that displays an advent calendar Lock Screen widget.
Create a new Xcode project
You’ll need Xcode 14.0 or later for this project.
Choose “File > New Project”, or click on the “Create a new Xcode Project” button.



Add a widget target
File > Add Target
Use the “File > Add Target” menu item to add a “Widget target”.

You don’t need a Live Activity. You might want a Configuration intent.

Change the preview widget family to .accessoryRectangular

Draw the widget
Lock Screen widgets render in xxx mode. This limits you to using alpha and transparency.

Set the Metadata

Simulate
⌘-R to build and run
Command-R to start running the app on the simulator.

Lock the screen
⌘-L or Device > Lock Screen

Long press to customize

Choose Lock Screen

Tap Add Widgets

Choose Advent Calendar

Choose the Shape

Final result
