mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Installs apps from AltStore via AltServer
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user