# hansenccc/ypuikit-objc architecture

> Architecture diagram of the GitHub repository hansenccc/ypuikit-objc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-31). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hansenccc/ypuikit-objc
- Repository: https://github.com/hansenccc/ypuikit-objc

## Overview

#### 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-ObjC/Classes/YPUIKit.h`](https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPUIKit.h) (YPUIKit umbrella API), [`YPUIKit-ObjC/Classes/YPPopupController/YPPopupController.m`](https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPPopupController/YPPopupController.m) (Popup controller), [`Example/YPUIKit-ObjC/main.m`](https://github.com/hansenccc/ypuikit-objc/blob/master/Example/YPUIKit-ObjC/main.m) (Sample application), [`YPUIKit-ObjC/Classes/YPFileListViewController/YPFileListViewController.m`](https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPFileListViewController/YPFileListViewController.m) (File browser controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_distribution["Distribution &amp; Sample"]
  node_podspec["CocoaPods package<br/>podspec"]
  node_umbrella["YPUIKit umbrella API<br/>public header<br/>[YPUIKit.h]"]
  node_sample["Sample application<br/>iOS app<br/>[main.m]"]
  node_app_delegate["App bootstrap<br/>app delegate<br/>[YPAppDelegate.m]"]
  node_lookin{{"LookinServer<br/>external inspection server<br/>[LookinServer.h]"}}
end

subgraph group_ui["UIKit Foundation &amp; Presentation"]
  node_uikit{{"iOS UIKit runtime<br/>Apple framework"}}
  node_defines["Layout &amp; device conventions<br/>shared definitions<br/>[YPKitDefines.m]"]
  node_base_vc["Base view controller<br/>controller base<br/>[YPViewController.m]"]
  node_categories["UIKit/Foundation categories<br/>extension API<br/>[YPCategoryHeader.h]"]
  node_popup["Popup controller<br/>modal presenter"]
  node_transitions["Popup transitions<br/>animation layer"]
  node_input["Input &amp; alert controls<br/>interaction components<br/>[YPInputHeader.h]"]
end

subgraph group_files["File Inspection"]
  node_file_manager["File manager &amp; items<br/>local filesystem model<br/>[YPFileManager.m]"]
  node_file_viewmodel["File list view model<br/>browser presentation model"]
  node_file_controller["File browser controller<br/>table UI controller"]
end

subgraph group_services["Media &amp; Platform Services"]
  node_video_manager["Video playback manager<br/>media coordinator"]
  node_purchase["Purchase manager<br/>StoreKit service"]
  node_keychain["Keychain service<br/>secure storage service<br/>[YPKeychain.m]"]
end

node_podspec -->|"packages"| node_umbrella
node_sample -->|"boots"| node_app_delegate
node_sample -->|"integrates local pod"| node_podspec
node_sample -.->|"vendors for inspection"| node_lookin
node_umbrella -->|"exports"| node_defines
node_umbrella -->|"exports"| node_base_vc
node_umbrella -->|"exports"| node_categories
node_umbrella -->|"exports"| node_popup
node_umbrella -->|"exports"| node_file_controller
node_umbrella -->|"exports"| node_video_manager
node_umbrella -->|"exports"| node_purchase
node_umbrella -->|"exports"| node_keychain
node_base_vc -->|"uses"| node_defines
node_categories -->|"extends"| node_uikit
node_popup -->|"uses"| node_transitions
node_input -->|"presents through"| node_popup
node_popup -->|"presents in"| node_uikit
node_file_viewmodel -->|"queries"| node_file_manager
node_file_controller -->|"binds"| node_file_viewmodel
node_file_controller -->|"renders with"| node_uikit
node_video_manager -->|"uses media UI"| node_uikit
node_purchase -->|"bridges platform services"| node_uikit
node_keychain -->|"bridges secure storage"| node_uikit

click node_podspec "https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC.podspec"
click node_umbrella "https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPUIKit.h"
click node_sample "https://github.com/hansenccc/ypuikit-objc/blob/master/Example/YPUIKit-ObjC/main.m"
click node_app_delegate "https://github.com/hansenccc/ypuikit-objc/blob/master/Example/YPUIKit-ObjC/YPAppDelegate.m"
click node_lookin "https://github.com/hansenccc/ypuikit-objc/blob/master/Example/Pods/LookinServer/Src/Main/Server/LookinServer.h"
click node_defines "https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPKitDefines/YPKitDefines.m"
click node_base_vc "https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPViewController/YPViewController.m"
click node_categories "https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPCategory/YPCategoryHeader.h"
click node_popup "https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPPopupController/YPPopupController.m"
click node_transitions "https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPPopupController/YPPopupAnimatedTransitioning.m"
click node_input "https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPInputViewController/YPInputHeader.h"
click node_file_manager "https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPFileManager/YPFileManager.m"
click node_file_viewmodel "https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPFileListViewController/YPFileListViewModel.m"
click node_file_controller "https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPFileListViewController/YPFileListViewController.m"
click node_video_manager "https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPVideoPlayer/YPVideoPlayerManager.m"
click node_purchase "https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPPurchaseManager/YPPurchaseManager.m"
click node_keychain "https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPKeychain/YPKeychain.m"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_podspec,node_umbrella,node_sample,node_app_delegate,node_lookin toneBlue
class node_uikit,node_defines,node_base_vc,node_categories,node_popup,node_transitions,node_input toneAmber
class node_file_manager,node_file_viewmodel,node_file_controller toneMint
class node_video_manager,node_purchase,node_keychain toneRose
```

## Components

### Distribution & Sample

- [CocoaPods package](https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC.podspec): podspec · Defines the distributed library boundary. · `YPUIKit-ObjC.podspec`
- [YPUIKit umbrella API](https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPUIKit.h): public header · Consumer import surface for library modules. · `YPUIKit-ObjC/Classes/YPUIKit.h`
- [Sample application](https://github.com/hansenccc/ypuikit-objc/blob/master/Example/YPUIKit-ObjC/main.m): iOS app · Runnable integration host for the local pod. · `Example/YPUIKit-ObjC/main.m`
- [App bootstrap](https://github.com/hansenccc/ypuikit-objc/blob/master/Example/YPUIKit-ObjC/YPAppDelegate.m): app delegate · `Example/YPUIKit-ObjC/YPAppDelegate.m`
- [LookinServer](https://github.com/hansenccc/ypuikit-objc/blob/master/Example/Pods/LookinServer/Src/Main/Server/LookinServer.h): external inspection server · Sample-vendored debugging infrastructure, not core library code. · `Example/Pods/LookinServer/Src/Main/Server/LookinServer.h`

### UIKit Foundation & Presentation

- **iOS UIKit runtime**: Apple framework
- [Layout & device conventions](https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPKitDefines/YPKitDefines.m): shared definitions · Centralizes layout and device adaptation. · `YPUIKit-ObjC/Classes/YPKitDefines/YPKitDefines.m`
- [Base view controller](https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPViewController/YPViewController.m): controller base · `YPUIKit-ObjC/Classes/YPViewController/YPViewController.m`
- [UIKit/Foundation categories](https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPCategory/YPCategoryHeader.h): extension API · Cross-cutting extensions applied to standard types. · `YPUIKit-ObjC/Classes/YPCategory/YPCategoryHeader.h`
- [Popup controller](https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPPopupController/YPPopupController.m): modal presenter · Provides middle/bottom modal presentation. · `YPUIKit-ObjC/Classes/YPPopupController/YPPopupController.m`
- [Popup transitions](https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPPopupController/YPPopupAnimatedTransitioning.m): animation layer · `YPUIKit-ObjC/Classes/YPPopupController/YPPopupAnimatedTransitioning.m`
- [Input & alert controls](https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPInputViewController/YPInputHeader.h): interaction components · Text input, alerts, loading, and button primitives. · `YPUIKit-ObjC/Classes/YPInputViewController/YPInputHeader.h`

### File Inspection

- [File manager & items](https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPFileManager/YPFileManager.m): local filesystem model · Accesses and models app-accessible local content. · `YPUIKit-ObjC/Classes/YPFileManager/YPFileManager.m`
- [File list view model](https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPFileListViewController/YPFileListViewModel.m): browser presentation model · `YPUIKit-ObjC/Classes/YPFileListViewController/YPFileListViewModel.m`
- [File browser controller](https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPFileListViewController/YPFileListViewController.m): table UI controller · Drives browsing UI and preview handoff. · `YPUIKit-ObjC/Classes/YPFileListViewController/YPFileListViewController.m`

### Media & Platform Services

- [Video playback manager](https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPVideoPlayer/YPVideoPlayerManager.m): media coordinator · Coordinates source playback and composited controls. · `YPUIKit-ObjC/Classes/YPVideoPlayer/YPVideoPlayerManager.m`
- [Purchase manager](https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPPurchaseManager/YPPurchaseManager.m): StoreKit service · `YPUIKit-ObjC/Classes/YPPurchaseManager/YPPurchaseManager.m`
- [Keychain service](https://github.com/hansenccc/ypuikit-objc/blob/master/YPUIKit-ObjC/Classes/YPKeychain/YPKeychain.m): secure storage service · `YPUIKit-ObjC/Classes/YPKeychain/YPKeychain.m`

## Connections

- 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
