I’ve spent the last 8 months building a SwiftUI like engine that renders in the terminal. Today, I think it’s time for a reveal. Let me introduce you to SwiftTUI. Startup Like every project, it comes to the import part. You can start by creating a macOS executable target and add SwiftTUI as a dependency. Just like you would expect in SwiftUI, the entry point of your program is the App protocol. It…
There’s a fascinating behavior in SwiftUI with the Layout protocol. A Layout is not a View . When you create a Layout , you size and place views, but you don’t declare a body . And yet, it’s perfectly possible to use an instance of a Layout directly within the view hierarchy. struct MyVStack : Layout { func sizeThatFits ( proposal : ProposedViewSize, subviews : Subviews, cache : inout () ) ->…
With SwiftUI, it's possible to create your own alignment. Here's one that positions itself vertically at a third of a view's height. extension VerticalAlignment { public static let third = VerticalAlignment (ThirdAlignmentId. self ) enum ThirdAlignmentId : AlignmentID { static func defaultValue ( in context: ViewDimensions) -> CGFloat { context.height / 3 } } } You can then use our alignment with…
The first feedback on NetworkKit has been encouraging! The repo currently has 34 stars. A number that grows each week. I've also received some feedback that helped me think about version 1.2.0, available today! Response typing Until now, the response type was inferred by the type of the variable declared at the time of perform . // Compiles with the type let users: Response<[Users]> = try await…
I've never been able to find a network framework that's simple to use for both small projects and large projects that grow quickly. Some like URLSession and Alamofire are low-level and always require setting up an architecture around them. Others like Moya have attempted more user-friendly approaches, but struggle to organize cleanly in larger projects. With the arrival of macros in Swift, clever…
Years of building apps have taught me to create reusable components to prototype and build faster. One thing that keeps coming back: handling state when fetching asynchronous data. Three screens you see all the time. After some experimentation, I landed on this data structure: @MainActor @Observable final class DataState < T > { enum State { case loading case loaded (T) case error ( Error ) } var…
So I needed to manage states in my app once again. I decided it was time to finally address this issue properly and create a package that I could reuse whenever I wanted. As always, it all starts with simple experiments. I analyze the problems and try to push the solution to its extreme in order to achieve the best possible syntax. Requirements States that are independent and can lead to other…
I’ve started developing Storma 2.0, and my to-do list is packed! Here are some of the features I’m hoping to deliver: A better iPad experience. Mac and Apple Watch versions. Optimized map performance. The ability to look back in time and track storm paths. Customizable alert radius settings. Creating a Mac version means improving the iPad experience, which I currently find underwhelming. I…
As the year-end approaches, so do those resolutions we barely keep. Forget all of that. No more two-week diets. This time, it's your interfaces that are putting on weight. In 2007, skeuomorphism was all the rage, bringing ultra-realistic interfaces. Then, a few years later, iOS 7 sparked a revolution with its flat design. Today, we find ourselves much closer to flat design than skeuomorphism. But…
I was once again experimenting with shaders and SwiftUI. What started as a small test for version 2 of Storma ended up as an open-source Swift package. The result: Sticker , a tool that lets you add a "Pokémon card" effect to any view. Available now on my GitHub , this package is easy to use. If you like the result, give it a try, share your feedback, and feel free to drop a star on the repo. ⭐…
We’ve all met someone who could sell just about anything with their gift of gab. For me, that person is Artem, the iOS developer who took over after me at MacG. Artem is the guy who’ll secure your phone to your bike with a clever little accessory. The guy who’ll let you control music from your MacBook Pro’s notch. The guy who knows how to give a proper demo because he gets the real need behind the…
Releasing a new app on the App Store is both incredibly exciting and nerve-wracking. SuperText was no exception. But unlike my previous apps, I found myself days away from launch without a satisfying icon. After a redesign, however, the SuperText icon became one of my proudest creations. As a developer, I tend to focus heavily on fine-tuning my app’s interface to provide the best user experience…
I’ve been developing apps, imagining concepts, designing user interfaces, and creating graphics for a long time. But I’ve always hesitated to share my work, mostly because I feel that what I put online is never perfect or fully polished. More so these days. Over time, I’ve learned to release concepts faster by focusing solely on the core functionality of an app. This approach has been a…