Extensions inside an embedded watch app are not renamed or signed (AppexBundleIDNotPrefixed)

オープン
#326 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust
領域
mobile-dev

調査の方向性

Start in crates/plume_utils/src/bundle.rs at collect_embeded_bundles_from_dir and trace how nested bundles are collected and passed to identifier matching, registration, and signing. Check how collect_bundles_sorted orders nested bundles, then add coverage for a widget extension inside Watch.app. Done means the nested extension is collected and receives the expected identifier and signing flow.

索引モデルが issue の本文から書いたものです。

説明

What happens

Installing an IPA whose watch app contains a widget extension (watch complications) fails on the device:

AppexBundleIDNotPrefixed (Appex bundle at ".../App.app/Watch/Watch.app/PlugIns/Widget.appex"
with identifier "com.example.app.watchkitapp.widget" does not have expected identifier prefix
"com.example.app.<TEAMID>.watchkitapp.")

The layout is the usual one for a single-target watchOS app (WKApplication) with a WidgetKit extension:

Payload/App.app
├── PlugIns/AppWidget.appex          ← renamed and signed, fine
└── Watch/Watch.app                  ← renamed and signed, fine
    └── PlugIns/Widget.appex         ← never renamed, registered or signed
Cause

collect_embeded_bundles_from_dir in crates/plume_utils/src/bundle.rs does not descend into a nested .app:

if bundle.bundle_type != BundleType::App {
    if let Ok(embedded) = bundle.collect_nested_bundles() {
        bundles.extend(embedded);
    }
}

So the watch app is collected, gets the new identifier from set_matching_identifier and is signed, but the extension inside
it is never collected. Its identifier keeps the old prefix, it gets no app ID or profile, and installd rejects the IPA.

Suggestion

Also collect the bundles inside an embedded .app (for example everything under Watch/*.app), so that
set_matching_identifier, app ID registration and signing reach Watch.app/PlugIns/*.appex too. collect_bundles_sorted
already sorts by depth, so they would still be signed from the inside out.

Seen with

Impactor on Windows, a free Apple ID, an IPA built unsigned with xcodebuild and ad-hoc signed with each part's
entitlements (an app group shared by the app, its widget, the watch app and the watch widget). The code above is from
main as of v2.7.3.

主要言語
Rust
スター
3.4k
フォーク
224
平均マージ
34分
マージ済み PR(30日)
2

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

claration/impactor のほかの issue

claration/impactor の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。