Post

Replies

Boosts

Views

Activity

Reply to I have a bone to pick with Xcode
Try using print statements instead. In many cases, especially UI-related, breakpoint debugging simply isn't possible. There are far too many event loop iterations that happen in normal behaviour. Problem with that is always putting print or log statements all over the place, you also cannot put them on the fly as sometimes it may be hard to get into "bugged" state and then forgetting them inside or have more than 50% of whole code just print statements? No thanks. Breakpoints are there with a reason and should work. Having a framework that is undebugable is a design flaw or a major lack of tools to work with. Biggest problem is probably second one, because SwiftUI is not so new. It should be polished and have tools already. Have you tried "show callers"? That seems to be the equivalent functionality. Same functionality as find selected symbol but in popup. Still I cannot quickly see where reads or writes are done. Yeah. That was maybe the first thing I dumped when trying to use SwiftUI. Yeah good for you. I don't mind dumping something that should make our work faster. So should we just dump AI and Xcode as well and just use notepad then? Apple runs a very tight and lean ship. The teams behind the features, frameworks, and apps are much, much smaller than you might imagine. Maybe that is a problem? Apple has many more developers and apps than it needs. Maybe for now, but they are losing a grip, falling behind others. Few years ago android was total crap, but faster and faster it is overtaking iOS. Swift could be better language used on both platforms, but it seems it still lags behind.
Feb ’25
Reply to I have a bone to pick with Xcode
Compiling SwiftUI previews and getting them to work. NIGHTMARE! Why did you make our lives harder wit including Unit tests to be a part of compile solution for previews? I see no sense in that decision. Compile time for previews is like: compiling all files first, then switch to indexing, pause indexing and compile 5-10% of files, rinse and repeat with indexing for about 10-20 times before either showing preview or throwing some vague error. I do not get it. first make SwiftUI framework, and then neglect all tools to make it easier and faster to use? I would understand some company with budget problems, but Apple??? How hard and expensive it has to be? Why did IntelliJ managed to make better IDE in less time and even make it more expandable with extensions? Sure Xcode has "extensions", but nothing comes close to AppCode or VSC (Cursor). Come on Apple, get your s**t together for once and instead of making some new features or frameworks, start working on tools for developers. With better tools you will get more developers and with that more apps. Sorry for some foul words and my English, but I had to rant somewhere. I know you have many capable engineers, but looks like priorities are totally backward at the moment. Fix Xcode first, then add new features please. MXGA - make Xcode great again.
Feb ’25
Reply to I have a bone to pick with Xcode
AI tools. If you would like to compete with other AI tools, we will need much more than just some half broken autocomplete functionality. More than 50% of suggestions are wrong. Also model needs to be updated with new Swift features like concurrency. Memory usage. I have 64GB of RAM and sometimes it seems it is not enough. Visual debugger is eating memory like peanuts, whole debugger is slow even when using simulator (it should just read from memory?) and it seems like RAM is always an issue with Xcode. Speed, even when using M1 Max MBP, it is still very slow in some cases. Like mentioned, debuggers are very slow, it is always indexing something, and compiling SwiftUI previews... that one deserves special point.
Feb ’25
Reply to I have a bone to pick with Xcode
Visual debugger: debugging SwiftUI with visual debugger is in 90% useless task and waste of time. There should be some jump to view button to quickly find View that is inspected. More information about view in right pane would be more helpful. Not to mention that opening visual debugger multiple times hogs up whole RAM on mac This could be very powerful tool, but currently it is just a feature we avoid to use and to keep sanity. Also it is very slow.
Feb ’25
Reply to I have a bone to pick with Xcode
Editor options: AppCode, VSC have much better visual aids for easier readability of code. Cursor has even colored matching brackets, vertical guides with extensions... in Xcode I have to do mental gymnastics all the time to find proper starting or ending bracket. God forbid I have something than spans out of monitor height... A nice touch is also some IDEs write out in grey a type of parameters or values so I don'e need to always alt+click everywhere. Below is example of nice little helpers, make code much easier and faster to read
Feb ’25
Reply to Cast Any to Sendable
For example there is a method func centralManager(_ cbCentralManager: CBCentralManager, didDiscover cbPeripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber) from CBCentralManagerDelegate In our project we send advertisement data forward as we need it in the app to check if device is correct and to verify ids so that we will connect to right device. I made a Sendable structure for storing scan data: public let peripheral: Peripheral /// A dictionary containing any advertisement and scan response data. public let advertisementData: [String : Any] /// The current RSSI of the peripheral, in dBm. A value of 127 is reserved and indicates the RSSI /// was not available. public let rssi: NSNumber } and I get warning: Stored property 'advertisementData' of 'Sendable'-conforming struct 'ScanData' has non-sendable type '[String : Any]'; this is an error in the Swift 6 language mode So what to do here? We want to make our projects Swift6 ready and also have strict concurrency, but default API we have are making this impossible on some parts. Second example is usage of NSPRedicate in HKAnchoredObjectQuery initializer. It is not sendable, which also throws warning for Swift6.
Topic: Programming Languages SubTopic: Swift Tags:
Nov ’24
Reply to Cannot remove SCM
Managed to finally solve this issue with adding one "dummy" repository from github and then access the settings in "User and access" section. The only question now remains is how to use one git source for 2 projects (one is on different company, one is for staging builds, the other one is for production)?
Oct ’23
Reply to Cannot remove SCM
Still a problem for me, I get Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method. in our gitlab. We also tried this [https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/3947#note_155251805) workaround, but nothing works.
Feb ’23