Skip to content
This repository has been archived by the owner on Jan 20, 2025. It is now read-only.

Commit

Permalink
Merge branch 'naturecodevoid/feature/release-channels' into ultra-nig…
Browse files Browse the repository at this point in the history
…htly
  • Loading branch information
amsam0 committed Feb 2, 2023
2 parents e76725d + 7897f64 commit 063a529
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
<attribute name="externalURL" optional="YES" attributeType="URI"/>
<attribute name="identifier" attributeType="String"/>
<attribute name="imageURL" optional="YES" attributeType="URI"/>
<attribute name="isDuplicate" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="isSilent" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
<attribute name="sortIndex" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="sourceIdentifier" optional="YES" attributeType="String"/>
Expand Down
14 changes: 13 additions & 1 deletion AltStoreCore/Model/NewsItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ public class NewsItem: NSManagedObject, Decodable, Fetchable
@NSManaged public var storeApp: StoreApp?
@NSManaged public var source: Source?

@objc public var isDuplicate: Bool {
if self.source == nil { return false }

// Hide news from sources that begin with the SideStore identifier, and aren't from the same source as the current SideStore source
if self.source!.identifier.starts(with: Bundle.Info.appbundleIdentifier) && self.source!.identifier != Source.altStoreIdentifier { return true }

return false
}

private enum CodingKeys: String, CodingKey
{
case identifier
Expand Down Expand Up @@ -86,6 +95,9 @@ public extension NewsItem
{
@nonobjc class func fetchRequest() -> NSFetchRequest<NewsItem>
{
return NSFetchRequest<NewsItem>(entityName: "NewsItem")
let fetchRequest = NSFetchRequest<NewsItem>(entityName: "NewsItem")
fetchRequest.predicate = NSPredicate(format: "%K == NO",
#keyPath(NewsItem.isDuplicate))
return fetchRequest
}
}
26 changes: 17 additions & 9 deletions AltStoreCore/Model/StoreApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -343,16 +343,28 @@ public extension StoreApp
{
let app = StoreApp(context: context)
app.name = "SideStore"

let currentAppVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String

if currentAppVersion != nil {
if currentAppVersion!.contains("beta") {
app.name += " (Beta)"
}
if currentAppVersion!.contains("nightly") {
app.name += " (Nightly)"
}
}

app.bundleIdentifier = StoreApp.altstoreAppID
app.developerName = "Side Team"
app.localizedDescription = "SideStore is an alternative App Store."
app.iconURL = URL(string: "https://user-images.githubusercontent.com/705880/63392210-540c5980-c37b-11e9-968c-8742fc68ab2e.png")!
app.developerName = "SideStore Team"
app.localizedDescription = "SideStore is an alternative app store for non-jailbroken devices.\n\nSideStore allows you to sideload other .ipa files and apps from the Files app or via the SideStore Library."
app.iconURL = URL(string: "https://sidestore.io/assets/icon.png")!
app.screenshotURLs = []
app.sourceIdentifier = Source.altStoreIdentifier

let appVersion = AppVersion.makeAppVersion(version: "0.3.0",
let appVersion = AppVersion.makeAppVersion(version: "0.0.0", // this is set to the current app version later
date: Date(),
downloadURL: URL(string: "http://rileytestut.com")!,
downloadURL: URL(string: "https://sidestore.io")!,
size: 0,
appBundleID: app.bundleIdentifier,
sourceID: Source.altStoreIdentifier,
Expand All @@ -361,10 +373,6 @@ public extension StoreApp

print("makeAltStoreApp StoreApp: \(String(describing: app))")

#if BETA
app.isBeta = true
#endif

return app
}
}
8 changes: 8 additions & 0 deletions trustedapps.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
{
"identifier": "io.sidestore.example"
},
{
"identifier": "com.SideStore.SideStore",
"sourceURL": "https://sidestore-apps.naturecodevoid.dev/"
},
{
"identifier": "com.SideStore.SideStore.Beta",
"sourceURL": "https://sidestore-apps.naturecodevoid.dev/beta"
},
{
"identifier": "com.sidestoreapps.community",
"sourceURL": "https://community-apps.sidestore.io/sidecommunity.json"
Expand Down

0 comments on commit 063a529

Please sign in to comment.