Switches from StoreApp.isBeta to isPledged to determine whether app is visible

If StoreApp.isHiddenWithoutPledge == false (default), we’ll still show the app.
This commit is contained in:
Riley Testut
2023-11-29 18:08:42 -06:00
committed by Magesh K
parent aa9fda7a97
commit 389af4d5e6
6 changed files with 25 additions and 16 deletions

View File

@@ -569,6 +569,18 @@ public extension StoreApp
let globallyUniqueID = self.bundleIdentifier + "|" + sourceIdentifier
return globallyUniqueID
}
}
public extension StoreApp
{
class var visibleAppsPredicate: NSPredicate {
let predicate = NSPredicate(format: "(%K != %@) AND ((%K == NO) OR (%K == NO) OR (%K == YES))",
#keyPath(StoreApp.bundleIdentifier), StoreApp.altstoreAppID,
#keyPath(StoreApp.isPledgeRequired),
#keyPath(StoreApp.isHiddenWithoutPledge),
#keyPath(StoreApp.isPledged))
return predicate
}
@nonobjc class func fetchRequest() -> NSFetchRequest<StoreApp>
{