View
extension View
-
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 havemoengageWidgetClickURL
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 ) -> some View
Return Value
A view that opens the specified URL when the user clicks the widget.