Issue #449
WatchKit
does not have Web component, despite the fact that we can view web content
A workaround is to show url as QR code
import SwiftUI
struct QRCodeView: View {
let title: String
let url: URL
var body: some View {
GeometryReader { geometry in
VStack {
self.makeImage(size: geometry.size)
.padding(.top, 10)
Text("Scan to open")
.font(.system(.footnote))
}.navigationBarTitle(self.title)
}
}
private func makeImage(size: CGSize) -> some View {
let value = size.height - 30
return RemoteImage(url: self.url)
.frame(width: value, height: value, alignment: .center)
}
}