Feature skeleton (DI, offline, experiments)
Sketch a single "save bookmark" feature as a Swift code skeleton. Instead of a whiteboard, work at the level of type and protocol signatures, and focus on how you inject dependencies to keep it testable.
Sketch a single "save bookmark" feature as a Swift code skeleton. Instead of a whiteboard, work at the level of type and protocol signatures, and focus on how you inject dependencies to keep it testable.
Put a local store and a remote API behind a BookmarkRepository protocol, pass dependencies through initializer injection, and plug in InMemoryBookmarkStore and FakeBookmarkAPI in tests. Experiments read a variant from an ExperimentClient protocol and branch in a view factory, logging exposure at the same spot.
ArchitectureShort answerBasics
Why do we do dependency injection in an iOS app?
#dependency-injection #protocol
ArchitectureShort answerBasics
Dependency Injection and the Dependency Inversion Principle have similar names. What's…
#dependency-injection #protocol
TestingShort answerAdvanced
An app calls AuthManager.shared directly all over the code. How would you unit test the…
#dependency-injection #protocol
iOS system designShort answerAdvanced
Design an infinite-scroll feed screen like Twitter's from the iOS client's point of view…
#offline