I just published a post on how to use convertFromSnakeCase strategy in JSONDecoder to automatically map JSON snake case keys to Swift camel case properties. This approach can keep our Swift code clean and consistent, simplifying model definitions: https://nilcoalescing.com/blog/AutoConvertJsonSnakeCaseToSwiftCamelCaseProperties/
I have a question for the Swift experts that know widgets:
Would this refresh the widget once a day? Please ignore any weird stylistic choices, I just wanted to quickly scrape something together and beautify it later once I know it actually works 😂
I adjusted the design a little to make the text easier to see, as well as adding a larger size
It’s still awkward and painful to code the widgets 😅 Especially because the simulator lags my MacBook so bad it takes a second for any key to register, and autocompletion is a distant memory
After an 8-year break from web development, I evaluated modern tech stacks to build my personal projects in 2024. This post chronicles my journey in selecting the perfect combination of backend, frontend, database, and hosting.
I sometimes wonder how things would've looked on #Bluesky if the first beta had been ready just 6 months earlier, if all those people who left Twitter for Mastodon could have gone there…
I've just checked the hashtag feed for #swiftlang and apparently there were 19 posts in total… (and 9 of those from me) 😕
@pshadov … you know what… I haven't actually checked, because I assumed it would be just Taylor Swift, but there's actually quite a lot of relevant posts on #swift apparently 😄
Sorting data by multiple criteria can be complex, but Swift's built-in tuple comparison feature simplifies the process. Using tuple comparison, we can efficiently sort and organize data by various fields. Check out my new post to learn how: https://nilcoalescing.com/blog/MultiCriteriaDataSortingWithTuples
Check out the talk I had to cancel at #DeepDishSwift There might be a nugget here that would surprise you. Check out the links in the description to go directly to a specific #Swift or #SwiftUI nugget
Does anyone know of a tool that analyses Xcode projects and then provides me with statistics on lines of code etc.? In any case, it should also take into account Swift packages used.
Thanks to @dimitribouniol and @glacials, we're much closer to the next Cork release! I was finally able to implement the first version of a self-compiled check, which was the only requirement left for the next release.
As promised, both Dimitri and Ben will be getting either a free Cork license or the cash equivalent, as well as a special shoutout in the contributors sections once the feature is fully implemented.
“To use for await item in streamOfItems {...}, you need an AsyncStream. It is very common that you already have an existing Combine publisher, and you want to use the nice Swift Concurrency syntax.”
I wish I understood why #swift and #iOS development has such a strong pull on me. I'm many months removed from the last time I worked on stuff, but I think about diving back in to learning Swift at least once a day.
Load sRGB image with alpha (see bottom “shadow” image with rounded-corners in SwiftUI preview)
Use CoreImage to composite over white
Get smaller, more “pointy” version
Cause: auto-conversion from sRGB to linear sRGB inside CoreImage is not happening, but the nodes are in the tree. Changing CIContext workingColorSpace to NSNull or non-linear sRGB “fixes” it — but can’t be used for correct compositing results. 🤯? #ios#swift#coreimage
All the tips in the book are focused on Swift and Swift Standard Library, so they can be applied to any platform, from iOS and macOS to Swift on the server.