Number: 019, Date: 2025-06-02

2025.05.19 ~ 2025.06.01

🤝 SDUI (Server-Driven UI)


SDUI stands for Server Driven UI, where the server defines the UI and the client renders it accordingly. On iOS, it’s easy to implement with SwiftUI and Codable.

To implement SDUI, I designed the basic architecture. The overall flow follows this structure: Scene → Layout → Implementation for each SwiftUI Component.

Since SwiftUI components conform to the View protocol, I created a CommonComponent conforming to a shared View protocol, and designed each component to have its own unique properties.

When used with Firebase Remote Config, UI can be updated in real-time.

Thoughts after implementation

Using SDUI allows UI updates even after release, which is very convenient. However, you should implement fallback rendering using a default JSON structure in case of network failure. Also, flexible event handling might be limited.

⚡️ iOS Analytics Architecture


When developing apps, we often use multiple analytics tools, which makes it important to design a manageable architecture. I studied various approaches through blog posts and synthesized their pros and cons to create a design of my own.

The architectures from those blog posts had similar patterns. Common features included declaring a list of trackable events and custom parameters using enums, implementing senders for each analytics tool, and managing them through a central manager object.

Reference Links

  1. https://medium.com/macoclock/abstraction-analytics-layer-for-swift-39636ede5e67
  2. https://www.swiftbysundell.com/articles/building-an-enum-based-analytics-system-in-swift/
  3. https://medium.com/swift-programming/a-modular-analytics-layer-in-swift-564a95039596
  4. https://medium.com/smart-cloud/analytics-and-tracking-best-practices-in-ios-apps-dedb8f328e97
  5. https://medium.com/@MdNiks/building-scalable-and-flexible-analytics-architecture-for-ios-using-dependency-injection-7795ed79b322
  6. https://medium.com/stackademic/mastering-firebase-analytics-and-a-b-testing-in-ios-a-real-world-guide-bb497caa1a95
  7. https://noob-programmer.medium.com/crafting-an-efficient-analytics-framework-part-1-7d0c2907bfb1

🙋🏻‍♂️ Other Notes


  1. When adding Color Sets to Xcode’s Assets, there are a few things to keep in mind:
    1. If you add “Color” to the name, UIColor(resource:) will autocomplete the resource name excluding the word “Color.” For example, if you name it potatoColor, it will be used as UIColor(resource: .potato).
    2. Avoid naming collisions with system color names. For example, naming it backgroundColor might conflict with the existing background, as “Color” is omitted in autocompletion.