Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

Repository files navigation

Weather iOS

Build iOS IPA

以 SwiftUI + WKWebView 打造的原生 iOS 外殼 App,全螢幕載入網頁服務 weather.shan33.dpdns.org,並透過 GitHub Actions 免費 macOS Runner 在雲端自動編譯出 .ipa

功能特色

  • 全螢幕 WKWebView 載入網頁,隱藏安全區域(edge-to-edge)
  • 原生 UIRefreshControl 下拉刷新,網頁載入完成後自動收起
  • 支援邊緣滑動返回/前進手勢導覽
  • App 圖示由 icon.png 在 CI 中自動縮放為 1024×1024(sips),免手動處理
  • NSAppTransportSecurity → AllowsArbitraryLoads:允許載入非 HTTPS 資源
  • 內建定位權限說明文字(NSLocationWhenInUseUsageDescription)

專案結構

.
├── .github/workflows/build_ipa.yml   # GitHub Actions 雲端打包流程
├── project.yml                       # XcodeGen 專案定義(CI 上自動生成 .xcodeproj)
├── icon.png                          # App 圖示來源檔
└── Weather/
    ├── App.swift                     # @main 入口
    ├── ContentView.swift             # 根視圖
    ├── WebView.swift                 # WKWebView + 下拉刷新封裝
    ├── Info.plist                    # ATS、定位權限、版本資訊
    └── Assets.xcassets/
        └── AppIcon.appiconset/       # 圖示(實體 png 由 CI 生成)

CI/CD 雲端打包

.github/workflows/build_ipa.yml 的執行流程(macos-latest):

  1. Checkout 程式碼
  2. sips 將 icon.png 轉為 1024×1024 PNG 放入 AppIcon.appiconset
  3. brew install xcodegen → xcodegen generate 產生 Weather.xcodeproj
  4. xcodebuild Release 編譯(iphoneos SDK、arm64、無簽名 CODE_SIGNING_ALLOWED=NO)
  5. .app 放入 Payload/ 壓縮成 Weather.ipa
  6. 上傳為 Artifact(保留 90 天),可選擇附加到 GitHub Release

觸發條件

方式 說明
Push 到 main 修改 Weather/**、project.yml、icon.png 或 workflow 本身時自動觸發
手動觸發 Actions 分頁 → Build iOS IPA → Run workflow,可勾選「同時建立 GitHub Release」
Push tag(v*) 例如 v1.0.0,自動建立 Release 並附上 .ipa

下載 Weather.ipa

  1. 前往 Releases 分頁
  2. 點選最新版本
  3. 下載 Weather-ipa.zip(或是直接下載 Releases 版本內提供的 .ipa 檔)

安裝到 iPhone(未簽名 IPA)

本專案產出的是未簽名 .ipa,需透過以下方式安裝:

工具 平台 說明
Sideloadly Windows / macOS 插 USB + Apple ID 免費簽名,憑證 7 天有效
AltStore Windows / macOS 同上,透過 AltServer 可自動續簽
TrollStore iOS(限特定版本) 永久簽名,免 Apple ID

本地開發(需 Mac)

brew install xcodegen
xcodegen generate
open Weather.xcodeproj

以 Xcode 開啟後選擇模擬器即可執行(Cmd + R)。

客製化

想改什麼 改哪裡
載入的網址 Weather/ContentView.swift 內的 urlString
App 顯示名稱 Weather/Info.plist 的 CFBundleDisplayName
版本號 project.yml 的 MARKETING_VERSION
Bundle ID project.yml 的 PRODUCT_BUNDLE_IDENTIFIER
圖示 直接替換根目錄 icon.png

相關連結

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages