mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-20 20:23:25 +01:00
Adds InstalledApp.team relationship
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="14492.1" systemVersion="18G95" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
|
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="15702" systemVersion="19C57" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
|
||||||
<entity name="Account" representedClassName="Account" syncable="YES">
|
<entity name="Account" representedClassName="Account" syncable="YES">
|
||||||
<attribute name="appleID" attributeType="String" syncable="YES"/>
|
<attribute name="appleID" attributeType="String" syncable="YES"/>
|
||||||
<attribute name="firstName" attributeType="String" syncable="YES"/>
|
<attribute name="firstName" attributeType="String" syncable="YES"/>
|
||||||
@@ -26,6 +26,7 @@
|
|||||||
<attribute name="resignedBundleIdentifier" attributeType="String" syncable="YES"/>
|
<attribute name="resignedBundleIdentifier" attributeType="String" syncable="YES"/>
|
||||||
<attribute name="version" attributeType="String" syncable="YES"/>
|
<attribute name="version" attributeType="String" syncable="YES"/>
|
||||||
<relationship name="storeApp" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="StoreApp" inverseName="installedApp" inverseEntity="StoreApp" syncable="YES"/>
|
<relationship name="storeApp" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="StoreApp" inverseName="installedApp" inverseEntity="StoreApp" syncable="YES"/>
|
||||||
|
<relationship name="team" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Team" inverseName="installedApps" inverseEntity="Team"/>
|
||||||
<uniquenessConstraints>
|
<uniquenessConstraints>
|
||||||
<uniquenessConstraint>
|
<uniquenessConstraint>
|
||||||
<constraint value="bundleIdentifier"/>
|
<constraint value="bundleIdentifier"/>
|
||||||
@@ -117,6 +118,7 @@
|
|||||||
<attribute name="name" attributeType="String" syncable="YES"/>
|
<attribute name="name" attributeType="String" syncable="YES"/>
|
||||||
<attribute name="type" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
|
<attribute name="type" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
|
||||||
<relationship name="account" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Account" inverseName="teams" inverseEntity="Account" syncable="YES"/>
|
<relationship name="account" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Account" inverseName="teams" inverseEntity="Account" syncable="YES"/>
|
||||||
|
<relationship name="installedApps" toMany="YES" deletionRule="Nullify" destinationEntity="InstalledApp" inverseName="team" inverseEntity="InstalledApp"/>
|
||||||
<uniquenessConstraints>
|
<uniquenessConstraints>
|
||||||
<uniquenessConstraint>
|
<uniquenessConstraint>
|
||||||
<constraint value="identifier"/>
|
<constraint value="identifier"/>
|
||||||
@@ -126,12 +128,12 @@
|
|||||||
<elements>
|
<elements>
|
||||||
<element name="Account" positionX="-36" positionY="90" width="128" height="135"/>
|
<element name="Account" positionX="-36" positionY="90" width="128" height="135"/>
|
||||||
<element name="AppPermission" positionX="-45" positionY="90" width="128" height="90"/>
|
<element name="AppPermission" positionX="-45" positionY="90" width="128" height="90"/>
|
||||||
<element name="InstalledApp" positionX="-63" positionY="0" width="128" height="150"/>
|
<element name="InstalledApp" positionX="-63" positionY="0" width="128" height="193"/>
|
||||||
<element name="NewsItem" positionX="-45" positionY="126" width="128" height="225"/>
|
<element name="NewsItem" positionX="-45" positionY="126" width="128" height="225"/>
|
||||||
<element name="PatreonAccount" positionX="-45" positionY="117" width="128" height="105"/>
|
<element name="PatreonAccount" positionX="-45" positionY="117" width="128" height="105"/>
|
||||||
<element name="RefreshAttempt" positionX="-45" positionY="117" width="128" height="105"/>
|
<element name="RefreshAttempt" positionX="-45" positionY="117" width="128" height="105"/>
|
||||||
<element name="Source" positionX="-45" positionY="99" width="128" height="120"/>
|
<element name="Source" positionX="-45" positionY="99" width="128" height="120"/>
|
||||||
<element name="StoreApp" positionX="-63" positionY="-18" width="128" height="330"/>
|
<element name="StoreApp" positionX="-63" positionY="-18" width="128" height="330"/>
|
||||||
<element name="Team" positionX="-45" positionY="81" width="128" height="120"/>
|
<element name="Team" positionX="-45" positionY="81" width="128" height="133"/>
|
||||||
</elements>
|
</elements>
|
||||||
</model>
|
</model>
|
||||||
@@ -25,6 +25,7 @@ class InstalledApp: NSManagedObject, Fetchable
|
|||||||
|
|
||||||
/* Relationships */
|
/* Relationships */
|
||||||
@NSManaged var storeApp: StoreApp?
|
@NSManaged var storeApp: StoreApp?
|
||||||
|
@NSManaged var team: Team?
|
||||||
|
|
||||||
var isSideloaded: Bool {
|
var isSideloaded: Bool {
|
||||||
return self.storeApp == nil
|
return self.storeApp == nil
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ class Team: NSManagedObject, Fetchable
|
|||||||
|
|
||||||
/* Relationships */
|
/* Relationships */
|
||||||
@NSManaged private(set) var account: Account!
|
@NSManaged private(set) var account: Account!
|
||||||
|
@NSManaged var installedApps: Set<InstalledApp>
|
||||||
|
|
||||||
var altTeam: ALTTeam?
|
var altTeam: ALTTeam?
|
||||||
|
|
||||||
|
|||||||
@@ -66,6 +66,11 @@ class InstallAppOperation: ResultOperation<InstalledApp>
|
|||||||
installedApp.expirationDate = profile.expirationDate
|
installedApp.expirationDate = profile.expirationDate
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let team = Team.first(satisfying: NSPredicate(format: "%K == %@", #keyPath(Team.isActiveTeam), NSNumber(value: true)), in: backgroundContext)
|
||||||
|
{
|
||||||
|
installedApp.team = team
|
||||||
|
}
|
||||||
|
|
||||||
// Temporary directory and resigned .ipa no longer needed, so delete them now to ensure AltStore doesn't quit before we get the chance to.
|
// Temporary directory and resigned .ipa no longer needed, so delete them now to ensure AltStore doesn't quit before we get the chance to.
|
||||||
self.cleanUp()
|
self.cleanUp()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user