현재 Xcode 26 beta 2에서는 Observations API가 unavailable 상태라 WebPage의 currentNavigationEvent 변경사항을 감지하기 어려운데, Observations 없이 감지할 방법이 있을까?
Asked on 2025-07-05
1 search
현재 Xcode 26 beta 2에서 Observations API가 사용 불가능한 상태라면, WebPage의 currentNavigationEvent
변경사항을 감지하기 위해 다른 방법을 사용할 수 있습니다.
Meet WebKit for SwiftUI
세션에서는 Observations API를 사용하여 currentNavigationEvent
를 비동기 시퀀스로 변환하고 각 변경 사항을 관찰하는 방법을 설명합니다. 하지만 Observations API를 사용할 수 없는 경우, JavaScript를 사용하여 페이지와 직접 통신하는 방법을 고려할 수 있습니다. JavaScript를 호출하여 페이지의 특정 정보를 가져오거나 변경 사항을 감지할 수 있습니다. 이 방법은 SwiftUI와 잘 통합되어 있으며, 페이지의 HTML을 사용하여 필요한 정보를 얻을 수 있습니다.
자세한 내용은 Meet WebKit for SwiftUI 세션을 참고하세요.

Meet WebKit for SwiftUI
Discover how you can use WebKit to effortlessly integrate web content into your SwiftUI apps. Learn how to load and display web content, communicate with webpages, and more.

What’s new in UIKit
Modernize your app with the latest APIs in UIKit, including enhanced menu bar support, automatic observation tracking, a new UI update method, and improvements to animations. We’ll also cover how you can include SwiftUI scenes in your UIKit app and explore SF Symbols, HDR color pickers, and more.

Platforms State of the Union
Discover the newest advancements on Apple platforms.