Swift

fatbobman.com

This article will explore how to apply SwiftData’s way of thinking within Core Data, focusing on data modeling and concurrent programming.

5
0
weekly.fatbobman.com

Fatbobman's Swift Weekly #053 | Breaking the Annual Release Cycle: A New Dawn for Tech Innovation? - UserDefaults + Observation - SwiftUI Animation - Using Binaries as Libraries - Why I Stopped Building for visionOS - Arrays vs Sets - Dependency Injection in Swift - AI-Generated Unit Tests

0
0
fatbobman.com

This article will explore how to efficiently and conveniently manage data in UserDefaults under the Observation framework and propose a complete and practical solution. `ObservableDefaults` responds to changes in `UserDefaults` from any source, offering the precision of `Observation` while maintaining the flexibility of `AppStorage` in handling modifications.

7
0
weekly.fatbobman.com

Fatbobman's Swift Weekly #052 | Reflecting on the Original Aspiration: On the First Anniversary of the Weekly's Inception - Dev Conversations - VoiceOver and Voice Control - Shared With You - UIKit or SwiftUI - SwiftUI Environment

0
0
https://www.massicotte.org/non-sendable

Wrote this up in kind of hurry, but people seem to like it. Thought I’d throw it up over here.

2
0
www.emergetools.com

“Today, we're going through the many techniques in the Swift Concurrency toolkit. We'll discuss theory when it's appropriate, but for each tool we'll also provide a context where it might be the best solution.”

4
0
www.evasec.io

“E.V.A Information Security researchers uncovered several vulnerabilities in the CocoaPods dependency manager that allows any malicious actor to claim ownership over thousands of unclaimed pods and insert malicious code into many of the most popular iOS and MacOS applications. These vulnerabilities have since been patched.”

3
0
danielchasehooper.com

“The Swift compiler is notoriously slow due to how types are inferred. Every June I hope that Apple will announce that they fixed it; sadly this is not that year.”

8
1
https://www.massicotte.org/concurrency-swift-6-se-0414

Hey all! I've been writing up a series on the changes coming to Swift 6 related to concurrency. Thought I'd start sharing them here too.

6
0
blog.timac.org

“Now that iOS 17 is available, let’s analyze its built-in apps to answer a few questions: How many binaries are in iOS 17? Which programming languages are used to develop these apps? How many apps are written with Swift? What is the percentage of apps using SwiftUI versus UIKit?”

6
1
www.avanderlee.com

cross-posted from: https://programming.dev/post/3558087 > Type parameter packs and value parameter packs allow you to write a generic function that accepts an arbitrary number of arguments with distinct types. As a result of SE-393, SE-398, and SE-399, you can use this new feature from Swift 5.9.

4
0
https://useyourloaf.com/blog/swiftui-sensory-feedback/

In iOS 17, Apple added a range of sensory feedback view modifiers to SwiftUI removing the need to rely on UIKit.

4
0
www.avanderlee.com

#Predicate is a new Macro available since Swift 5.9 and Xcode 15, allowing you to filter or search a data collection. It can be seen as a replacement for the old-fashioned NSPredicate we’re used to from the Objective-C days.

6
0
github.com

An overview of the different types of charts you can make with Swift Charts

3
0
https://alwaysprocessing.blog/series/objc-internals

Get ready to dive deep into the inner workings of the Objective-C language and runtime! Each post delves into a specific aspect of the language and explores the details of its implementation. I hope you’ll find this valuable to demystify the language, tackle tricky bugs, and optimize your code for performance.

4
1

Hi, I thought we could make a list of open source Swift projects that's open to public contribution. Which is one of the most effective ways to really learn programming. We could follow this template to make it easy for readers: **Title in Bold** Short Description: Link:

5
3
www.swift.org

We’re excited to announce a new open source package called Swift HTTP Types. Building upon insights from Swift on server, app developers, and the broader Swift community, Swift HTTP Types is designed to provide a shared set of currency types for client/server HTTP operations in Swift....

4
0

So I've got the following code, which seems to work, and I'm wondering if there is a better, cleaner way to approach adding/editing elements in an array. ```swift var category: Category var idx: Int = -1 switch mode { case .add: category = Category() case .edit(let _category): category = _category idx = categoryViewModel.categories.firstIndex(of: _category) ?? idx } category.name = categoryName category.icon = "category-\(categoryIdx)" category.color = colors[colorIdx] switch mode { case .add: categoryViewModel.categories.append(category) case .edit: categoryViewModel.categories[idx] = category } ``` I understand I'm not checking `idx` to make sure it's not `-1`. I'm not concerned about that part right now. It's the overall approach I'm looking for thoughts on. Thanks!

2
1
https://betterprogramming.pub/wwdc-2023-whats-new-in-core-data-11f49a8e8dad

Although at WWDC 2023, Apple will mainly focus on introducing the new data framework SwiftData, Core Data, as the cornerstone of SwiftData, has also been enhanced to some extent.

1
0
www.avanderlee.com

MainActor is a new attribute introduced in Swift 5.5 as a global actor providing an executor which performs its tasks on the main thread. When building apps, it’s essential to perform UI updating tasks on the main thread, which can sometimes be challenging when using several background threads. Using the `@MainActor` attribute will help ensure your UI is always updated on the main thread.

2
0