mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-12 16:23:32 +01:00
XCode project for app, moved app project to folder
This commit is contained in:
69
SideStoreApp/Sources/Shared/Extensions/Bundle+AltStore.swift
Normal file
69
SideStoreApp/Sources/Shared/Extensions/Bundle+AltStore.swift
Normal file
@@ -0,0 +1,69 @@
|
||||
//
|
||||
// Bundle+AltStore.swift
|
||||
// AltStore
|
||||
//
|
||||
// Created by Riley Testut on 5/30/19.
|
||||
// Copyright © 2019 Riley Testut. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
public extension Bundle {
|
||||
enum Info {
|
||||
public static let deviceID = "ALTDeviceID"
|
||||
public static let serverID = "ALTServerID"
|
||||
public static let certificateID = "ALTCertificateID"
|
||||
public static let appGroups = "ALTAppGroups"
|
||||
public static let altBundleID = "ALTBundleIdentifier"
|
||||
public static let orgbundleIdentifier = "com.SideStore"
|
||||
public static let appbundleIdentifier = orgbundleIdentifier + ".SideStore"
|
||||
public static let devicePairingString = "ALTPairingFile"
|
||||
public static let urlTypes = "CFBundleURLTypes"
|
||||
public static let exportedUTIs = "UTExportedTypeDeclarations"
|
||||
|
||||
public static let untetherURL = "ALTFugu14UntetherURL"
|
||||
public static let untetherRequired = "ALTFugu14UntetherRequired"
|
||||
public static let untetherMinimumiOSVersion = "ALTFugu14UntetherMinimumVersion"
|
||||
public static let untetherMaximumiOSVersion = "ALTFugu14UntetherMaximumVersion"
|
||||
}
|
||||
}
|
||||
|
||||
public extension Bundle {
|
||||
var infoPlistURL: URL {
|
||||
let infoPlistURL = bundleURL.appendingPathComponent("Info.plist")
|
||||
return infoPlistURL
|
||||
}
|
||||
|
||||
var provisioningProfileURL: URL {
|
||||
let provisioningProfileURL = bundleURL.appendingPathComponent("embedded.mobileprovision")
|
||||
return provisioningProfileURL
|
||||
}
|
||||
|
||||
var certificateURL: URL {
|
||||
let certificateURL = bundleURL.appendingPathComponent("ALTCertificate.p12")
|
||||
return certificateURL
|
||||
}
|
||||
|
||||
var altstorePlistURL: URL {
|
||||
let altstorePlistURL = bundleURL.appendingPathComponent("AltStore.plist")
|
||||
return altstorePlistURL
|
||||
}
|
||||
}
|
||||
|
||||
public extension Bundle {
|
||||
static var baseAltStoreAppGroupID = "group.com.SideStore.SideStore"
|
||||
|
||||
var appGroups: [String] {
|
||||
infoDictionary?[Bundle.Info.appGroups] as? [String] ?? []
|
||||
}
|
||||
|
||||
var altstoreAppGroup: String? {
|
||||
let appGroup = appGroups.first { $0.contains(Bundle.baseAltStoreAppGroupID) }
|
||||
return appGroup
|
||||
}
|
||||
|
||||
var completeInfoDictionary: [String: Any]? {
|
||||
let infoPlistURL = self.infoPlistURL
|
||||
return NSDictionary(contentsOf: infoPlistURL) as? [String: Any]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user