[Feature Request] Support for Webview/Next.js App Wrapping (iOS & Android)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 12/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 活跃
- 技术栈
- android, ios, nextjs, react, swift
- 领域
- build-system, mobile, tooling
调研方向
The payload names no source files, so start by finding how xtool new templates and xtool build are wired in the repository, and whether a template mechanism already exists. This is open design work with four separate sub-features and no maintainer decision yet. Done means a maintainer has agreed on the scope and split it into smaller issues, such as a WKWebView template first.
由索引模型根据 Issue 内容生成。
描述
Feature Description
Provide a way or project template in xtool to package local web applications (such as Next.js, React, or standard HTML/JS web apps) into a native iOS (and eventually Android) application wrapper.
Use Case & Background
Many developers build full-stack or highly interactive web applications using Next.js. However, converting these apps to native mobile using tools like React Native / Expo often requires extensive code rewrites. On the other hand, frameworks like Capacitor or Tauri can be complex to configure for custom local API proxying and offline storage persistence.
Since xtool serves as a powerful cross-platform build tool for SwiftPM and Apple ecosystem targets without needing full Xcode, having first-class support for wrapping web apps would unlock iOS (and Android) deployment for web developers running on Linux, Windows (WSL), or macOS.
Suggested Functionality
- Webview Project Template (
xtool new my-web-app --template webview):- A declarative SwiftPM project template featuring a full-screen
WKWebView(iOS) configured to load static exported bundles or local development servers.
- A declarative SwiftPM project template featuring a full-screen
- Local Storage & State Persistence:
- Out-of-the-box configuration enabling web storage persistence (
localStorage,IndexedDB) inside the native container without random OS cache clears.
- Out-of-the-box configuration enabling web storage persistence (
- Local API / Network Proxy Support:
- Native network handling or bridging so client-side API requests / proxies run locally inside the app bundle without CORS or transport restriction issues.
- Android Target / Cross-Platform Expansion:
- Roadmap support or tooling to output an Android bundle alongside iOS from the same web assets.
Alternatives Considered
- Expo / React Native: Requires rewriting components and UI libraries from React/Next.js web code.
- Capacitor / Tauri: Difficulties with custom local API proxy setups and running full Next.js workflows cleanly.
Additional Context
Providing a streamlined CLI command (e.g., xtool build --web-dir ./out) would allow Next.js users who use output: 'export' to immediately compile and deploy native iOS apps from Linux, macOS, or Windows directly to physical devices.
- 主要语言
- Swift
- 星标
- 5.5k
- 派生
- 163
- 平均合并
- 19 小时 33 分钟
- 30 天内合并 PR
- 25
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
xtool-org/xtool 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 63/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
维护者通常 1 天内回复
-
bug
难度 3/5 1-2 天 新手友好度 45/100
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 20/100
xtool-org/xtool#364 · 9 个 reaction ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
Lakr233/vphone-cli#745 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 83/100
cucumberswift/CucumberSwift#495 ·
维护者通常 1 天内回复
-
enhancement good first issue help wanted
难度 2/5 1-3 小时 新手友好度 82/100
omlahore/RemoveMacAI#91 ·
维护者通常 1 天内回复