mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-11 15:53:30 +01:00
Uses URL schemes to determine whether apps are installed
This commit is contained in:
@@ -84,29 +84,3 @@ 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