Adds basic MyAppsViewController implementation

This commit is contained in:
Riley Testut
2019-05-20 21:26:01 +02:00
parent c3a8abf8dc
commit 42734f2004
9 changed files with 263 additions and 45 deletions

View 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")
}
}