[Bug] An app's own ExtensionKit extension stops working after signing with a new bundle id

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
ios, swift
領域
desktop, mobile

調査の方向性

Start in SigningHandler.swift at _modifyPluginIdentifiers, where CFBundleIdentifier is already rewritten, and check how the extension's Info.plist and the Extensions/*.appexpt keys are handled alongside it. Confirm the old app bundle id appears in EXAppExtensionAttributes and the appexpt keys before changing anything. Done means both values follow the new bundle id, which needs a signed build to verify on device.

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

説明

bug
Report

I make Empo, which ships an ExtensionKit extension in Empo.app/Extensions/ that attaches to an extension point the app declares itself (sh.mateo.empo.game-process, declared in Extensions/Empo.appexpt).

When I sign it with Feather and change the bundle id, the install works, but the app can't find its own extension. AppExtensionPoint.Monitor fails with "Host is not entitled observe" (com.apple.extensionKit.errorDomain, code 16), but an Xcode install of the same app works though.

The problem issthat Feather renames the bundle id of the extension, but the extension point name keeps the old bundle id in 2 places:

  • EXAppExtensionAttributes passed to EXExtensionPointIdentifier in the extension's Info.plist
  • the keys of Extensions/*.appexpt in the main app

iOS only lets an app watch extension points named after its own bundle id, so the old name doesn't match anymore

Proposed fix: in _modifyPluginIdentifiers in SigningHandler.swift, rename those 2 values the same way as CFBundleIdentifier, by swapping the old app bundle id for the new one.

zsign has the same gap: https://github.com/zhlynn/zsign/pull/415.

Request Agreement
  • I have read the requirements for opening an issue above
Contributor Checks
  • I am willing to attempt to make a pull request to fix this bug
主要言語
Swift
スター
4.8k
フォーク
430
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

claration/feather のほかの issue

claration/feather の issue をすべて見る

似ている issue

Swift の issue をもっと見る

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

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