mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Adds basic MyAppsViewController implementation
This commit is contained in:
50
AltStore/Model/InstalledApp.swift
Normal file
50
AltStore/Model/InstalledApp.swift
Normal file
@@ -0,0 +1,50 @@
|
||||
//
|
||||
// InstalledApp.swift
|
||||
// AltStore
|
||||
//
|
||||
// Created by Riley Testut on 5/20/19.
|
||||
// Copyright © 2019 Riley Testut. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import CoreData
|
||||
|
||||
@objc(InstalledApp)
|
||||
class InstalledApp: NSManagedObject
|
||||
{
|
||||
/* Properties */
|
||||
@NSManaged var bundleIdentifier: String
|
||||
|
||||
@NSManaged var signedDate: Date
|
||||
@NSManaged var expirationDate: Date
|
||||
|
||||
@NSManaged var isBeta: Bool
|
||||
|
||||
/* Relationships */
|
||||
@NSManaged private(set) var app: App?
|
||||
|
||||
private override init(entity: NSEntityDescription, insertInto context: NSManagedObjectContext?)
|
||||
{
|
||||
super.init(entity: entity, insertInto: context)
|
||||
}
|
||||
|
||||
init(app: App, bundleIdentifier: String, signedDate: Date, expirationDate: Date, context: NSManagedObjectContext)
|
||||
{
|
||||
super.init(entity: InstalledApp.entity(), insertInto: context)
|
||||
|
||||
let app = context.object(with: app.objectID) as! App
|
||||
self.app = app
|
||||
|
||||
self.bundleIdentifier = bundleIdentifier
|
||||
self.signedDate = signedDate
|
||||
self.expirationDate = expirationDate
|
||||
}
|
||||
}
|
||||
|
||||
extension InstalledApp
|
||||
{
|
||||
@nonobjc class func fetchRequest() -> NSFetchRequest<InstalledApp>
|
||||
{
|
||||
return NSFetchRequest<InstalledApp>(entityName: "InstalledApp")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user