DynamicIsland

extension DynamicIsland
  • Sets the URL to open in the containing app when the user clicks the widget. Sets MoEngage specific data from passed context and widgetId.

    Widgets support one moengageWidgetClickURL modifier in their view hierarchy. If multiple views have moengageWidgetClickURL modifiers, the behavior is undefined.

    Declaration

    Swift

    @MainActor
    @preconcurrency
    public func moengageWidgetClickURL<T: ActivityAttributes>(
        _ url: URL?, context: ActivityViewContext<MoEngageActivityAttributes<T>>, widgetId: Int,
        file: StaticString = #file, fileId: StaticString = #fileID,
        method: StaticString = #function, line: UInt = #line, column: UInt = #column
    ) -> DynamicIsland

    Return Value

    A view that opens the specified URL when the user clicks the widget.