Post

Replies

Boosts

Views

Activity

Reply to how to use swift
What do you want to learn ? the language itself ? How to develop an app ? There are many (free) tutorials available from Apple: all references (a lot) here. https://developer.apple.com/pathways/ to learn Swift: you can search in Apple Library: App development with Swift To develop app: Intro to app development with Swift To use SwiftUI to develop app (in Swift): https://developer.apple.com/tutorials/app-dev-training/getting-started-with-scrumdinger Good learning.
Aug ’24
Reply to is it true that xcode 15 apps won't compile in xcode 16?
NO. I have several apps that were developed in various versions of Xcode. And compiled on Xcode 15, they compile without issue on Xcode 16. What could happen is that you get some warnings that some API will be obsoleted. But that's something very common that any serious developer knows how to solve easily. So your developer may be trying to fool you, just to ask for some extra cost or it did something really weird in its code. My advice: Ask him/her to send you a screenshot with the error and the involved code when trying to compile on Xcode 16. And post it on the forum.
Aug ’24
Reply to Cannot clear TextField when typing in a new value
Your explanations are a bit hard to follow… I cannot understand how all the objects relate to each others. What happens ? When you have 6 in Reps and type a 7 you get 67 ? Is that it ? Where do you expect the TextField to be cleared? Did you try to do it here, with onTap ? VStack(alignment: .leading) { Text("Reps") .foregroundStyle(.gray) .font(.subheadline) TextField("\(set.reps)", value: $set.reps,formatter:Formatter.valueFormatter) .keyboardType(.decimalPad) .onTapGesture { set.reps = 0 } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’24
Reply to Performance of SwiftUI List
Could you show the exact code of LogDetail(log:) To check if it is the issue, test with the following change: 1og in NavigationLink(destination: Text("same destination")) I found this article that shows the problem is common with large listes: https://fatbobman.com/en/posts/optimize_the_response_efficiency_of_list/ Hope you will find solution in it.
Topic: UI Frameworks SubTopic: SwiftUI
Aug ’24
Reply to swift: documentation for proper import name?
If you search for Notifications in the doc, you will get a suggested reference with a link to User notifications. Other items in the list point to 2 frameworks: import UserNotifications import UserNotificationsUI It may not be necessary to import. Do you get an error message ? If so, you may have to declare the class as conforming to UNUserNotificationCenterDelegate You can file a bug report against documentation.
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’24
Reply to how to use swift
What do you want to learn ? the language itself ? How to develop an app ? There are many (free) tutorials available from Apple: all references (a lot) here. https://developer.apple.com/pathways/ to learn Swift: you can search in Apple Library: App development with Swift To develop app: Intro to app development with Swift To use SwiftUI to develop app (in Swift): https://developer.apple.com/tutorials/app-dev-training/getting-started-with-scrumdinger Good learning.
Replies
Boosts
Views
Activity
Aug ’24
Reply to is it true that xcode 15 apps won't compile in xcode 16?
NO. I have several apps that were developed in various versions of Xcode. And compiled on Xcode 15, they compile without issue on Xcode 16. What could happen is that you get some warnings that some API will be obsoleted. But that's something very common that any serious developer knows how to solve easily. So your developer may be trying to fool you, just to ask for some extra cost or it did something really weird in its code. My advice: Ask him/her to send you a screenshot with the error and the involved code when trying to compile on Xcode 16. And post it on the forum.
Replies
Boosts
Views
Activity
Aug ’24
Reply to Cannot clear TextField when typing in a new value
Your explanations are a bit hard to follow… I cannot understand how all the objects relate to each others. What happens ? When you have 6 in Reps and type a 7 you get 67 ? Is that it ? Where do you expect the TextField to be cleared? Did you try to do it here, with onTap ? VStack(alignment: .leading) { Text("Reps") .foregroundStyle(.gray) .font(.subheadline) TextField("\(set.reps)", value: $set.reps,formatter:Formatter.valueFormatter) .keyboardType(.decimalPad) .onTapGesture { set.reps = 0 } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’24
Reply to Battery health issue
Welcome to the forum. But that's not a question for this forum, which is intended to help developers in their apps development. You'd better post on the official support community: https://discussions.apple.com/welcome
Replies
Boosts
Views
Activity
Aug ’24
Reply to Performance of SwiftUI List
Could you show the exact code of LogDetail(log:) To check if it is the issue, test with the following change: 1og in NavigationLink(destination: Text("same destination")) I found this article that shows the problem is common with large listes: https://fatbobman.com/en/posts/optimize_the_response_efficiency_of_list/ Hope you will find solution in it.
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Aug ’24
Reply to swift: documentation for proper import name?
If you search for Notifications in the doc, you will get a suggested reference with a link to User notifications. Other items in the list point to 2 frameworks: import UserNotifications import UserNotificationsUI It may not be necessary to import. Do you get an error message ? If so, you may have to declare the class as conforming to UNUserNotificationCenterDelegate You can file a bug report against documentation.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’24
Reply to .onAppear print not working
I tested your code on simulator in Xcode 16.0ß2 and it works correctly (test is printed). Have you checked that the console is visible. Check the lower right icons in Xcode which should be like this:
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’24