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

Open
#744 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
ios, swift
Domain
desktop, mobile

Research direction

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.

Written by the indexing model from the issue text.

Description

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
Dominant language
Swift
Stars
4.8k
Forks
430
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from claration/feather

All issues in claration/feather

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.