A debugging session I had while adding Core Data to the FriendFace app: build errors from re-declared NSManagedObject classes turned out to be caused by CodeGen left enabled on one of two entities, and a later class-not-found error came from stale generated files Xcode had left in its build folders. I walk through both issues and end with a note that switching CodeGen to Manual doesn’t delete files Xcode already generated there...
A debugging session traces a recurring console message in my SwiftUI app, “No wall clock alignment provided,” to the .date style when formatting dates in a Text view. I reproduce the issue with a minimal code snippet, find little documentation online beyond an old Reddit thread, and file my first Radar bug report with Apple...
A comparison of my SwiftUI solution to the FriendFace challenge (downloading and displaying user JSON) against Paul Hudson’s version from Hacking with Swift. Differences I discuss include handling user IDs, structuring preview data, loading and error handling in fetchUsers(), and UI choices such as colored circles for user status and a grouped list style for the detail view...
A write-up of my Day 60 milestone challenge in the 100 Days of SwiftUI course: I build a small app that fetches a JSON file of users, decodes it into Codable structs (including ISO-8601 dates), and displays them in a list with a detail view. I share my fetch and view code, note some friction with nested do/catch error handling, and add profile pictures via AsyncImage, deciding against implementing image caching in order to keep the challenge simple...
My #100DaysOfSwiftUI challenge post is about adding profile pictures to a Friendface app. Swift’s hashValue turns out to be non-deterministic between runs, so I write a simple string hash by hand to pick stable photo numbers. After Unsplash proves unreliable, I settle on RandomUser.me portraits and consider using the genderize.io API to match gender from names...
I take a short look at using git stash to temporarily set aside uncommitted changes and revert a directory to the last commit, then git stash pop to restore them — handy for grabbing an earlier version of code. I also briefly mention more advanced stash features like naming, multiple stashes, and viewing diffs, with a link to Atlassian’s guide...
I compare my solutions with Paul’s video for a SwiftUI challenge built around FilteredList, covering passing a predicate as a string, converting to enums, and adding sort descriptors. The enum task matched Paul’s exactly, while sort descriptors caused some struggle with NSSortDescriptors until I spotted the hint to use SortDescriptor instead...
My solutions to the three wrap-up challenges from Project 12 of the Hacking with Swift SwiftUI series, which involve a FilteredList subview whose @FetchRequest is built dynamically in its initializer. The tasks add a predicate format parameter, replace the hard-coded predicate string with an enum using raw values, and support an array of SortDescriptor objects...
Day 58 of the 100 Days of SwiftUI series covers one-to-many Core Data relationships, using constraints and merge policies to handle conflicts, and underscore syntax for accessing wrapped properties in dynamic filtering. I reflect on Core Data’s pre-SwiftUI complexity, credit Paul Hudson’s teaching style with making the difficult material manageable, and consider how much harder the same functionality would be with raw SQLite...
While following a type-along tutorial in the 100 Days of SwiftUI course, I commit the setup code once it’s working, then use git reset –hard to discard each technique’s changes before moving to the next one. I include the handful of git commands involved, suggesting this simple rollback workflow is a good first use case for anyone new to git...
I compare my SwiftUI solutions to a coding challenge series with Paul Hudson’s, finding the first two nearly identical and only minor differences on the third. I weigh hiding text with opacity to reserve space against using an if-let, and note that Hudson’s abbreviated date formatting handles locale differences my manual approach didn’t...
My solutions to the Project 11 challenges from the 100 Days of SwiftUI course, applied to Bookworm, a CoreData-based book tracking app. I add validation so books can’t be saved without a title or author, highlight one-star ratings in the book list, and add a date attribute to the Book entity that’s formatted in the detail view...
I explain SwiftUI’s @Binding property wrapper, framed by an analogy to passing pointers in C. A short code example demonstrates a parent view passing an @State variable to a subview with the $ prefix, letting the subview read and mutate the value...
My CoreData project from Day 53 of the 100 Days of SwiftUI course ran fine in the simulator but crashed in Xcode’s SwiftUI preview, which lacked a managed object context. I describe a workaround I found on the Hacking with Swift forums for supplying a context to the preview...
A comparison of my solutions to Paul Hudson’s for a SwiftUI challenge covering address validation, alerts for failed POST requests, and wrapping a struct in an observable class. I find Paul’s String extension approach to whitespace checking neater than my brute-force version, and I highlight Paul’s use of @dynamicMemberLookup with key paths to shorten chained property access like order.data.street down to order.street...
My solutions to the day 52 challenges for the Hacking with Swift Cupcake Corner app: trimming whitespace before validating the order address, showing an alert when the order submission to the API fails instead of just printing, and converting the Order class to a struct inside an ObservableObject wrapper to eliminate the manual Codable code. I present each change with Swift code snippets and links to the corresponding GitHub commits...
I reflect on what makes the 100 Days of SwiftUI course effective as a teaching resource: its true/false comprehension questions, carefully pitched difficulty, hands-on learning in context, and the instructor’s knack for anticipating how beginners think. I also praise how reliably the course content stays up to date despite the rapid pace of change in Swift and SwiftUI...
How to decode JSON in Swift when the key names don’t match your struct’s property names. I cover using a CodingKeys enum to map JSON keys to properties manually, and the simpler keyDecodingStrategy option for handling the common snake_case versus camelCase mismatch...
In this beginner-level look at Swift’s Codable protocol, I explain that it combines Encodable and Decodable and is applied automatically when a type’s properties are all Codable. I use simple code examples to demonstrate encoding a struct to JSON with JSONEncoder and decoding JSON back into a struct with JSONDecoder. I flag more involved cases, such as decoding JSON with snake_case keys, as topics for later posts...
After following along with an app tutorial, I want to collapse all the small commits made along the way into one before pushing the project to GitHub. The solution, borrowed from a Stack Overflow answer, skips rebase and squash tricks entirely: delete the .git directory, re-initialize the repository, and make a single fresh commit...