mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-11 07:43:28 +01:00
[AltStore] Revises database model to support both store apps and sideloaded apps
This commit is contained in:
38
AltStore/Protocols/AppProtocol.swift
Normal file
38
AltStore/Protocols/AppProtocol.swift
Normal file
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// AppProtocol.swift
|
||||
// AltStore
|
||||
//
|
||||
// Created by Riley Testut on 7/26/19.
|
||||
// Copyright © 2019 Riley Testut. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import AltSign
|
||||
|
||||
protocol AppProtocol
|
||||
{
|
||||
var name: String { get }
|
||||
var bundleIdentifier: String { get }
|
||||
var url: URL { get }
|
||||
}
|
||||
|
||||
extension ALTApplication: AppProtocol
|
||||
{
|
||||
var url: URL {
|
||||
return self.fileURL
|
||||
}
|
||||
}
|
||||
|
||||
extension App: AppProtocol
|
||||
{
|
||||
var url: URL {
|
||||
return self.downloadURL
|
||||
}
|
||||
}
|
||||
|
||||
extension InstalledApp: AppProtocol
|
||||
{
|
||||
var url: URL {
|
||||
return self.fileURL
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user