Welcome to
Thuyen's corner
-
How Xcode Recognizes Module Imports
In iOS development, a module is a self-contained unit of code offering a specific set of functionalities. Modules help break down complex apps into smaller components. Developers can incorporate a module into different parts of an app using the import keyword. Behind the scenes, the build system performs several tasks to recognize and integrate these imports seamlessly. A module can be distributed in various formats such as collections of source files, or a pre-compiled binaries or bundles.
-
pre-commit Environment Issue in SourceTree
In the previous post, I mentioned pre-commit as a powerful tool to lint and format in a project. It had worked seamlessly for me until I committed code using SourceTree. Just to clarify, I predominantly use git on terminal. I only use a GUI app such as SourceTree to view the diff, or to stage selective chunks in a file (which is a bit difficult to achieve when using terminal). Therefore, the issue went unnoticed during my usual workflow.
-
Using pre-commit for Linters/Formatters
During my tenure at Grab, I witnessed the project’s transformation from an iOS exclusive to a multi-language initiative. Initially, the project primarily comprised iOS code. Over time, we developed various scripts (Ruby, Python, Bash, etc.) to enhance project build time and facilitate CI/CD integration. However, the linter setup was not sufficient for such a multi-language project. At a glance, we used SwiftLint, Rubocop, and Flake8 to lint Swift, Ruby, and Python code, respectively.
-
Using Swift Packages in CocoaPods-Based Projects
Introduction Swift Package Manager (SwiftPM, or SPM) is a tool for managing the distribution of Swift code. Initially launched in 2015, it primarily catered to server-side or command-like projects. Its adoption has been limited over the years due to lack of support for the mainstream iOS/MacOS development. During this time, CocoaPods has gained its power and emerged as a dominant tool in iOS development. Not until recently has SPM been adopted widely.
-
Designing Test Quarantine Logic to Deal With Flaky Tests
Introduction Flaky tests, known for producing inconsistent results (success or failure) over time, can be a source of frustration for developers. These non-deterministic tests can arise due to various factors, including code issues or an inconsistent testing environment. In this blog post, we will explore the concept of test quarantine, an approach to mitigate the challenges posed by flaky tests. The Need for Test Quarantine The Challenge of Flaky Tests Flaky tests are particularly prevalent in certain types of testing, such as UI testing, where the higher level of integration introduces greater complexity.
-
A Tale of Project Build Time Improvement
Introduction Build time is a key factor to engineers’ productivity. Slow build time can be frustrating and lead to hindered progress. There has been a great amount of effort by the community to tackle this complex problem. This blog post highlights various methodologies employed by our team (at Grab) to alleviate this pain point. Background The process of building an iOS project involves multiple steps, including compiling source code, processing resources (headers, assets, storyboards, etc.
-
On Using Python for Scripting in iOS Projects
As an iOS engineer, my recent focus has been on platform work, involving tasks like optimizing build times, integrating CI/CD pipelines, and devising testing solutions. This has led me to explore various scripting options, and I’ve found great satisfaction in using Python as our preferred choice. The first Python code Initially, scripting wasn’t a prominent aspect of my team’s workflow, largely due to the simplicity of our CI/CD setup and the prevalence of Bash scripts in our project.
-
Code Signing on CI
1. Introduction Code signing in iOS refers to the process of digitally signing an app’s executable code to ensure its authenticity and integrity. During feature development, developers usually do not have to worry about code signing because Xcode handles the complicated work. Most of the time, we build and run the app on simulators that do not require special code signing settings. However, distributing the app requires code signing. While working locally, you can rely on the “Automatically manage signing” option in the project settings.
-
Chuyện Nghề: Bạn Có Đang Bế Tắc Trong Công Việc?
Có bạn nhắn tin hỏi lời khuyên của mình về việc nên hay không nên quyết định nghỉ việc khi không còn hứng thú nữa, trong bối cảnh tìm việc khó khăn như hiện tại. Mình cho rằng đây là một chủ đề thú vị nên muốn viết vài dòng suy nghĩ cá nhân về nó. Mình là người đã đưa ra đáp án “nghỉ việc” cho trường hợp cụ thể của bản thân.
-
Chuyện Nghề: Một Dự Án Nọ (2)
Hôm nay, mình kể mọi người về dự án cuối cùng mà mình tham gia, trước khi nghỉ Grab. Đó là E2E testing. Sorry mọi người, mình quên mất các mốc thời gian cụ thể, nên giờ nhớ gì kể nấy. Mục tiêu của dự án là làm thế nào để cắt giảm thời gian regression tests của QA. Mình giải thích sơ về quy trình phần mềm cho mọi người cùng hiểu rõ.