mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
[AltBackup] Derives backup location from original bundle ID, not resigned one
Allows the backup to be used even if the app is later installed with a different developer team.
This commit is contained in:
@@ -89,7 +89,9 @@ class BackupController: NSObject
|
|||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
guard let bundleIdentifier = Bundle.main.bundleIdentifier else { throw BackupError(.invalidBundleID, description: NSLocalizedString("Unable to create backup directory.", comment: "")) }
|
guard let bundleIdentifier = Bundle.main.object(forInfoDictionaryKey: Bundle.Info.altBundleID) as? String else {
|
||||||
|
throw BackupError(.invalidBundleID, description: NSLocalizedString("Unable to create backup directory.", comment: ""))
|
||||||
|
}
|
||||||
|
|
||||||
guard
|
guard
|
||||||
let altstoreAppGroup = Bundle.main.altstoreAppGroup,
|
let altstoreAppGroup = Bundle.main.altstoreAppGroup,
|
||||||
@@ -186,7 +188,9 @@ class BackupController: NSObject
|
|||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
guard let bundleIdentifier = Bundle.main.bundleIdentifier else { throw BackupError(.invalidBundleID, description: NSLocalizedString("Unable to access backup.", comment: "")) }
|
guard let bundleIdentifier = Bundle.main.object(forInfoDictionaryKey: Bundle.Info.altBundleID) as? String else {
|
||||||
|
throw BackupError(.invalidBundleID, description: NSLocalizedString("Unable to access backup.", comment: ""))
|
||||||
|
}
|
||||||
|
|
||||||
guard
|
guard
|
||||||
let altstoreAppGroup = Bundle.main.altstoreAppGroup,
|
let altstoreAppGroup = Bundle.main.altstoreAppGroup,
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
<array>
|
<array>
|
||||||
<string>group.com.rileytestut.AltStore</string>
|
<string>group.com.rileytestut.AltStore</string>
|
||||||
</array>
|
</array>
|
||||||
|
<key>ALTBundleIdentifier</key>
|
||||||
|
<string>com.rileytestut.AltBackup</string>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
|
|||||||
Reference in New Issue
Block a user