mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Fixes potentially incorrect bundle identifier when resigning AltStore with DEBUG build
This commit is contained in:
@@ -123,6 +123,10 @@ extension FetchProvisioningProfilesOperation
|
||||
let predicate = NSPredicate(format: "%K == %@", #keyPath(InstalledApp.bundleIdentifier), app.bundleIdentifier)
|
||||
if let installedApp = InstalledApp.first(satisfying: predicate, in: context)
|
||||
{
|
||||
// Teams match if installedApp.team has same identifier as team,
|
||||
// or if installedApp.team is nil but resignedBundleIdentifier contains the team's identifier.
|
||||
let teamsMatch = installedApp.team?.identifier == team.identifier || (installedApp.team == nil && installedApp.resignedBundleIdentifier.contains(team.identifier))
|
||||
|
||||
#if DEBUG
|
||||
|
||||
if app.bundleIdentifier == StoreApp.altstoreAppID || app.bundleIdentifier == StoreApp.alternativeAltStoreAppID
|
||||
@@ -132,15 +136,11 @@ extension FetchProvisioningProfilesOperation
|
||||
}
|
||||
else
|
||||
{
|
||||
preferredBundleID = installedApp.resignedBundleIdentifier
|
||||
preferredBundleID = teamsMatch ? installedApp.resignedBundleIdentifier : nil
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
// Teams match if installedApp.team has same identifier as team,
|
||||
// or if installedApp.team is nil but resignedBundleIdentifier contains the team's identifier.
|
||||
let teamsMatch = installedApp.team?.identifier == team.identifier || (installedApp.team == nil && installedApp.resignedBundleIdentifier.contains(team.identifier))
|
||||
|
||||
if teamsMatch
|
||||
{
|
||||
// This app is already installed with the same team, so use the same resigned bundle identifier as before.
|
||||
|
||||
Reference in New Issue
Block a user