How sjj1024/pakeplus-ios works
Purpose and Scope
PakePlus-iOS is a native iOS shell for turning a remote webpage or bundled static site into a lightweight app. The repository contains an Xcode SwiftUI application plus embedded HTML/JavaScript resources and an IPA artifact. Its native entry point is PakePlus/PakePlusApp.swift.
Native Application Composition
The app is a Swift/SwiftUI project defined by PakePlus.xcodeproj/project.pbxproj. PakePlus/PakePlusApp.swift creates the application scene, while PakePlus/ContentView.swift provides the primary host view. App metadata, capabilities, icons, and branding are bounded by:
• PakePlus/Info.plist
• PakePlus/PakePlus.entitlements
• PakePlus/Assets.xcassets
Web Runtime Boundary
PakePlus/WebView.swift is the key native-to-web boundary: it hosts web content in the iOS web runtime and is the integration point for navigation, loading either a target URL or packaged content, and web/native behavior. Web-facing assets live alongside the native app:
• PakePlus/index.html
• PakePlus/custom.js
• PakePlus/vConsole.js
This separation lets packaged web UI execute in the embedded browser while platform lifecycle and presentation remain native.
Native Navigation and Presentation
The native shell has distinct view components for application structure and navigation:
• PakePlus/ContentView.swift
• PakePlus/SideBarView.swift
• PakePlus/TabBarView.swift
Control flow is expected to originate in SwiftUI scene creation, compose the navigation views, then present the WebView as the application content surface. The sidebar/tab components are the principal native UI layer around the embedded webpage.
Injected and Support Web Content
Custom JavaScript is an explicit extension mechanism for altering or automating the hosted page. The bundled console script supports in-app web debugging. Supporting web resources used by packaging/build flows include:
• scripts/assets/vConsole.js
• scripts/www/pppwd.html
• scripts/ppconfig.json
The important trust boundary is between arbitrary remote/injected web code and the iOS WebView host; changes here affect behavior inside every packaged target page.
Build, Distribution, and Automation
Xcode produces the iOS app, with the checked-in project at PakePlus.xcodeproj. JavaScript package orchestration is represented by package.json, pnpm-lock.yaml, and the worker scripts/ppworker.cjs. GitHub Actions provides cloud build/release automation through:
• .github/workflows/build.yml
• .github/back/build.yml
A prebuilt distribution artifact is present at packages/com.pakeplus.xiao.shen_0.0.1.ipa. The README also describes GitHub-token-driven packaging, where external GitHub Actions and Releases are material services for creating and retrieving builds.
Main entry points: WebView.swift WebView bridge · ContentView.swift Content host · build.yml GitHub Actions build · project.pbxproj Xcode project
Components 18
Native iOS Shell
- Xcode project · Defines the iOS application build.
PakePlus.xcodeproj/project.pbxproj - SwiftUI app entry
PakePlus/PakePlusApp.swift - Content host
PakePlus/ContentView.swift - Sidebar navigation
PakePlus/SideBarView.swift - Tab navigation
PakePlus/TabBarView.swift - WebView bridge · Loads packaged or remote content and mediates web/native behavior.
PakePlus/WebView.swift - App metadata & capabilities
PakePlus/Info.plist - Branding assets
PakePlus/Assets.xcassets
Embedded Web Runtime
- Bundled web page
PakePlus/index.html - Injected custom JS · Extension mechanism for hosted pages.
PakePlus/custom.js - Bundled web console
PakePlus/vConsole.js - Remote target page · Arbitrary hosted content executes inside the embedded browser.
Build & Distribution
- Package orchestration
package.json - Packaging worker
scripts/ppworker.cjs - Packaging web resources
scripts/ppconfig.json - GitHub Actions build
.github/workflows/build.yml - GitHub Releases · Receives and serves packaged builds.
- Prebuilt IPA
packages/com.pakeplus.xiao.shen_0.0.1.ipa
Connections 18
- Xcode project → SwiftUI app entry: builds
- Xcode project → App metadata & capabilities: includes
- Xcode project → Branding assets: includes
- SwiftUI app entry → Content host: creates scene
- Content host → Sidebar navigation: composes
- Content host → Tab navigation: composes
- Content host → WebView bridge: presents
- WebView bridge → Bundled web page: loads packaged
- WebView bridge → Remote target page: navigates to
- WebView bridge → Injected custom JS: injects
- WebView bridge → Bundled web console: loads debugging support
- Package orchestration → Packaging worker: orchestrates
- Packaging worker → Packaging web resources: uses
- Packaging worker → GitHub Actions build: drives cloud packaging
- GitHub Actions build → Xcode project: builds
- GitHub Actions build → Prebuilt IPA: produces
- GitHub Actions build → GitHub Releases: publishes
- GitHub Releases → Prebuilt IPA: distributes