Structures

The following structures are available globally.

Widget Bundle Entrypoint

  • This file implements a user-configurable widget that displays the cleantime set in the main app.

    The display can be just the textual cleantime report, the highest keytag collected, or keytags (before 1 year), and medallions (after one year).

    It can also combine the text with the keytag, by displaying the systemMedium family variant. If we display the systemSmall variant, then it can only be one of the above choices.

    The widget dynamically adjusts to whatever cleantime is set in the main app, and updates in realtime.

    The widget will, by default, display against a yellow gradient (the same one in the app icon), but that can be switched off, in the widget configuration, to use the standard color theme.

    See more

    Declaration

    Swift

    @main
    @MainActor
    struct NACCWidgetBundle : WidgetBundle

Widget Structure

  • This builds the view for the displayed widget. It reads the configuration, and generates a view that will be crafted to match the configuration.

    See more

    Declaration

    Swift

    @MainActor
    struct NACCWidget : Widget

Widget Intents Data Provider

  • This describes the intent, used to build and read the “Edit Widget” screen.

    See more

    Declaration

    Swift

    struct NACC_IntentProvider : AppIntentTimelineProvider

Widget View For One Entry

  • This is the display for a single widget entry.

    See more

    Declaration

    Swift

    @MainActor
    struct NACCWidgetEntryView : View

Widget Intent Configuration

  • This controls the intent for the settings screen.

    See more

    Declaration

    Swift

    struct NACCWidgetIntent : WidgetConfigurationIntent

Widget Timeline Entry

  • This is one data entry for the widget. There will only be one, and it should reflect the current state.

    See more

    Declaration

    Swift

    struct NACC_Entry : TimelineEntry