Files
SideStore/AltKit/Bundle+AltStore.swift
Riley Testut 47cf59a1ad Adds initial AltBackup app
When deactivating an app, AltStore will first install AltBackup in its place. This allows AltBackup to access the (soon to be) inactive app’s sandbox, and backup all files to a shared app group with AltStore. Later when activating, AltStore will again install AltBackup and use it to restore files before installing the actual app again.
2020-05-15 14:54:46 -07:00

46 lines
1.2 KiB
Swift

//
// Bundle+AltStore.swift
// AltStore
//
// Created by Riley Testut on 5/30/19.
// Copyright © 2019 Riley Testut. All rights reserved.
//
import Foundation
public extension Bundle
{
struct Info
{
public static let deviceID = "ALTDeviceID"
public static let serverID = "ALTServerID"
public static let certificateID = "ALTCertificateID"
public static let appGroups = "ALTAppGroups"
public static let urlTypes = "CFBundleURLTypes"
public static let exportedUTIs = "UTExportedTypeDeclarations"
}
}
public extension Bundle
{
var infoPlistURL: URL {
let infoPlistURL = self.bundleURL.appendingPathComponent("Info.plist")
return infoPlistURL
}
var provisioningProfileURL: URL {
let infoPlistURL = self.bundleURL.appendingPathComponent("embedded.mobileprovision")
return infoPlistURL
}
var certificateURL: URL {
let infoPlistURL = self.bundleURL.appendingPathComponent("ALTCertificate.p12")
return infoPlistURL
}
var appGroups: [String] {
return self.infoDictionary?[Bundle.Info.appGroups] as? [String] ?? []
}
}