Skip to content

Merge fork: SideInstaller 0.9.164 — features, fixes and Chinese localization - #174

Open
wozofa-ship-it wants to merge 547 commits into
FrizzleM:mainfrom
wozofa-ship-it:main
Open

wozofa-ship-it wants to merge 547 commits into
FrizzleM:mainfrom
wozofa-ship-it:main

Conversation

@wozofa-ship-it

Copy link
Copy Markdown

This PR merges the wozofa-ship-it fork (0.9.139 - 0.9.164) back into upstream, for review. It is based on upstream 2.2.0 (merged into the fork at 0.9.139), so it contains no upstream changes that are not already in main.

Highlights since 2.2.0:

  • Wired up what the 2.2.0 merge brought in: JIT, Sources, Shortcuts entries
  • Signing: per-app + per-Apple-ID picker, enterprise certificate flow, cert expiry notices, dev-cert expiry notice
  • Renewal: only apps signed by the currently logged-in team are renewable (enterprise certs never enter ID renewal)
  • Downloads: source download queue, pause/resume, progress + speed/ETA, cellular confirmation, free-space precheck
  • Files/Apps: batch install, install history with one-tap reinstall, search/sort, file metadata, IPA export
  • Updates: per-row version tap-to-update, source update badge, downgrade check, MinimumOSVersion pre-check
  • Full Chinese localization (9 string tables)
  • Many bug fixes, including the install-page back-button trap and floating-window menu tap pass-through

539 commits, ~300 files changed. Happy to split it into smaller PRs if you prefer — just say which area first.

CZF and others added 30 commits October 22, 2026 20:19
…ith_cert(Swift Security 解 p12 取证书+私钥 DER,Rust 组装 identity/profile/team 调 isideload 同一套 sign 本地签名,不走 Apple ID/网络、不改 bundle id);安装页加企业证书签名卡(导入 p12+描述文件+密码,一键签名并安装,复用配对/隧道/安装管线)
…版本与 isideload 对齐);plist from_reader 需要 Seek,改用 Cursor
…)、选 IPA 签名(文件导入/文件库选择)、签名前修改(名称/Bundle ID/版本/最低系统版本/图标,Rust 侧签名前写 Info.plist+换图标文件+write_info 落盘)、仅签名存「已签名」(Rust 打包出 IPA 保留 unix 权限位)、已签名列表(安装/分享/删除,安装走解包直装不再重签)。文件页:Documents 递归文件管理(导入/分享/删除/去签名/已签直装)。Rust 新增 si_sign_ipa_with_cert_ex(JSON 修改项)+ si_extract_ipa,zip 依赖与 isideload 同 spec。安装页原卡片与原 FFI 不动。
…ideInstallerFFI(FFI 是 clang module,Engine.swift 有导入所以那边没事),补一行导入
…n, file manager+

- 安装页去掉重复的企业证书签名卡(功能全在证书页)
- 应用源:证书备齐时安装按钮变下拉菜单,可直接企业证书签名安装
- 插件注入:证书页签名卡加「插件注入」,支持 .dylib/.deb(gz)/.zip,
  Rust 侧注入 Frameworks + 主程序加 LC_LOAD_DYLIB,跟随整包签名
- 文件页:多选(压缩成 ZIP/批量删除)、重命名、单文件压缩、zip 解压
  (新增 si_zip_create / si_unzip_archive FFI,已签清单改名同步)
- Mach-O:文件页长按文件看依赖(按架构列 load/weak/reexport/id+rpath),
  左滑删依赖/改名(Rust si_macho_info / si_macho_edit,删是移动命令区、
  改名受原命令长度限制)
- 局域网传输:文件页开关,NWListener 起极简 HTTP 服务(8088-8098),
  浏览器列表/下载(分块流式)/上传(multipart)/删除,路径钉死 Documents
- Info.plist 本地网络说明补上文件传输用途
# Conflicts:
#	.github/workflows/update-altsource.yml
#	.gitignore
#	CHANGELOG.md
#	NOTES.md
#	README.md
#	app-icon.png
#	build-rust.sh
#	ios-app/AboutView.swift
#	ios-app/AccountViews.swift
#	ios-app/AnisetteServers.swift
#	ios-app/AppsView.swift
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon-20@2x.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon-20@2x~ipad.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon-20@3x.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon-20~ipad.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon-29.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon-29@2x.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon-29@2x~ipad.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon-29@3x.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon-29~ipad.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon-40@2x.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon-40@2x~ipad.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon-40@3x.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon-40~ipad.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon-60@2x~car.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon-60@3x~car.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5@2x~ipad.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon-Dark.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon-Tinted.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon@2x.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon@2x~ipad.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon@3x.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon~ios-marketing.png
#	ios-app/Assets.xcassets/AppIcon.appiconset/AppIcon~ipad.png
#	ios-app/Assets.xcassets/AppLogo.imageset/AppLogo.png
#	ios-app/CertManager.swift
#	ios-app/CertsView.swift
#	ios-app/ChineseStrings.swift
#	ios-app/ContentView.swift
#	ios-app/DeviceConnection.swift
#	ios-app/Engine.swift
#	ios-app/EntitlementsView.swift
#	ios-app/FrenchStrings.swift
#	ios-app/Info.plist
#	ios-app/ItalianStrings.swift
#	ios-app/JapaneseStrings.swift
#	ios-app/LocalNetworkAuthorization.swift
#	ios-app/Localization.swift
#	ios-app/LocationView.swift
#	ios-app/NetworkStatus.swift
#	ios-app/PairingController.swift
#	ios-app/PairingLiveActivity.swift
#	ios-app/PairingTargets.swift
#	ios-app/PairingView.swift
#	ios-app/PortugueseStrings.swift
#	ios-app/RootView.swift
#	ios-app/SettingsView.swift
#	ios-app/SideBySideView.swift
#	ios-app/SideInstallerApp.swift
#	ios-app/SideStoreDownloader.swift
#	ios-app/SpanishStrings.swift
#	ios-app/Theme.swift
#	ios-app/UpdateChecker.swift
#	ios-app/VietnameseStrings.swift
#	ios-app/WelcomeView.swift
#	ios-live-activity/PairingActivityWidget.swift
#	ish/sideinstaller.py
#	project.yml
#	rust-core/Cargo.lock
#	rust-core/Cargo.toml
#	rust-core/include/sideinstaller.h
#	rust-core/src/account.rs
#	rust-core/src/apple_session.rs
#	rust-core/src/certs.rs
#	rust-core/src/lib.rs
#	rust-core/src/pairing.rs
#	rust-core/vendor/isideload/README.md
#	rust-core/vendor/isideload/src/anisette/mod.rs
#	rust-core/vendor/isideload/src/anisette/remote_v3/mod.rs
#	rust-core/vendor/isideload/src/auth/apple_account.rs
#	rust-core/vendor/isideload/src/sideload/application.rs
#	rust-core/vendor/isideload/src/sideload/cert_identity.rs
#	rust-core/vendor/isideload/src/sideload/sideloader.rs
#	scripts/export-ipa.sh
- 分享/“打开方式”进来的 IPA:导入成功后直接起安装管线,与点安装按钮同一套检查(证书、配对、WiFi、隧道)
- Info.plist 补 .install.*:iOS 26 后台继续任务的代码早已写好,但许可列表里一直没有这一项、永远提交不上去,安装在后台只剩 30 秒宽限;补上后切后台也能继续装
retrieve_existing 只要 4 参(email、dev、team、storage),cert_export_p12 多传了 machine_name 致 E0061,错位又带出 E0277。删一行,与 account.rs 已有的正确写法一致。
Live Activity widget 引用 InstallActivityAttributes,但 project.yml 的扩展 target 只共享了 PairingActivityAttributes,没共享它,致 Swift 编译 9 报错。补一行,照抄既有做法;该文件只引 ActivityKit 与 Foundation,无其他依赖。
… upstream Engine members, AppIDCost, Popup cases; fork AppAppearance, NetworkStatus summarize, AppInfo minOS; SIPairResult device_address header; submit rename
…hange for certificateToImport, drop redundant await on sync submit/runOneClick
…y limit, report a problem

Resolve 10 conflicts, keep fork features: cert export p12 (not per-cert export/revoke), auto-refresh + BGTask, appearance, cert/files tabs, refresh-all shortcut. Take upstream where self-contained: developer-mode detection for tunnel errors, pairing advert, link popups, SideStore pairing request, sounds toggle, Bonjour services.
CZF and others added 30 commits November 25, 2026 17:00
…export/import, downloads rename

P0: the Install page is a full-screen cover over the tab bar — the tab bar
and its pill are unreachable from inside it, the header chevron only opens
the step list, and the X cancels the run. A run in flight left the user
stuck on the page with no way out. A Back button (top left) now dismisses
the page without touching the run; the pill at the bottom of the tabs brings
it back with its progress.
B1: a link that arrived mid-run used to sit in pendingLink while finished
made popups return only finishedPopups — it never showed until a later run
failed. It joins the finished popups now; a second link logs that it
superseded the waiting one instead of silently dropping it; an invalid link
that arrived mid-run is parked and shown as an error card once the run ends
(finished or failed) instead of vanishing into the log.
B2: SourcesManager.refresh restores each row's pre-refresh state on cancel
(CancellationError / URLError(.cancelled)), SourceStore.fetch style — a
cancelled refresh no longer leaves a fake 'Couldn't reach the source' row.
F1: per-source enable switch on both source rows. A disabled source stays
listed and keeps its disk cache, but is never fetched (fetchAll, refresh,
checkAtLaunch, direct fetch) and never counts toward updates (listings /
updateCount, so the Settings badge follows). State lives in
UnifiedSourceList (CZFDisabledSourceURLs), both stores mirror it.
F2: the Sources page exports the whole source list as text (one URL per
line, system share sheet) and imports the same format back from the
clipboard, each line through the normal add path, with an
imported/already-added/failed summary.
F3: downloads rows gain Rename (swipe action + the Files page's rename
alert). Validation and the .ipa suffix rule are shared through
FilesTabView.validatedRenameName; the guards mirror delete (a file an
install / signing / renewal run is reading can't move), and the pairing is
re-matched after the move so renewal follows the new name.
6 new L() keys in all 9 tables; check_translations.py --base 14b48c7 clean
(0 new missing). Renewal untouched. B3/B4/B5/U1 deferred to 0.9.153.
… sort; source fetch cap, folder/rename errors, update gate retry

F1: single-app refresh — the app row gets a trailing swipe action and the
detail page a 'Renew this app' button, both calling the existing
refreshAll(onlyBundleIDs:) with only that bundle ID. A new fromUI flag
keeps the UI failure popups for this entry (the auto-patrol/shortcut
entries stay silent); guards and team filtering are untouched.
F2: source downloads survive leaving the page — IPADownloader becomes a
shared instance, the detail page no longer cancels it on disappear, the
row keeps an explicit Cancel button, and a finished download posts a
local notification (existing launch-time permission flow; a refused
permission only logs). The imported IPA lands in Downloads as before.
F4: certificates sort by expiresAt ascending, no-expiry last; only the
three list assignments change, revoke/export untouched.
B3: SourcesManager.fetch gets the same 10MB body cap as
SourceStore.fetchSourceDocument (declared length + received bytes), new
FetchError.tooLarge reusing the 'Source is too large' copy.
B4: an illegal folder/rename name no longer closes the alert silently —
both write the existing 'Names can't be empty...' message to
opMessage/opFailed, the same road as the duplicate-name refusal.
B5: a failed release gate no longer stamps the daily check — the stamp
is only set once the gate passes (or there is nothing newer to gate),
so the About row retries on the next launch instead of staying static
for 24 hours. The 'up to date' stamp is unchanged.
…t; clear-all mutex, refresh spinner wait, install-history save log
… Transferable (simulator check: ShareLink found no matching init)
…review (simulator check failed twice without one; only URL/String carry a default preview)
…he first parameter; parenthesised closure was read as its argument)
…e, free-space line; unknown-length progress, stale-download kill, SecIdentity casts
…pe is a hard error (checks: conditional downcast will always succeed, EnterpriseCert 381/502/535)
… task, and the unknown-total byte gate must live in the Sendable throttler, not MainActor state (checks: optional chaining on non-optional; main actor-isolated property from nonisolated context)
…ources tab update badge; clear stale unknown-length bytes, history reinstall guard feedback, cancelled pairing no longer shows failed
…d and ETA, enterprise certificate expiry notice; finished-run cellular prompt, Sources badge recount, drop dead pairingStatus
…Modifier — the body's chain was too long for the compiler to type-check (RootView:251)
…ng-only filter; purge stale resume data, enterprise history signer, history reload after reinstall
…tore — qualify the two call sites (checks red: type 'Self' has no member)
…otice; Side by Side unknown-iOS block, copy-log task handle, IPADownloader cancellation handler
…-all failed; downloads renewal-delete warning, shortcuts source-after-import, location busy notice
…urce last-checked; history single reinstall waits out the run, stale downgrade flag, partial pairing-write report
…T last-app rerun; history reinstall + shortcuts install already-running guards, auto-refresh load wait cancellation
…56; stale run errors, guide-first shortcut/About errors, pairing-vs-install link race

F-1: IPADownloader gains a FIFO queue — tapping several source rows downloads them one after another instead of the new tap cancelling the old one; rows show Queued, the Downloads page lists the queue under the running row, and a landed download waits out a running install before importing.
F-2: revoking a certificate lists the installed apps signed under its team in the confirm box (matched by team — profiles carry no certificate serial).
F-3: the file detail page shows an IPA's SHA-256 (hashed off the main thread, long-press to copy).
B-1: the three run entries clear lastError/guide up front, so a run the guards stop no longer reports the previous run's error; the log-only tunnel/off and old-iOS branches now leave a fresh reason too.
B-2: Shortcuts install and About self-update read the guide before lastError, like history reinstall and batch install already did.
B-3: runOneClick refuses while a pairing file is generating, and pairThisDevice no longer drops the device link when an install started mid-generation.
…etry, bounded reinstall waits, pairing-vs-install guards

F-1: Location route loops from the start when the Loop switch is on
(default off; Play GPX Route shortcut gains a Loop parameter).
F-2: Downloads and Files IPA rows tag newer/older/same vs installed.
F-3: history rows reveal their IPA in Downloads (scroll + highlight).
B-1: source Try again clears the stuck .failed state before retrying.
B-2: history reinstall and self-update waits time out after 10 minutes
and can be cancelled; the install itself keeps going on Install page.
B-3: pairing Generate refuses while an install runs; enterprise-cert
and signed-IPA installs refuse while a pairing file is being generated
(both entries now @mainactor, as runOneClick is).
checks 45744619807: LocationShortcuts.swift:347 extra argument
'wrappedValue' — the Loop parameter's default: false in @parameter
already supplies the value (TravelToPlaceIntent's default: .walk
precedent: no initializer on the property). Drop '= false'.
…; cancel/pause resume-data fixes, downgrade row copy

F-1: signed rows show days left / due today / expired from the
provision ExpirationDate — written at sign time, backfilled for old
records by fillMissingCertInfo (team-independent).
F-2: cert expiry banner lists the affected installed apps, reusing
affectedApps() and the revoke confirm's first-5 + N-more truncation.
F-3: install history gains a search bar (title / signer, in-memory).
B-1: cancel's resume-data callback saves to disk unguarded — the old
currentTask == nil guard always failed once the pump started the next
queued download, losing both copies of the point.
B-2: pause() cancels by producing resume data instead of a bare
suspend(), so a kill no longer loses the point; resume() restarts the
same request from it. Pause is not cancel: the slot stays held.
B-3: source rows no longer say 'up to date' when the source lags the
installed version — the 0.9.164 comparison tag is shown instead, in
both the list row and the detail page; install still asks first.
…ation after routes; cellular prompt queue, custom-import move guard, downgrade-decline counts as skipped

F-1: install history gains an All / Succeeded / Failed segmented filter under the search bar, stacking with the search text (in-memory filter on the stored success field).
F-2: source rows show the minimum iOS (iOS 17.0+) in metaLine when the source states minOSVersion; sources without it show no empty segment. The detail page's SourceVersion has no such field, untouched.
F-3: routes gain a 'Restore real location when done' switch (off by default); when on, both end paths (stopped mid-route, played to the end) hand the device its real location back through the existing resetLocation(), and the GPX help line says so.
B-1: a second cellular-download confirmation queues behind the prompt on screen instead of declining silently; answering presents the next queued prompt, cancelling a queued waiter declines only that one.
B-2: moving the Install tab's current custom import asks first; after any move into or out of Custom/ the Install tab refreshes via refreshCustomIPA(). Renaming an IPA inside Custom/ refreshes the slot label the same way.
B-3: Reinstall all counts a declined downgrade as skipped, not failed; the file-page batch install gains a declined flag on BatchInstallOutcome and reports those items as skipped, apart from failures.
…ned default

checks FrizzleM#123 went red on one line: Engine.swift:2662 'extra argument
declined in call'. A property default alone does not give the synthesized
memberwise initializer a default argument, so the declined: true call
had no matching init. The explicit init below carries declined: Bool =
false, and every other call site keeps its three-argument form.
…-failure restore, source min-iOS pre-check, Signed subfolder navigation

F-1: the Files page gains an All / IPA / ZIP / Folder segmented filter under the signed/unsigned picker, stacking with the tab and the search (filteredIPAs, the other/system flat list, and visibleDirItems all apply it); system files stay in their group, only filtered by type like everything else.
F-2: the file detail sheet gains a read-only Entitlements section for IPAs, parsed off the main thread from embedded.mobileprovision (capabilityKeys, boilerplate already excluded); no (readable) profile means no section.
F-3: install history gains a toolbar export (ShareLink with an explicit preview, LogExportFile's pattern) writing the filtered entries to a .txt file; content follows the on-screen result filter + search.
B-1: a failed send mid-route now restores the real location when the switch is on, like the stopped and finished paths; with the switch off the playback error is kept as before.
B-2: source installs refuse before downloading when the app's minOSVersion is above this iPhone (startInstall and startCertInstall, before the cellular prompt), with the same wording as runOneClick's post-download guard.
B-3: Signed/ subfolder IPAs count as signed (isInSignedDir is now the Signed subtree, not only Signed/ itself), folders show in both tabs so Signed/ subfolders can be entered, the folder count uses the filtered number, and the empty state distinguishes search-no-match from filter-emptied.
…nk; Signed path-keyed records, update-all min-iOS pre-filter, locate clears type filter

F-1: install history records the installed app's bundle ID (signed ID; nil when the run never reached signing, never invented) at all 6 write points (Engine finishSuccess + 3 failure paths, SideBySide success + failure); old entries decode to nil. Search filters by title / identity / bundle ID, rows show the bundle ID when recorded, and historyIPAURL matches by bundle ID first (exact, or the signed ID's .<teamID> suffix over the IPA's ID) — a recorded ID with no bundle-ID match returns nil instead of falling back to name matching and reinstalling the wrong clone; nil-ID entries keep the old name matching.
F-2: SourceVersion decodes optional minOSVersion (sources without it omit the part) and versionMeta appends 'iOS x+' — one place, so the newest-version header and every history row show it. SourcesManager.install reuses startInstall's pre-check (SideStoreDownloader.runs) and returns Bool; the detail page routes both the main button and the downgrade confirm through one helper that shows the same needs-iOS reason instead of silently doing nothing.
F-3: each version-history row gains a copy button for version.downloadURL (source row's Copy link pattern) with a 'Copied' notice.
B-1: SignedIPARecord gains relativePath (old records fall back to root fileName); url(for)/load()/add/remove/forget/batch-remove/fill-merge/rename all match by pathKey (relative path) instead of fileName, id is the pathKey, and FilesTabView single/batch delete match by URL like installSignedFile; moveItemToFolder and rename sync the record path via updatePath (folder moves rebase children, moves out of Signed keep the old path so moving back restores); WebDAV PUT/DELETE and LAN delete lookups match by URL too.
B-2: startUpdateAll pre-filters minOS-mismatched apps out of targets before the cellular prompt and the downloads, and lists them in the summary with the startInstall wording; all-filtered batches skip the prompt and go straight to the summary.
B-3: locateFile clears fileTypeFilter to .all and picks the tab by target type (IPA in the Signed tree -> signed tab, everything else -> unsigned tab), so a non-IPA file in Signed/ no longer vanishes after 'Show in Downloads'.
…fore success

checks FrizzleM#126 red, one error only: InstallHistoryStore.swift:105
'argument bundleID must precede argument success' — the struct
declares bundleID before success, so the memberwise init takes it in
that order. Reordered; the record path already had it right.
… detail expiry; clone-safe history match, update-all downgrade skip, Signed-subfolder record sync

F-1: source search also matches Bundle ID (displayedApps filter adds bundleIdentifier contains) — history and Files searches already did since 0.9.168, pasting an ID into the source list found nothing.
F-2: history export appends the Bundle ID at the end of each line when recorded, so two same-name clones stay distinguishable in the .txt.
F-3: FileDetailSheet gains optional expiresAt (caller reads it off the Signed record); signed IPAs show a certificate-expiry row — date + remaining days, natural-day algorithm same as FilesTabView.remainingDays / EnterpriseCertView.remainingText. Unsigned IPAs show no such row. No new translation keys (label and suffix keys already exist).
B-1: historyIPAURL's two-way hasPrefix could reinstall the wrong clone (clone row matched the original IPA, original row matched a clone IPA). Predicate now reuses ProfileMatcher.installed: exact match, or recorded ID = IPA ID + one 10-char team suffix; a clone segment (.2) is not a team suffix. historyMissIsCloneMismatch tells the nil prompt apart: no same-name IPA vs the library copy is another clone (new L key in all 9 tables; an IPA that won't parse falls back to the generic prompt). Candidate scan factored into historyCandidates, behaviour unchanged.
B-2: startUpdateAll counts outcome.declined into its own skipped bucket (Files batch and history Reinstall all already did; this was the third site 0.9.166 B-3 missed) — un-run fill counts all three buckets, summary appends the Files-batch wording for skipped items.
B-3: WebDAV PUT/DELETE and LAN delete's relDir == "Signed" root-only check becomes the isInSignedDir subtree check, so a signed IPA in Signed/<subfolder>/ gets its record forgotten on overwrite and removed on delete instead of going stale / resurrecting.
checks #45765743843 red, one error only: SourcesView.swift:1036
'value of optional type String? must be unwrapped' — the declined
suffix used += on the optional summary. Assign the unwrapped
concatenation instead; both branches above just assigned non-nil,
so the ?? "" never fires.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant