Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Feature Request] Support for Webview/Next.js App Wrapping (iOS & Android)

未关闭
#359 3 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
12/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
活跃
技术栈
android, ios, nextjs, react, swift

调研方向

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 内容生成。

描述

enhancement
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
  1. 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.
  2. Local Storage & State Persistence:
    • Out-of-the-box configuration enabling web storage persistence (localStorage, IndexedDB) inside the native container without random OS cache clears.
  3. 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.
  4. 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

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

xtool-org/xtool 的其他 Issue

查看 xtool-org/xtool 的全部 Issue

相似的 Issue

更多 Swift Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。