A modern iOS application built with UIKit to elegantly organize, persist, and browse a list of web URLs. This project was specifically designed to demonstrate proficiency in modern iOS development patterns, clean architecture, and Apple's latest Swift concurrency features. It serves as a showcase of writing scalable, crash-safe, and highly maintainable code without relying on legacy paradigms or third-party dependencies.
- 100% Programmatic UI: Built entirely without Storyboards or XIBs. Views and layouts are constructed in code using Auto Layout (
NSLayoutConstraint), demonstrating a deep understanding of the UIKit view lifecycle and rendering pipeline. - Diffable Data Sources: Uses
UITableViewDiffableDataSourcealongsideNSDiffableDataSourceSnapshotfor robust, O(N) list updates. This entirely eliminates the risk ofNSInternalInconsistencyExceptioncrashes related to index-based updates while providing fluid, automatic animations. - Modern Interactions: Leverages
UIContextMenuConfigurationto provide native, elegant context menus for actions like Editing, Deleting, and Removing Duplicates.
- Async/Await: Replaces legacy closure-based callbacks with modern
async/awaitfor asynchronous disk I/O, ensuring thread safety and readable asynchronous flows. - Actor Isolation: Strategically uses
@MainActorto guarantee UI updates occur on the main thread, satisfying Swift 6's strict concurrency checker. - Sendable Compliance: Models and cross-actor data types (
URLListSection,URLItem) explicitly conform toSendableandnonisolated, demonstrating an advanced understanding of Swift's approach to data race safety andSWIFT_DEFAULT_ACTOR_ISOLATION.
- Model-View-ViewModel (MVVM): Enforces a strict separation of concerns. The View acts purely as a dumb renderer, while the ViewModel handles presentation logic and coordinates with the data layer.
- Protocol-Oriented Programming (POP): Dependencies such as
URLRepositoryProtocol,StorageServiceProtocol, andURLValidatingare abstracted behind protocols. This allows for seamless dependency injection, making the codebase highly modular and completely testable (e.g., swappingFileManagerStorageServicefor a mock in unit tests). - Lightweight View Controllers: By offloading diffing to
UITableViewDiffableDataSourceand business logic to the ViewModel, theURLListViewControlleravoids the "Massive View Controller" anti-pattern.
- Persistence: Implements a robust
StorageServiceusingFileManagerandCodableto persist user data to disk as JSON. Disk operations are safely offloaded to background threads usingTask.detached(priority: .utility). - Validation: Employs a dedicated
URLValidatorto normalize input (e.g., automatically appendinghttps://) and validate URL components before persisting data.
- Models: Immutable,
Sendabledata structures (URLItem,URLListSection). - Views/Controllers: Programmatic UI components (
URLListViewController,WebViewController,EmptyStateView). - ViewModels: Presentation and coordination logic (
URLListViewModel). - Services: Protocol-based utilities for validation and background I/O (
URLValidator,StorageService). - Repository: Centralized data access layer (
URLRepository).
- iOS: 15.0+ (Utilizes modern UI and Concurrency APIs)
- Xcode: 15.0+ (Swift 5.9+ with Strict Concurrency Checking)
- Dependencies: None. This project is built entirely using native Apple frameworks (UIKit, Foundation) to demonstrate core competency.
- Clone the repository.
- Open
URLOrganizerUIKit.xcodeprojin Xcode. - Build and run on any iOS Simulator or physical device. No package resolution or setup scripts required.