Fatbobman (东坡肘子)
banner
fatbobman.com
Fatbobman (东坡肘子)
@fatbobman.com
Swift & SwiftUI enthusiast | Tech blogger

Blog: http://fatbobman.com
Newsletter: http://weekly.fatbobman.com

@fatbobman at X
@fatbobman@mastodon.social
https://www.linkedin.com/in/fatbobman/
To debug Core Data code in VSCode/Cursor, you only need to do two things:

- use Xcode's Swift toolchain
- after the first time or after adjusting the model, use a script to compile xcdatamodeld into momd and place it in the correct build directory
fatbobman.com/en/snippet/...
November 5, 2025 at 12:43 PM
manage application configurations in one place with ObservableCloud Macros. whether it's UserDefaults or NSUbiquitousKeyValueStore, views automatically respond to configuration changes. Supports Codable and RawRepresentable.
github.com/fatbobman/O...
November 4, 2025 at 12:23 PM
`@GestureState` ensures seamless gesture tracking by automatically resetting after a gesture concludes. It restores your state even after interruptions, unlike State, which can't.
fatbobman.com/en/snippet/...
November 2, 2025 at 1:36 PM
Core Data provides four methods for data changes, but SwiftData offers only two and requires iOS 18+, limiting its flexibility.

fatbobman.com/en/posts/ma...
October 31, 2025 at 1:35 PM
With SwiftUI's current limitations on adding complex auxiliary views to the system keyboard, safeAreaInset emerges as a smart solution for creating a bottom input box like IM apps.
fatbobman.com/en/posts/sa...
October 23, 2025 at 2:23 PM
July 9, 2025 at 11:33 PM
SwiftData has implemented the == operator for CompositeAttribute. However, strangely, when constructing predicates, you cannot directly compare the whole; you can only compare individual attributes. It's unclear whether this is by design or a bug.
June 10, 2025 at 4:16 AM
Tipkit now allows the creation of more complex rules. Multiple rules can be linked using and (conjunction) or or (disjunction).
June 10, 2025 at 4:02 AM
Another improvement in SwiftData. Codable type properties can now be used as filter criteria for building predicates.
June 10, 2025 at 3:43 AM
in xcode 26, newly created projects have their default actor isolation set to MainActor, which means all types declared in the project will implicitly have `MainActor` added. it seems there should be an option to add this choice when creating the project.
June 10, 2025 at 1:48 AM
TabularBuilder makes converting any swift object to a tabulardata dataframe has never been easier!

- declarative syntax in the style of swiftui
- type-safe data mapping
- efficient dataframe creation
- supports conditional mapping and transformation

github.com/fatbobman/T...
June 6, 2025 at 12:47 PM
Leverage ObservableCloud macros to simplify your NSUbiquitousKeyValueStore (iCloud Key-Value Storage) operations in SwiftUI—effortless as sipping water! 💪💻💧
github.com/fatbobman/O...
June 5, 2025 at 12:48 PM
combine GeometryReader, hidden, and id to dynamically tweak the sheet's presentationDetents by view height, creating a more adaptable layout.
fatbobman.com/en/posts/in...
May 15, 2025 at 12:48 PM
parameterized testing in Swift is a game-changer, slashing repetitive tests while boosting test coverage. It lets developers cover more ground with less code, tackling a wider array of use cases seamlessly.
fatbobman.com/en/posts/ma...
May 13, 2025 at 1:13 PM
Swift's `package` access control limits API access to the same package, avoiding unnecessary `public` exposure. It's useful in modular setups to share implementations across targets while enhancing encapsulation and security.
fatbobman.com/en/snippet/...
May 8, 2025 at 12:51 PM
Swift Charts offers dynamic APIs for data binning: NumberBins and DateBins. Even if chart building isn't your goal, these APIs effortlessly deliver efficient and stable data binning, ready to be applied across various scenarios.
fatbobman.com/en/posts/ma...
May 3, 2025 at 2:02 PM
ObservableDefaults Now Embraces Codable Magic
Thanks to `jmisol`, ObservableDefaults now effortlessly handles `Codable` properties via the `CodableUserDefaultsPropertyListValue` protocol. Seamlessly store and retrieve complex data types with UserDefaults.
github.com/fatbobman/O...
May 2, 2025 at 12:19 PM
`@GestureState` ensures seamless gesture tracking by automatically resetting after a gesture concludes. It restores your state even after interruptions, unlike State, which can't.
fatbobman.com/en/snippet/...
April 28, 2025 at 1:47 PM
No Need to Set Primary Key in Core Data/SwiftData
Core Data and SwiftData take the hassle out of managing primary keys by leveraging SQLite’s Z_PK (auto-increment), Z_ENT (entity type), and Z_PRIMARYKEY (key tracking).
fatbobman.com/en/snippet/...
fatbobman.com/en/posts/ta...
April 24, 2025 at 1:10 PM
To easily test Core Data code in VSCode/Cursor, just do the following:

🔧 ensure the appropriate Swift toolchain is used
🔄 convert xcdatamodeld to momd with a script after model changes

for more details, click: fatbobman.com/en/snippet/...
April 15, 2025 at 12:28 PM
With iOS 16, Image rolls out a fresh constructor, letting developers craft and generate images directly on GraphicsContext. Break free from the confines of environments like TabBar; image customization just got a whole lot easier!
fatbobman.com/en/posts/ho...
April 11, 2025 at 12:48 PM
NavigationStack and NavigationSplitView boost SwiftUI navigation by offering greater customization and improved support for reactive programming. However, they introduce new hurdles when it comes to efficiently organizing navigation states.
fatbobman.com/zh/posts/ne...
April 10, 2025 at 1:16 PM
In TipKit, the framework boosts flexibility by saving display conditions by id instead of by Tip type name. This design lets you reuse Tip declarations effortlessly—just swap the id. It's perfect for generating countless similar tips for dynamic data.
fatbobman.com/en/posts/ma...
April 8, 2025 at 12:48 PM
apply textContentType to a TextField, and watch the system smartly offer spot-on suggestions as users type in details like email, password, phone number, or verification code, boosting both input speed and security
fatbobman.com/en/posts/te...
April 7, 2025 at 1:50 PM
In SwiftUI, `scrollClipDisable` determines if scrolling content fits the container's boundaries. False clips the content; true allows it to extend beyond.
fatbobman.com/en/posts/ne...
April 4, 2025 at 1:31 PM