2019-05-30 17:10:50 -07:00
|
|
|
//
|
|
|
|
|
// 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"
|
2019-08-01 10:45:54 -07:00
|
|
|
public static let serverID = "ALTServerID"
|
2019-10-28 12:53:56 -07:00
|
|
|
public static let certificateID = "ALTCertificateID"
|
2019-06-25 14:26:09 -07:00
|
|
|
public static let appGroups = "ALTAppGroups"
|
2020-05-15 14:44:06 -07:00
|
|
|
public static let altBundleID = "ALTBundleIdentifier"
|
2024-12-07 17:45:09 +05:30
|
|
|
|
2022-12-30 16:51:36 -05:00
|
|
|
public static let orgbundleIdentifier = "com.SideStore"
|
|
|
|
|
public static let appbundleIdentifier = orgbundleIdentifier + ".SideStore"
|
2022-11-02 17:58:59 -07:00
|
|
|
public static let devicePairingString = "ALTPairingFile"
|
2019-06-04 13:53:21 -07:00
|
|
|
public static let urlTypes = "CFBundleURLTypes"
|
2019-12-17 19:17:45 -08:00
|
|
|
public static let exportedUTIs = "UTExportedTypeDeclarations"
|
2023-05-12 18:26:24 -05:00
|
|
|
public static let backgroundModes = "UIBackgroundModes"
|
2021-10-25 22:27:30 -07:00
|
|
|
|
|
|
|
|
public static let untetherURL = "ALTFugu14UntetherURL"
|
|
|
|
|
public static let untetherRequired = "ALTFugu14UntetherRequired"
|
|
|
|
|
public static let untetherMinimumiOSVersion = "ALTFugu14UntetherMinimumVersion"
|
|
|
|
|
public static let untetherMaximumiOSVersion = "ALTFugu14UntetherMaximumVersion"
|
2019-06-04 13:53:21 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public extension Bundle
|
|
|
|
|
{
|
|
|
|
|
var infoPlistURL: URL {
|
|
|
|
|
let infoPlistURL = self.bundleURL.appendingPathComponent("Info.plist")
|
|
|
|
|
return infoPlistURL
|
2019-05-30 17:10:50 -07:00
|
|
|
}
|
2019-10-28 12:53:56 -07:00
|
|
|
|
2020-03-05 14:49:21 -08:00
|
|
|
var provisioningProfileURL: URL {
|
2021-02-26 16:47:33 -06:00
|
|
|
let provisioningProfileURL = self.bundleURL.appendingPathComponent("embedded.mobileprovision")
|
|
|
|
|
return provisioningProfileURL
|
2020-03-05 14:49:21 -08:00
|
|
|
}
|
|
|
|
|
|
2019-10-28 12:53:56 -07:00
|
|
|
var certificateURL: URL {
|
2021-02-26 16:47:33 -06:00
|
|
|
let certificateURL = self.bundleURL.appendingPathComponent("ALTCertificate.p12")
|
|
|
|
|
return certificateURL
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var altstorePlistURL: URL {
|
|
|
|
|
let altstorePlistURL = self.bundleURL.appendingPathComponent("AltStore.plist")
|
|
|
|
|
return altstorePlistURL
|
2019-10-28 12:53:56 -07:00
|
|
|
}
|
2021-02-26 16:47:33 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public extension Bundle
|
|
|
|
|
{
|
2023-10-20 21:42:09 -04:00
|
|
|
static var baseAltStoreAppGroupID = "group." + Bundle.Info.appbundleIdentifier
|
2023-10-17 17:38:09 -04:00
|
|
|
|
2020-05-15 11:35:44 -07:00
|
|
|
var appGroups: [String] {
|
|
|
|
|
return self.infoDictionary?[Bundle.Info.appGroups] as? [String] ?? []
|
|
|
|
|
}
|
2020-05-15 14:27:53 -07:00
|
|
|
|
|
|
|
|
var altstoreAppGroup: String? {
|
|
|
|
|
let appGroup = self.appGroups.first { $0.contains(Bundle.baseAltStoreAppGroupID) }
|
|
|
|
|
return appGroup
|
|
|
|
|
}
|
2020-06-10 14:58:25 -07:00
|
|
|
|
|
|
|
|
var completeInfoDictionary: [String : Any]? {
|
|
|
|
|
let infoPlistURL = self.infoPlistURL
|
|
|
|
|
return NSDictionary(contentsOf: infoPlistURL) as? [String : Any]
|
|
|
|
|
}
|
2019-05-30 17:10:50 -07:00
|
|
|
}
|