How developeracademy-postech/2024-macc-a15-commandr works
Main Components
• iOS App (RhythmTokTok):
• User Interface Layer: Contains ViewControllers, custom Views (e.g., PDFUploadProgressView, TitleInputView).
• Business Logic / Managers: Modules under “Managers” (e.g., ServerManager, MediaManager, PDFConvertManager, IOStoWatchConnectivityManager) and utility classes under “Utils”.
• Data Persistence: The CoreData module (including CoreDataStack and entity classes for notes and scores).
• Models: Data structures (Note, Score, Request, Measure, etc.) and enumerations that define app-specific states.
• Resource Management: Assets (images, fonts, Lottie animations, PDFs, and sound files) located under “Assets.xcassets” and “Resources”.
• Apple Watch App (RhythmTokTokWatchApp):
• Watch UI Components: Watch-specific Views (e.g., WatchCountdownView, WatchPlayView).
• Connectivity Manager: For synchronizing data and commands between the iOS app and the Watch (e.g., WatchtoiOSConnectivityManager).
• Watch-specific assets and complication support through a separate directory and the “ComplicationWidget” component.
• Backend / Server Interaction:
• Server Component: Represented logically by the ServerManager (and PHP/MySQL-based backend mentioned in the README). This part handles PDF conversion status, notifications, and user-specific data uploads/downloads.
Relationship and Interactions
• The iOS front-end communicates with the managers (business logic components) which handle core functionalities such as media playback, PDF conversion, and data persistence.
• The Data Persistence layer (CoreData) interacts with the Models to store user data, settings, and historical scores.
• An API layer (ServerManager) provides network communication with the external server (PHP/MySQL backend), using JSON and possibly secure data transfer methods (noting the integration of CryptoSwift).
• The Watch App aspects connect via WatchConnectivity modules. Data and commands flow bidirectionally between the iOS app and the Apple Watch app to keep alarm, music control, and haptic feedback in sync.
• The ComplicationWidget offers a quick glance at information via Apple Watch complications, refreshing visuals based on app states.
Architectural Patterns and Technologies
• MVC (or a variant like MVVM) role separation: The Views (both in the iOS app and Watch app) are kept separate from the underlying business logic in the managers.
• Reactive programming is likely utilized through Combine, which indicates asynchronous data streams and binding between the UI and business logic.
• Use of CoreData for local persistence and integration of system frameworks such as UIKit, SwiftUI, AVFoundation, PDFKit, and UserNotifications.
• To one side, attach the Apple Watch app ecosystem (including its UI and connectivity module) and show lines of communication.
• Drill down into each area:
• For the UI layer, include key screens as noted (Settings, ScoreList, PDF conversion flow, etc.).
• Detail how PDF conversion requests flow from the UI to the ServerManager and how completed requests trigger notifications.
• Lifecycle of local data storage using CoreData.
• A distinct section for external libraries (CryptoSwift, Lottie) that factor into security and animations.
• For the Watch app, not only indicate its separate asset and connectivity handling but also mark its role in controlling metronome features and haptic feedback.