[AltStore] Revises authentication flow with better UI

This commit is contained in:
Riley Testut
2019-06-05 18:05:21 -07:00
parent 5c4613fd20
commit 0895e4238f
15 changed files with 1323 additions and 258 deletions

52
AltStore/Model/Team.swift Normal file
View File

@@ -0,0 +1,52 @@
//
// Team.swift
// AltStore
//
// Created by Riley Testut on 5/31/19.
// Copyright © 2019 Riley Testut. All rights reserved.
//
import Foundation
import CoreData
import AltSign
@objc(Team)
class Team: NSManagedObject
{
/* Properties */
@NSManaged var name: String
@NSManaged var identifier: String
@NSManaged var type: ALTTeamType
/* Relationships */
@NSManaged private(set) var account: Account!
var altTeam: ALTTeam?
private override init(entity: NSEntityDescription, insertInto context: NSManagedObjectContext?)
{
super.init(entity: entity, insertInto: context)
}
init(_ team: ALTTeam, account: Account, context: NSManagedObjectContext)
{
super.init(entity: Team.entity(), insertInto: context)
self.altTeam = team
self.name = team.name
self.identifier = team.identifier
self.type = team.type
self.account = account
}
}
extension Team
{
@nonobjc class func fetchRequest() -> NSFetchRequest<Team>
{
return NSFetchRequest<Team>(entityName: "Team")
}
}