Swift

VIPER adoption to SwiftUI

VIPER adoption to SwiftUI

Learn How To Use VIPER in SwiftUI

VIPER is one of the hottest architectures back then because of its separation of layers that isolated between each other which is also debatable. Some argue that VIPER is over-engineer and an overkill architecture, some argue that VIPER causes too many boilerplates of code and some argue that VIPER is one of the best architecture for iOS Development. All of these opinions are valid, we definitely can use VIPER depends on how complex is our project and other undefined constraints.
Command Pattern in real-life

Command Pattern in real-life

Learn How To Use Command Pattern in Swift

Recently I have a problem in my team whereas the analytics function become scattered. Some other team create their own function and handling their own caching for tracking the events, and some even create multiple similar function across the modules only for analytics, until then a problem arises. Since my company heavily depends on A/B Testing and data-driven culture, at some point we have found a lot of biased data as well missing parameters, then I start to investigate the issues.

Analyze HTTP Traffic with new HTTP Instrument

Understanding new HTTP Instrument Xcode

WWDC21 has been finished last week with over 200 sessions. Most of the time we heard about SwiftUI session or about Async Await. However there are also interesting session about debugging that has been described by Keith Harrison here. In this article I would like to focus on one of the underrated session which is Analyze HTTP Traffic in Instruments. I also write this article in WWDC Notes. All content copyright © 2012 – 2021 Apple Inc.

Testing In-App Purchases Locally in Simulator

Implementing Store Kit in Swift

During development, we will come into a phase where we would like to test out our In-App Purchases. However, most likely we ever heard a myth that IAP only works with devices to test it out with an internal tester account. Turns out during the process of the creation of Tripzy, I found a way to test our IAP in a simulator without any hassle. Keep in mind there will be some limitations of course if we are testing against the simulator.

Enhance Factory Pattern capabilities for DI in Swift within 3 minutes

Implementing Factory Pattern in Swift

Factory pattern is one of the common patterns in a programming language. It is one of the creational design patterns that provide a high level of flexibility for your code. One of the interesting use cases that could make Factory pattern become a handy tool to use is Dependency Injection. Normally whenever we want to inject an interface as a dependency on an object, we could easily pass it through the initializer or set it from the property.

Understanding Proxy Pattern in Swift within 5 minutes

Implementing Proxy Pattern in Swift

The proxy pattern is one of the few underrated patterns that nobody really talks about in iOS. A proxy pattern is one of the structural design patterns that lets you provide a substitute or placeholder for another object. A proxy has total control and access to the original object, and let the proxy object do some magical stuff with the original object and restrict the access to it, however, the one who uses a proxy object, won’t have any knowledge behind the scene.

Fun Debugging in iOS — Understanding the GUI in 3 minutes

Learn how to use easily debug in Xcode

After we have understood the basic concept of LLDB commands now it is taking time to understand the full GUI of Xcode debugging. Let see the picture above. Once you have put a breakpoint on any lines of code in your applications, you will see a similar screen as above. The top one is our code panel, which indicates where is our breakpoint located The bottom left panel is our quick look panel, we can see our current state of the object in either class or function level at the moment the code is being halted

Fun Debugging iOS — Basic Part (LLDB) in 3 minutes

Learn understand basic concept of LLDB in Xcode

Have you ever wonder how to debug your entire code in the proper way? But sometimes we don’t know in-depth detail about how does it work behind the scene? In this multiple series of articles, I am trying to spread multiple articles into specific chunks of debugging part, start with the basic / foundation part of debugging in iOS. Normally we will have multiple topics covering all areas, start with LLDB debugging and end with Logging.

Xcode handy “Move and Share” breakpoint in 2 minutes

Learn how to easily debug in Xcode

Do you know that we can actually simply share our breakpoints with our colleagues at work? Xcode provides us with the capability to share it. This share function is very handy if we want all colleagues to have a similar breakpoint. Some breakpoints that worth sharing are Exception breakpoint, Runtime breakpoint, and some Symbolic breakpoints. Let see how it works Go to your debug navigator panel on the left panel

Symbolic Breakpoint Xcode in 2 Minutes

Use Symbolic Breakpoint for debugging

Once upon a time, while I was debugging my code, I found out an annoying warning comes up like below [TableView] Warning once only: UITableView was told to layout its visible cells and other contents without being in the view hierarchy (the table view or one of its superviews has not been added to a window). This may cause bugs by forcing views inside the table view to load and perform layout without accurate information (e.