Hi,How would I go about using the standard WebKit delegates in SwiftUI, such as:func webView(_ webView: WKWebView, didCommit navigation: WKNavigation!)
{
activityView?.startAnimating()
self.title = "Loading...."
}Here's what I have so far:import SwiftUI
import UIKit
import Foundation
import WebKit
struct Support: View {
var body: some View {
NavigationView {
VStack {
WebView(request: URLRequest(url: URL(string: "https://www.connectingpeoplesoftware.com/iossupport")!))
}.navigationBarTitle(Text("Support"))
}
}
struct WebView: UIViewRepresentable
{
let request: URLRequest
func makeUIView(context: Context) -> WKWebView
{
return WKWebView()
}
func updateUIView(_ uiView: WKWebView, context: Context)
{
uiView.load(request)
}
}
struct Support_Previews: PreviewProvider {
static var previews: some View {
Support()
}
}
}Thanks in advance,Dan
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I am unable to install the above beta on an 2018 iPad Pro. Downloaded directly from this web site.Any ideas?Dan Uff
Hi,
The launchscreen section in Xcode 16 RC keeps disappearing no matter what. Is anyone else seeing this issue?
I submitted a bug report over a week ago about this problem.
Dan Uff
Hi,
I've been running Xcode 26 beta ever since Beta 1 and haven't had rebooting problems. Now with Xcode beta (Version 26.0 beta 4 (17A5285i)) I'll be working on a project when the system (Mac mini 2025) suddenly reboots itself. This has been going on since beta 3. I am also running MacOS 26.0 Beta (25A5316i). I have filed a bug report.
Is anyone else having this problem?
Thanks,
Dan Uff
I am using Xcode 16 and am doing a future app with SwiftData.
I have the data in a List. When I try to delete a row, it deletes and seems to save the deletion. But when I list the data again, what I deleted comes back.
Here's the code:
{
for index in indexSet {
let chat = chatLog[index]
modelContext.delete(chat)
// do {
// try modelContext.save()
//
// } catch {
//
// print("Error saving: \(error)")
//
// }
}
}
CHAT: Is a variable to hold the data.
CHATLOG: The variable in the List.
Thank you.
Dan Uff
Hi,
I am receiving the above error after trying to upload it to the App Store.
I would know what to do IF Xcode would provide WHICH file is corrupt.
The error reads:
ITMS-90013: Corrupt Image File - The image file $[IconName] appears to be corrupt.
Again, I would know what to do if I had more information about which file(s) to fix.
Could anyone FROM APPLE help me or give me a hint?
Thanks,
Dan Uff
Hi all,
I have WeatherKit working on iOS and watchOS, but am having problems getting it to work on macOS. I have all entitlements enabled and everything seems to checkout, but I get the following error:
"WARNING: error = 3→(76) INVALID_PERSONA; It is undefined behavior to look up a container with a persona other than personal or data separated. Please adopt a persona first. Assuming personal. given persona = (<MCMUserIdentity: 0xb3d0288c0; posixUser = (501|20|danuff|/Users/danuff), identifier = 501, personaType = unspecific, personaUniqueString = E90578C5-AAE4-44DD-9E41-CC3F97B34F0C, kernelPersonaID = 1001>)
Message from debugger: killed
Any ideas?
Hi,
I have a toolbar and a share button on the left side. The button isn't showing up on the canvas, but does show when the app is run in the simulator or a device. Is this normal behavior or a bug? This is a test button so please forgive the print statement.
Here's the code:
{
ToolbarItem(placement: .bottomBar)
{
Button(action: {
print ("Button Pressed!")
}
){
Image(systemName: "square.and.arrow.up")
}
}
}
Hi,
I am looking for opinions on the best way to handle a problem I'm having.
My client wants his app to show a list of math tables, such as 1+1 = 2, 2+2 = 4, and so on. I have a list view with said tables in an array, which I manually have to input in. He wants the list to go from 1 to 20.
I'd assume that I would need some sort of for....next loop, but how would I show that in a list?
Thanks for any help you can give.
This is what I have so far:
import SwiftUI
import UIKit
struct ATables: View {
var tables = ["Temporary","1 + 1 = 2","2 + 2 = 4"]
var body: some View {
NavigationView {
List {
ForEach(self.tables, id: \.self) { show in
HStack {
Image(systemName: "arrow.right")
.resizable()
.frame(width: 30, height: 20, alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/)
Text(show)
.font(.custom("Chalkboard", size: 50))
}
}
}.navigationBarTitle(Text("Addition Tables (1 - 20)"))
.navigationBarTitleDisplayMode(.inline)
}
}
struct ATables_Previews: PreviewProvider {
static var previews: some View {
ATables()
}
}
}
Hi,
I'm trying to make a small text editor. Everything works except I need the background a different color.
But the standard way to do it with 'ZStack' doesn't work? Any ideas?
Thanks!
ZStack {
Color.green
.ignoresSafeArea()
NavigationView {
TextEditor(text: $text)
.background(Color.clear)
.navigationTitle("Notepad Test!")
}
}
}
Hi,
I have several iOS apps in the App Store. I have been asked to provide a Mac app for some of them, which I am willing to do.
Should I add the Mac app to an existing iOS app (i.e. a new target) or make a separate app just for the Mac, even though the information inside the app would be the same?
Thanks,
Dan Uff
Hi,
I am writing this to WARN other developers about a problem that I have run into with Xcode 13.3 (13e113).
Ever since downloading this version, I have noticed that my apps have bloated in size. From 23mb to 55mb and above. After an investigation, I noticed that Xcode was duplicating project and other files. Such as [nameofproject] [nameofproject2], etc. Because of this, not only did my project get bloated, but when I try to delete some of the duplicate files (yes, I know what to delete and what NOT too) this would then allow Xcode to delete even MORE FILES each time I went into the project. There is nothing worse then going into a project that you've worked MONTHS on and seeing RED FILES inside the project (red files means not there).
So, I keep backups of all my apps. Restoring these backups cause the same problems.
This is a notice to all developers -> CHECK YOUR PROJECT FILES FROM THE FINDER so you don't experience this problem.
I would HOPE someone from Apple will see AND READ this and maybe even CONTACT ME so I can make DAMN sure this never happens again.
Thank you,
Dan Uff
Could someone help me find the example code for WeatherKit that is associated with the video? Thanks.
Hi,
Will the Apple Weather framework work on Mac using SwiftUI? The documentation doesn't say MacOS.
Thanks,
Dan Uff
Hi, I am receiving the above error after trying to upload it to the App Store.
I would know what to do IF Xcode would provide WHICH file is corrupt.
The error reads:
ITMS-90013: Corrupt Image File - The image file $[IconName] appears to be corrupt.
Again, I would know what to do if I had more information about which file(s) to fix.
Could anyone FROM APPLE help me or give me a hint?
Thanks, Dan Uff