SwiftUI WebView Tutorial
Вставка
- Опубліковано 22 сер 2024
- Learn how to use a WebView in your SwiftUI project to display a webpage!
In this SwiftUI WebView tutorial, we’ll cover:
A basic usage example
How to use UIKit components in a SwiftUI project
How to dynamically load a url
👋 Our "Launch Your First App" program will help you build up your iOS skills to publish your very own feature rich app even if you’re a beginner starting from scratch. cwc.to/youtube...
Download sample code for all SwiftUI components here:
cwc.to/swiftui...
Article version of this tutorial:
codewithchris....
For tutorials of other SwiftUI components, check out our playlist here:
• SwiftUI Components
👋 Our "Launch Your First App" program will help you build up your iOS skills to publish your very own feature rich app even if you’re a beginner starting from scratch. cwc.to/youtubeoffer
Got excited for a moment there
Ah, sorry i know what you mean but everyone searches for "SwiftUI WebView" and so that's what I have to optimize the title for. I hope they make it easier for us in the future!
Oh totally all good on the title! I hope so, too!
This is a good start, but none of the JavaScript UI will work like alerts and confirmations. If you need support for these, the WKUIDelegate protocol will need to be implemented.
Ah! Thank you for that reminder. I didn't know that!
Hopefully we get some new SwiftUI features come WWDC.
I'm hoping too.. it's soon!
App crashes, asks for entitlements. Any clue? thanks
Can I upload webview app in app store?
Maybe someone else with that experience can comment but my feeling is if the webview is a significant part of the app, then it won't pass.
@@CodeWithChris okay
I use the platform called Plutio to run my photography business. It handles my invoices, etc. The macOS and iOS app is just the web app inside some sort of WebView window... so I wouldn't be surprised this is what they did.
@AdrienVillez
@@CodeWithChris thank you for give me a clarification brother
Can this also used to get data from API which returns a json?
No, this only shows how to add a webview to a SwiftUI view and load a web page. You’ll need to use `URLSession` instead. - Iñaki
@@CodeWithChris Thanks Chris! I am trying to find an easy way to use some existed APIs built in PHP (to get data from mysql DBs), but as I beginner in swift, I am still learning the basics! :-)
How to use WKWebView Delegate methods?
Hi there, we've got a community of learners over at cwc.to/codecrew. I highly recommend joining and reaching out for assistance, especially for any concepts you're finding challenging to grasp. - Iñaki