Installs apps from AltStore via AltServer

This commit is contained in:
Riley Testut
2019-05-30 17:10:50 -07:00
parent f7beccbaa6
commit 58446d225c
18 changed files with 1137 additions and 78 deletions

View File

@@ -9,6 +9,8 @@
import Foundation
import CoreData
import Roxas
@objc(App)
class App: NSManagedObject, Decodable
{
@@ -77,3 +79,29 @@ extension App
return NSFetchRequest<App>(entityName: "App")
}
}
extension App
{
class var appsDirectoryURL: URL {
let appsDirectoryURL = FileManager.default.applicationSupportDirectory.appendingPathComponent("Apps")
do { try FileManager.default.createDirectory(at: appsDirectoryURL, withIntermediateDirectories: true, attributes: nil) }
catch { print(error) }
return appsDirectoryURL
}
var directoryURL: URL {
let directoryURL = App.appsDirectoryURL.appendingPathComponent(self.identifier)
do { try FileManager.default.createDirectory(at: directoryURL, withIntermediateDirectories: true, attributes: nil) }
catch { print(error) }
return directoryURL
}
var ipaURL: URL {
let ipaURL = self.directoryURL.appendingPathComponent("App.ipa")
return ipaURL
}
}