mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-20 12:13:26 +01:00
Merge pull request #260 from osy86/master
Preserve device specific keys in Info.plist
This commit is contained in:
@@ -38,4 +38,9 @@ public extension Bundle
|
|||||||
let infoPlistURL = self.bundleURL.appendingPathComponent("ALTCertificate.p12")
|
let infoPlistURL = self.bundleURL.appendingPathComponent("ALTCertificate.p12")
|
||||||
return infoPlistURL
|
return infoPlistURL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var completeInfoDictionary: [String : Any]? {
|
||||||
|
let infoPlistURL = self.infoPlistURL
|
||||||
|
return NSDictionary(contentsOf: infoPlistURL) as? [String : Any]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ private extension DatabaseManager
|
|||||||
|
|
||||||
let infoPlistURL = temporaryFileURL.appendingPathComponent("Info.plist")
|
let infoPlistURL = temporaryFileURL.appendingPathComponent("Info.plist")
|
||||||
|
|
||||||
guard var infoDictionary = Bundle.main.infoDictionary else { throw ALTError(.missingInfoPlist) }
|
guard var infoDictionary = Bundle.main.completeInfoDictionary else { throw ALTError(.missingInfoPlist) }
|
||||||
infoDictionary[kCFBundleIdentifierKey as String] = StoreApp.altstoreAppID
|
infoDictionary[kCFBundleIdentifierKey as String] = StoreApp.altstoreAppID
|
||||||
try (infoDictionary as NSDictionary).write(to: infoPlistURL)
|
try (infoDictionary as NSDictionary).write(to: infoPlistURL)
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ private extension ResignAppOperation
|
|||||||
{
|
{
|
||||||
guard let identifier = bundle.bundleIdentifier else { throw ALTError(.missingAppBundle) }
|
guard let identifier = bundle.bundleIdentifier else { throw ALTError(.missingAppBundle) }
|
||||||
guard let profile = profiles[identifier] else { throw ALTError(.missingProvisioningProfile) }
|
guard let profile = profiles[identifier] else { throw ALTError(.missingProvisioningProfile) }
|
||||||
guard var infoDictionary = bundle.infoDictionary else { throw ALTError(.missingInfoPlist) }
|
guard var infoDictionary = bundle.completeInfoDictionary else { throw ALTError(.missingInfoPlist) }
|
||||||
|
|
||||||
infoDictionary[kCFBundleIdentifierKey as String] = profile.bundleIdentifier
|
infoDictionary[kCFBundleIdentifierKey as String] = profile.bundleIdentifier
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ private extension ResignAppOperation
|
|||||||
progress.becomeCurrent(withPendingUnitCount: 1)
|
progress.becomeCurrent(withPendingUnitCount: 1)
|
||||||
|
|
||||||
guard let appBundle = Bundle(url: appBundleURL) else { throw ALTError(.missingAppBundle) }
|
guard let appBundle = Bundle(url: appBundleURL) else { throw ALTError(.missingAppBundle) }
|
||||||
guard let infoDictionary = appBundle.infoDictionary else { throw ALTError(.missingInfoPlist) }
|
guard let infoDictionary = appBundle.completeInfoDictionary else { throw ALTError(.missingInfoPlist) }
|
||||||
|
|
||||||
var allURLSchemes = infoDictionary[Bundle.Info.urlTypes] as? [[String: Any]] ?? []
|
var allURLSchemes = infoDictionary[Bundle.Info.urlTypes] as? [[String: Any]] ?? []
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user