Introduction#
This article is a record and reflection of life from 2025-05-13
to 2025-05-18
.
It documents some resources for learning iOS/SwiftUI development and the setup and workflow of the iOS development environment based on Roo Code and Cursor.
iOS/SwiftUI Development#
Learning Resources#
Recently, I have been involved in some iOS-related development at work. Although I used SwiftUI when working on "TheWan App," it was a very personal project where I mainly focused on completing the functionality without pursuing best practices. So this time, I took the opportunity during the May Day holiday to refresh my foundational knowledge.
- Apple - SwiftUI, the official documentation.
- Apple - SwiftUI Tutorials, Apple also has an interactive SwiftUI tutorial, which makes concepts related to layout and animation more vivid.
- SwiftUI Beginner Course, ChaoCode's introductory tutorial is probably one of the most concise and easy-to-understand tutorials, not too difficult but explained very clearly, and after watching it, you can basically work on some small projects.
- CS193p - Developing Apps for iOS, a classic iOS development course from Stanford, the 2023 course has also shifted to SwiftUI, with high quality, and after watching it, you can better understand the MVVM design pattern and some lower-level concepts.
- Fat Bob Man's Swift Notebook, there are many excellent articles, and I have referred to his blog for best practices regarding Swift Data.
- iOS Developer+, I usually read his Newsletter, and he is also serializing a SwiftUI tutorial, considering subscribing to learn more in-depth after some time.
When searching for specific concepts and practices, you can directly Google search, where you can find some articles on Medium or other platforms, which vary in quality, but currently, they are much more reliable than answers generated by LLMs; the only thing to watch out for is to verify the timeliness, as many older practices may not be applicable.
Development Environment Setup#
macOS that supports Apple Intelligence has a built-in Predictive code completion, which downloads a local model of about 2.5GB that can be used offline.
However, compared to this local model, the official plugin provided by GitHub Copilot for Xcode is more powerful. In addition to code completion, it has a Chat panel that allows you to easily ask questions about some files currently open in Xcode, and it also supports the latest models like Claude 3.7 Sonnet Thinking, although it currently does not provide similar Agents functionality as in VS Code.
However, after getting used to the Agents mode of Cursor, just using the Chat in Xcode for development has become somewhat insufficient. Fortunately, Cursor/VS Code also provides some support for SwiftUI through various plugins ——
First, install some command-line tools:
You can install them with a single command via brew or install them separately from the above GitHub Repos.
brew install xcode-build-server xcbeautify swiftformat
In Cursor/VS Code, you need to install two plugins:
After installing the above dependencies:
- Open the project with Cursor, which needs to be in the same directory as
xx.xcodeproj
. - Press
Cmd + Shift + P
to bring up the command palette, type/retrieveSweetpad: Generate Build Server Config
, and select the current project. - After a moment, a
buildServer.json
file will be generated in the root directory of the current project.
Click on the 🍬 icon in the sidebar plugin, click build on the corresponding schema of the project, select either a simulator or a connected physical device, and it will automatically compile and run, allowing you to develop without opening Xcode.
Now, when you open all the code files, there will no longer be red errors like imports errors, so when using Cursor/Roo Code Agent for development, it will be more accurate.
Development Workflow Based on Roo Code + Cursor#
During the iOS development process, perhaps due to the context length and model corpus reasons, I found that using the Roo Code plugin in conjunction with the gemini-2.5-pro-preview-05-06
model performs significantly better in scenarios such as splitting and refactoring larger functional modules compared to the previous one (of course, the token consumption is also much higher).
So my current workflow is to use the roocode-workspace project to help the model understand the project structure and generate a Memory Bank file for later use; for the development of major features, I try to provide as much official documentation, blogs, and my own prompts as possible for Roo Code to work on, while I fix some logical bugs myself.
Finally, if there are some more complex errors or lint errors, they can be broken down into smaller task units to use Cursor + Claude 3.7 Sonnet Thinking for fixes. Although it consumes tokens at double the rate, the usability of the generated code is still stronger.
Currently, several major requirements have been assisted in development through this workflow, and I am quite satisfied with the results.
Interesting Things and Items#
Inputs#
Although most interesting inputs are automatically synced in the "Yu's Life" Telegram channel, I still selected a portion to list here, making it feel more like a newsletter.
I built a microblog using Telegram Channel messages as content sources — "daily.pseudoyu.com," which makes browsing more convenient.
Favorites#
Articles#
- iOS Silent Notification Problem - How they mess up your app's lifecycle and Amplitude session events, a practice on iOS silent notifications.
Videos#
- The most powerful drone ever?! But it exploded on the first day|DJI Mavic 4 Pro first review
- I turned my wedding into a Nintendo advertisement
Movies#
- I Am Still Here, a long-awaited movie watched in theaters; it must be said that due to political reasons related to friendly exchanges with Brazil, this politically pointed (leftist, violent) film being screened in domestic theaters is quite a subtle matter...
Series#
- The Last of Us Season 2, not a gamer, but I was quite impressed after watching the first season, so I'm following up.
- Love, Death & Robots Season 4, it feels like the quality has degraded/imagination has run dry more than Black Mirror... it seems that too many deliberate metaphors can be somewhat pretentious.