Post

Replies

Boosts

Views

Activity

Reply to 500 Error
😉 Hello Houston, we have a problem 😉 Do you know you can edit your post in the first hour after publication and change everything, including title. You cannot suppress it but editing is usually enough. Have a good day.
Aug ’25
Reply to Seeing some behaviour in Swift that I don't understand...
This suggests to me that my Sunday and Monday static instances are being passed by reference No, that's not the problem. But this way of adding a new trigger is causing the problem. fetchTriggers.append(Int.random(in: 1..<3) == 1 ? .sunMorning : .monEvening) This adds a new item. By it adds the same Sunday or Monday, with its existing ID. So, you reuse the same struct. Change to this to solve: Button("New Trigger") { let newTrigger = Int.random(in: 1..<3) == 1 ? FetchTrigger(dayOfWeek: .sunday, hour: 3) : FetchTrigger(dayOfWeek: .monday, hour: 6) fetchTriggers.append(newTrigger) // fetchTriggers.append(Int.random(in: 1..<3) == 1 ? .sunMorning : .monEvening) } You can also create a new ID: struct FetchTrigger: Identifiable { static var monEvening: FetchTrigger = .init(dayOfWeek: .monday, hour: 6) static var sunMorning: FetchTrigger = .init(dayOfWeek: .sunday, hour: 3) var id = UUID() // all need to be var mutating func changedId() -> FetchTrigger { self.id = UUID() return self } and call: fetchTriggers.append(Int.random(in: 1..<3) == 1 ? .sunMorning.changedId() : .monEvening.changedId())
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’25
Reply to Color folder and tags
For your needs may be… So you will not use tags anymore. But I just imagine the comments if tags had been suppressed. In addition you can have multiple tags, don't know if you can have multi colors.
Topic: Design SubTopic: General
Aug ’25
Reply to Learn to code / beginner
Welcome to the forum. A first comment: edit your text to make each question clear and post easier to read. And avoid asking so many questions on so different topics. Anyway, I'll try to provide some answers. Q1: How should I best start learning? For example, is Swift Playgrounds the right first step? My personal advice: start with tutorials from Apple like 'Develop in Swift fundamentals'. Or go and visit https://developer.apple.com/pathways/. If you want to learn SwiftUI, select it. Q2: How should I continue afterwards to gain further knowledge, possibly in areas like system architecture, cybersecurity, or cloud computing (even though I don’t want to commit too early to one direction)? You will find resources here again: https://developer.apple.com/pathways/. My advice to continue, after step 1, is to imagine and develop a complete (yet simple) app. That's how you will put what you learned in practice. And then, each time you fall on a problem, ask the forum for help. Q3: Can you recommend a learning schedule or intensity (e.g., how often per day or week I should practice) for someone who works full-time? It depends on the goals you have. But usually, when you learn developing, it is not uncommon to spend several hours some days. I would say, 10 hours a week to be a minimum. Q4: Is my current MacBook Air (2020, Intel i3, 8 GB RAM, 250 GB SSD) still suitable for learning and beginner development, or would you recommend upgrading to a newer model? Essentially, no, unless you just want to wet your feet. The storage (250 GB) will be insufficient. 500 GB or better 1TB is needed. Same for RAM, I would avise 16 GB at least. More critical, MacOS 26 (available as beta, to be released in a few weeks) will not run on Intel based machines. So it will be obsolete very rapidly. Q5: On top of that, my English is not perfect yet – is it possible to improve it alongside learning coding? That's a different question. To code, that's not a problem. But if you want to take profit of all existing resources (e.g., forum) that may be an issue, even though automatic translation is better everyday. Coding is not the best way to learn, because it is very limited in focus. Q6: I’m very motivated to finally start this journey, even though I once turned down an IBM apprenticeship when I was younger. That's a good condition, so good luck.
Aug ’25
Reply to Output is stuck on String
First a question. What do you mean with: xoutput: () = self.xaxis.text = String(data.acceleration.x) Which type do you expect for xoutput ? Secondly, you redeclare xoutput. that's an error. var xoutput = xoutput * 9.81 Why not simply: var output = String(data.acceleration.x * 9.81) An advice, seeing some of your posts. You should probably spend some time to learn Swift and app development from Apple's tutorials. For instance, Develop in Swift fundamentals (in Apple Library).
Aug ’25