Resource bundles inside PlugIns are treated as app extensions (AltSign.Error 4: Could not find matching provisioning profile)
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 62/100
Direzione di ricerca
The failing loop is in ResignAppOperation.swift: it walks appBundle.builtInPlugInsURL and calls prepare() on every child Bundle(url:) can open, so the profiles[identifier] guard throws for resource bundles. Read that loop and the existing .xctest skip, then check whether the ALTError cases are thrown from prepare(). Done when non-.appex children such as ClipViewerKitResources.bundle are skipped before the profile lookup and an app with resource bundles in PlugIns resigns without AltSign.Error 4.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
ResignAppOperation.prepareAppBundle treats every direct child of PlugIns as an app extension and requires a provisioning profile for it. Many shipping apps keep resource .bundle packages in PlugIns. Those bundles are not extensions. codesign signs them as part of the parent app, and they do not need their own profile.
AltStore throws ALTError.missingProvisioningProfile during prepare(), before ALTSigner.signApp. Resign never starts.
Observed error
The alert shown by AltStore is:
AltSign.Error 4
Could not find matching provisioning profile.
AltSign.Error 4 is ALTError.missingProvisioningProfile, thrown here:
guard let identifier = bundle.bundleIdentifier else { throw ALTError(.missingAppBundle) }
guard let profile = profiles[identifier] else { throw ALTError(.missingProvisioningProfile) }
The on-device notification looks like this:

This is not a later codesign failure such as 0xe8008015 ("A valid provisioning profile for this executable was not found"). The profile lookup fails inside prepare(), so ALTSigner.signApp is never called.
If CFBundleIdentifier is removed from the resource bundle, the first guard fails instead and the alert becomes ALTError.missingAppBundle ("Could not find app bundle.").
Where it fails
On branch marketplace, ResignAppOperation.swift walks appBundle.builtInPlugInsURL with .skipsSubdirectoryDescendants and calls prepare() on every child that Bundle(url:) can open.
The only child that is skipped is an embedded .xctest bundle, and only in DEBUG. There is no .appex filter.
profiles is keyed by the original bundle identifiers of the app and its real extensions. A resource bundle's CFBundleIdentifier is never in that dictionary, so the second guard always fails with AltSign.Error 4.
Why this is not a codesign requirement
A resource bundle loaded with pathForResource:ofType:inDirectory: is data, not a separate process. Xcode signs it as part of the parent. Only a real .appex (its own executable, its own App ID) needs a provisioning profile.
Two nearby workarounds both fail:
- Stripping
CFBundleIdentifierfrom the bundle'sInfo.plistmakesbundle.bundleIdentifiernil, so the firstguardthrowsALTError.missingAppBundleinstead ofAltSign.Error 4. - Deleting the bundles lets resign succeed, but the app crashes at launch if a framework
fatalErrors when its resource bundle is missing.
Example: VK App 8.183
Installing this IPA with AltStore reproduces AltSign.Error 4, Could not find matching provisioning profile. Installing the same build with Xcode succeeds, because Xcode does not require a separate profile for resource bundles.
The official VK client IPA has two different kinds of children directly under VK.app/PlugIns:
- 7 real extensions (
.appex): Notification Service, Photo Feed Today, Share, Siri Intents, Start Call Intent, WidgetKit, and VK Broadcast. These are separate processes and do need profiles. - 146 resource bundles (
.bundle), includingClipViewerKitResources.bundle. These are resource packages. Several frameworks resolve them withpathForResource:ofType:inDirectory:and abort if the bundle file is gone.ClipViewerKitis one of them.
Each of those .bundle directories has an Info.plist with a CFBundleIdentifier, so Bundle(url:) succeeds and prepare() demands a profile. A free or personal team cannot create 146 extra App IDs for resource packages, and those identifiers are not extension App IDs in the first place.
After the 146 .bundle directories were moved out of PlugIns (the bundles themselves were kept, and the in-binary directory name used to find them was updated to the new location), the same IPA resigned and installed. AltSign.Error 4 no longer appeared. That confirms the failure is the PlugIns walk, not the main app's profile, the certificate, or the extension profiles.
Suggested change
Only call prepare() for real app extensions. For example, skip any PlugIns child whose path extension is not appex (the existing .xctest removal can stay). Resource .bundle packages, and any other non-extension child, should be left for the parent signature.
Empty or missing PlugIns already works. The change is to ignore children that are not extensions, instead of requiring a profile for every child Bundle(url:) can open.
Workaround we verified
On the IPA side, move resource .bundle directories out of PlugIns into another directory, and update the path the binary uses to load them. Do not delete the bundles, and do not only delete CFBundleIdentifier. Once PlugIns no longer contains those bundles, AltStore resigns the IPA and AltSign.Error 4 is gone.
- Lingua principale
- Swift
- Stelle
- 15.1k
- Fork
- 1.8k
- Merge medio
- 5g 16h
- PR unite (30g)
- 1
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di altstoreio/AltStore
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
altstoreio/AltStore#1887 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
altstoreio/AltStore#1824 ·
I maintainer di solito rispondono entro 3 giorni
-
Source dates with fractional seconds are silently reset to midnightForse già presa @kisnner26 l’ha presa 30 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
altstoreio/AltStore#1823 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
altstoreio/AltStore#1822 ·
I maintainer di solito rispondono entro 3 giorni
-
2FA loop: Apple no longer honors the Xcode 11.2 client identity (`com.apple.dt.Xcode/3594.4.19`)Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
altstoreio/AltStore#1772 · 1 commento · 2 reazioni ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di altstoreio/AltStore
Issue simili
-
area: build-and-ci S3: minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
manaflow-ai/cmux#65734 ·
I maintainer di solito rispondono entro 1 giorno
-
Kokoro ANE legacy: Alignment still runs the graph that traps at 48 tokens (#1172 fixed v3 only)Apertabug text-to-speech
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
FluidInference/FluidAudio#1201 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OneBusAway/onebusaway-ios#2025 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue help wanted
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
erkamyaman/rust-anything#930 ·
I maintainer di solito rispondono entro 1 giorno
-
contributor: external iOS needs review sdk-58 severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
expo/expo#54458 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno