mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-18 19:23:43 +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)
|
let predicate = NSPredicate(format: "%K == %@", #keyPath(InstalledApp.bundleIdentifier), app.bundleIdentifier)
|
||||||
if let installedApp = InstalledApp.first(satisfying: predicate, in: context)
|
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 DEBUG
|
||||||
|
|
||||||
if app.bundleIdentifier == StoreApp.altstoreAppID || app.bundleIdentifier == StoreApp.alternativeAltStoreAppID
|
if app.bundleIdentifier == StoreApp.altstoreAppID || app.bundleIdentifier == StoreApp.alternativeAltStoreAppID
|
||||||
@@ -132,15 +136,11 @@ extension FetchProvisioningProfilesOperation
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
preferredBundleID = installedApp.resignedBundleIdentifier
|
preferredBundleID = teamsMatch ? installedApp.resignedBundleIdentifier : nil
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#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
|
if teamsMatch
|
||||||
{
|
{
|
||||||
// This app is already installed with the same team, so use the same resigned bundle identifier as before.
|
// 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