Skip to content

Commit

Permalink
Add subscription to Snowplow main class
Browse files Browse the repository at this point in the history
  • Loading branch information
mscwilson committed Dec 17, 2024
1 parent 624ee44 commit c2fb780
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Sources/Snowplow/Snowplow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,11 @@ public class Snowplow: NSObject {
/// - Parameter webViewConfiguration: Configuration of the Web view to subscribe to events from
@objc
public class func subscribeToWebViewEvents(with webViewConfiguration: WKWebViewConfiguration) {
let messageHandler = WebViewMessageHandler()
let messageHandlerOld = WebViewMessageHandler()
let messageHandlerV2 = WebViewMessageHandlerV2()

webViewConfiguration.userContentController.add(messageHandler, name: "snowplow")
webViewConfiguration.userContentController.add(messageHandlerOld, name: "snowplow")
webViewConfiguration.userContentController.add(messageHandlerV2, name: "snowplow")
}

#endif
Expand Down

0 comments on commit c2fb780

Please sign in to comment.