How hansenccc/ypuikit-objc works
Purpose and Entry Points
YPUIKit-ObjC is an Objective-C iOS CocoaPods library for rapidly assembling UIKit-based applications: reusable UI controls, presentation controllers, device/layout conventions, debugging/file tools, and selected platform services. Consumers import the umbrella API at YPUIKit-ObjC/Classes/YPUIKit.h; package definition is YPUIKit-ObjC.podspec. The runnable integration/sample app enters at Example/YPUIKit-ObjC/main.m and is bootstrapped by Example/YPUIKit-ObjC/YPAppDelegate.m.
Library Composition Boundary
Production code is organized as independently consumable UIKit modules beneath YPUIKit-ObjC/Classes. Most modules wrap or subclass UIKit rather than forming a single application domain. The pod boundary exposes the library; the Example/ application demonstrates integration and vendors CocoaPods dependencies, including LookinServer, which is not core library code.
• YPUIKit-ObjC/Classes/YPUIKit.h
• YPUIKit-ObjC.podspec
• Example/Podfile
Presentation and Input Stack
The primary reusable UI flow is: host view controller instantiates a component, configures properties/callbacks, then presents or embeds it in UIKit. YPPopupController supplies middle/bottom modal presentation and animated transitions; picker/date/color alerts are specialized popup consumers. Alert, loading, text input, and button controls provide common interaction primitives.
• YPUIKit-ObjC/Classes/YPPopupController/YPPopupController.m
• YPUIKit-ObjC/Classes/YPPopupController/YPPopupAnimatedTransitioning.m
• YPUIKit-ObjC/Classes/YPInputViewController/YPInputHeader.h
Shared UI Foundation
Layout/device adaptation is centralized in YPKitDefines, while YPViewController provides the project’s base controller abstraction. Category extensions add cross-cutting UIKit/Foundation behavior directly to standard types; this is a broad API surface and an important coupling boundary because extensions affect all importing code. Visual components such as progress, badges, floating controls, waterfall layout, and swipe views build atop UIKit.
• YPUIKit-ObjC/Classes/YPKitDefines/YPKitDefines.m
• YPUIKit-ObjC/Classes/YPViewController/YPViewController.m
• YPUIKit-ObjC/Classes/YPCategory/YPCategoryHeader.h
File Inspection and Local Persistence
The file-browser subsystem separates filesystem access/modeling from table-oriented presentation: file items and manager represent local content; proxy/view model/controller drive browsing UI and likely preview handoff. It operates against app-accessible local paths, providing a developer/debugging capability rather than a network-backed storage service.
• YPUIKit-ObjC/Classes/YPFileManager/YPFileManager.m
• YPUIKit-ObjC/Classes/YPFileListViewController/YPFileListViewModel.m
• YPUIKit-ObjC/Classes/YPFileListViewController/YPFileListViewController.m
Media and Device Services
Video playback is divided into source model, playback manager, container/controller, and composited controls for timeline, sound, brightness, and navigation. Separate managers expose iOS platform integrations: StoreKit-style purchase handling, Keychain-backed secrets, network reachability, and device shake feedback. These form explicit boundaries to Apple runtime services and device state.
• YPUIKit-ObjC/Classes/YPVideoPlayer/YPVideoPlayerManager.m
• YPUIKit-ObjC/Classes/YPPurchaseManager/YPPurchaseManager.m
• YPUIKit-ObjC/Classes/YPKeychain/YPKeychain.m
Runtime, Build, and External Infrastructure
The runtime is native Objective-C on iOS/UIKit, built through Xcode and distributed by CocoaPods. The sample workspace resolves the local pod and bundles LookinServer, an external in-app inspection server using Peertalk/USB transport; it is isolated under Example/Pods/ and should not be treated as a dependency architecture of YPUIKit itself.
• Example/YPUIKit-ObjC.xcworkspace/contents.xcworkspacedata
• Example/Pods/LookinServer/Src/Main/Server/LookinServer.h
• Example/Pods/LookinServer/Src/Main/Shared/Peertalk/Lookin_PTUSBHub.m
Main entry points: YPUIKit.h YPUIKit umbrella API · YPPopupController.m Popup controller · main.m Sample application · YPFileListViewController.m File browser controller
Components 18
Distribution & Sample
- CocoaPods package · Defines the distributed library boundary.
YPUIKit-ObjC.podspec - YPUIKit umbrella API · Consumer import surface for library modules.
YPUIKit-ObjC/Classes/YPUIKit.h - Sample application · Runnable integration host for the local pod.
Example/YPUIKit-ObjC/main.m - App bootstrap
Example/YPUIKit-ObjC/YPAppDelegate.m - LookinServer · Sample-vendored debugging infrastructure, not core library code.
Example/Pods/LookinServer/Src/Main/Server/LookinServer.h
UIKit Foundation & Presentation
- iOS UIKit runtime
- Layout & device conventions · Centralizes layout and device adaptation.
YPUIKit-ObjC/Classes/YPKitDefines/YPKitDefines.m - Base view controller
YPUIKit-ObjC/Classes/YPViewController/YPViewController.m - UIKit/Foundation categories · Cross-cutting extensions applied to standard types.
YPUIKit-ObjC/Classes/YPCategory/YPCategoryHeader.h - Popup controller · Provides middle/bottom modal presentation.
YPUIKit-ObjC/Classes/YPPopupController/YPPopupController.m - Popup transitions
YPUIKit-ObjC/Classes/YPPopupController/YPPopupAnimatedTransitioning.m - Input & alert controls · Text input, alerts, loading, and button primitives.
YPUIKit-ObjC/Classes/YPInputViewController/YPInputHeader.h
File Inspection
- File manager & items · Accesses and models app-accessible local content.
YPUIKit-ObjC/Classes/YPFileManager/YPFileManager.m - File list view model
YPUIKit-ObjC/Classes/YPFileListViewController/YPFileListViewModel.m - File browser controller · Drives browsing UI and preview handoff.
YPUIKit-ObjC/Classes/YPFileListViewController/YPFileListViewController.m
Media & Platform Services
- Video playback manager · Coordinates source playback and composited controls.
YPUIKit-ObjC/Classes/YPVideoPlayer/YPVideoPlayerManager.m - Purchase manager
YPUIKit-ObjC/Classes/YPPurchaseManager/YPPurchaseManager.m - Keychain service
YPUIKit-ObjC/Classes/YPKeychain/YPKeychain.m
Connections 23
- CocoaPods package → YPUIKit umbrella API: packages
- Sample application → App bootstrap: boots
- Sample application → CocoaPods package: integrates local pod
- Sample application → LookinServer: vendors for inspection
- YPUIKit umbrella API → Layout & device conventions: exports
- YPUIKit umbrella API → Base view controller: exports
- YPUIKit umbrella API → UIKit/Foundation categories: exports
- YPUIKit umbrella API → Popup controller: exports
- YPUIKit umbrella API → File browser controller: exports
- YPUIKit umbrella API → Video playback manager: exports
- YPUIKit umbrella API → Purchase manager: exports
- YPUIKit umbrella API → Keychain service: exports
- Base view controller → Layout & device conventions: uses
- UIKit/Foundation categories → iOS UIKit runtime: extends
- Popup controller → Popup transitions: uses
- Input & alert controls → Popup controller: presents through
- Popup controller → iOS UIKit runtime: presents in
- File list view model → File manager & items: queries
- File browser controller → File list view model: binds
- File browser controller → iOS UIKit runtime: renders with
- Video playback manager → iOS UIKit runtime: uses media UI
- Purchase manager → iOS UIKit runtime: bridges platform services
- Keychain service → iOS UIKit runtime: bridges secure storage