I do have an Identity type that's somewhat like EmptyView in SwiftUI.
Maybe the question is misguided and the actual problem is not that I should check whether the block is a no-op, but instead not perform effects in evaluation of blocks. 🤔
Adding a new SwiftData Model to my app makes it crash hard without any noticeable error message when trying to create an object with it. It's so frustrating. I don't know why.
Are there any users of Adwaita-Swift by @david_swift? I'd like to chat a bit about the what the developer experience is like using those bindings. Feel free to DM me on Matrix!
Folks, have you had any success in merging the new Strings catalog in Xcode 15?
A nice contributor translated Cork into Spanish. Unfortunately, they didn’t use the correct branch. The main branch had a few changes to the Strings catalog.
I tested the advice that marking classes in #swift as final improves build times. I generated 2 swift files that each have 1000 (trivial) classes: one with each marked as final, the other without. I built each file 10 times, recording the build time for that file.
Marking classes as final does improve build times. By about 7%. The difference is just outside 1 standard deviation, so I think it’s statistically significant. But I’m not a trained statistician.
Tomorrow @mikaelacaron and I record the next @swiftovercoffee episode and we want your views for our open ballot! We're celebrating Swift turning 10, so tell us: how did it impact your life? Did it get you jobs? Did it help you go indie? Did it give you lots of fun? Tell us! 👇
When you isolate a function that causes problems and can’t deduce the problem, rewrite the function differently. At least you’ll have different problems.
App Review rejected my macOS menu bar app, Done, because the “app menu is missing the required Quit option.“
However, the app allows a quit operation by right clicking the menu bar app icon and choosing quit. Do menu bar apps usually support other methods to quit? Is it possible they didn’t try this?
If you are looking for a weather app that is simple and does not track your location, try Ducky Weather! One thing I have found in our research group is that the most popular free weather applications send your location to trackers and I wanted to create an app that does not do that. Because it uses NWS data, it is only available in the US.
More features to come but suggestions are welcome!
If I want to use String(localized:) to localize a variable, is this the best way? I can’t put it in directly like I used to with NSLocalizedString. In this case, the variable comes from Core Data, otherwise I could probably declare it directly as LocalizedStringResource. #Swift#SwiftUI#UIKit#Localization
While implementing the package previews, I ran across one state that Cork didn't have covered yet: when an app is already installed outside of Homebrew, and you try to install the Homebrew version.
Instead of getting stuck, you now get this status.
Today, I merged the basic support for Shortcuts into mainline Cork. After that, I decided to take on another challenge
I thought it would be cool to be able to see detailed info about a package before you install it. This feature actually used to be in Cork back in 2022! But I had to remove it… until now!