From fc3f83231cbe08f1879cf8b7af89fc407128ebb9 Mon Sep 17 00:00:00 2001 From: Joshua Laymon <71040782+bogotesr@users.noreply.github.com> Date: Tue, 18 Oct 2022 01:10:18 -0700 Subject: [PATCH] Use a custom default source for SideStore (#71) * Adds a Custom default source and allows Updating app via ota. Co-authored-by: Spidy123222 --- AltStoreCore/Model/Source.swift | 14 ++-- AltStoreCore/Model/StoreApp.swift | 8 +- .../ALTApplication+AltStoreApp.swift | 2 +- app.json | 79 +++++++++++++++++++ 4 files changed, 91 insertions(+), 12 deletions(-) create mode 100644 app.json diff --git a/AltStoreCore/Model/Source.swift b/AltStoreCore/Model/Source.swift index cc0f2e32..42aae09f 100644 --- a/AltStoreCore/Model/Source.swift +++ b/AltStoreCore/Model/Source.swift @@ -11,25 +11,25 @@ import CoreData public extension Source { #if ALPHA - static let altStoreIdentifier = "com.rileytestut.AltStore.Alpha" + static let altStoreIdentifier = "com.SideStore.AltStore" #else - static let altStoreIdentifier = "com.rileytestut.AltStore" + static let altStoreIdentifier = "com.SideStore.AltStore" #endif #if STAGING #if ALPHA - static let altStoreSourceURL = URL(string: "https://f000.backblazeb2.com/file/altstore-staging/sources/alpha/apps-alpha-staging.json")! + static let altStoreSourceURL = URL(string: "https://raw.githubusercontent.com/SideStore/SideStore/develop/app.json")! #else - static let altStoreSourceURL = URL(string: "https://f000.backblazeb2.com/file/altstore-staging/apps-staging.json")! + static let altStoreSourceURL = URL(string: "https://raw.githubusercontent.com/SideStore/SideStore/develop/app.json")! #endif #else #if ALPHA - static let altStoreSourceURL = URL(string: "https://alpha.altstore.io/")! + static let altStoreSourceURL = URL(string: "https://raw.githubusercontent.com/SideStore/SideStore/develop/app.json")! #else - static let altStoreSourceURL = URL(string: "https://apps.altstore.io/")! + static let altStoreSourceURL = URL(string: "https://raw.githubusercontent.com/SideStore/SideStore/develop/app.json")! #endif #endif @@ -157,7 +157,7 @@ public extension Source class func makeAltStoreSource(in context: NSManagedObjectContext) -> Source { let source = Source(context: context) - source.name = "AltStore" + source.name = "SideStore Offical" source.identifier = Source.altStoreIdentifier source.sourceURL = Source.altStoreSourceURL diff --git a/AltStoreCore/Model/StoreApp.swift b/AltStoreCore/Model/StoreApp.swift index 89ff64d2..c4d4df41 100644 --- a/AltStoreCore/Model/StoreApp.swift +++ b/AltStoreCore/Model/StoreApp.swift @@ -15,11 +15,11 @@ import AltSign public extension StoreApp { #if ALPHA - static let altstoreAppID = "com.rileytestut.AltStore.Alpha" + static let altstoreAppID = "com.SideStore.AltStore" #elseif BETA - static let altstoreAppID = "com.rileytestut.AltStore.Beta" + static let altstoreAppID = "com.SideStore.AltStore" #else - static let altstoreAppID = "com.rileytestut.AltStore" + static let altstoreAppID = "com.SideStore.AltStore" #endif static let dolphinAppID = "me.oatmealdome.dolphinios-njb" @@ -249,7 +249,7 @@ public extension StoreApp let app = StoreApp(context: context) app.name = "AltStore" app.bundleIdentifier = StoreApp.altstoreAppID - app.developerName = "Riley Testut" + app.developerName = "Side Team" app.localizedDescription = "AltStore is an alternative App Store." app.iconURL = URL(string: "https://user-images.githubusercontent.com/705880/63392210-540c5980-c37b-11e9-968c-8742fc68ab2e.png")! app.screenshotURLs = [] diff --git a/Shared/Extensions/ALTApplication+AltStoreApp.swift b/Shared/Extensions/ALTApplication+AltStoreApp.swift index bd06f010..e0084707 100644 --- a/Shared/Extensions/ALTApplication+AltStoreApp.swift +++ b/Shared/Extensions/ALTApplication+AltStoreApp.swift @@ -10,7 +10,7 @@ import AltSign extension ALTApplication { - static let altstoreBundleID = "com.rileytestut.AltStore" + static let altstoreBundleID = "com.SideStore.AltStore" var isAltStoreApp: Bool { let isAltStoreApp = self.bundleIdentifier.contains(ALTApplication.altstoreBundleID) diff --git a/app.json b/app.json new file mode 100644 index 00000000..169d0f7a --- /dev/null +++ b/app.json @@ -0,0 +1,79 @@ +{ + "name": "SideStore Offical", + "identifier": "com.SideStore.AltStore", + "sourceURL": "https://raw.githubusercontent.com/Spidy123222/apps.json/main/app.json", + "apps": [ + { + "name": "Altstore", + "bundleIdentifier": "com.SideStore.AltStore", + "developerName": "Side Team", + "version": "1.5.2b", + "versionDate": "2022-07-14T12:00:00-05:00", + "versionDescription": "Welcome to the pacer test.", + "downloadURL": "https://cdn.altstore.io/file/altstore/apps/altstore/1_5_1.ipa", + "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", + "iconURL": "https://raw.githubusercontent.com/SideStore/apps.json/main/105070799.jpeg", + "tintColor": "8043FF", + "size": 5465976, + "screenshotURLs": [ + "https://user-images.githubusercontent.com/705880/78942028-acf54300-7a6d-11ea-821c-5bb7a9b3e73a.PNG", + "https://user-images.githubusercontent.com/705880/78942222-0fe6da00-7a6e-11ea-9f2a-dda16157583c.PNG", + "https://user-images.githubusercontent.com/705880/65605577-332cba80-df5e-11e9-9f00-b369ce974f71.PNG" + ], + "permissions": [ + { + "type": "background-fetch", + "usageDescription": "SideStore periodically refreshes apps in the background to prevent them from expiring." + }, + { + "type": "background-audio", + "usageDescription": "Allows SideStore to run longer than 30 seconds when refreshing apps in background." + } + ] + } + ], + "news": [ + { + "title": "Rick on the rocks", + "identifier": "rick", + "caption": "never gonna give ya rocks", + "tintColor": "912F8D", + "imageURL": "https://variety.com/wp-content/uploads/2021/07/Rick-Astley-Never-Gonna-Give-You-Up.png?w=681&h=383&crop=1", + "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", + "date": "2022-05-06", + "notify": false + }, + { + "title": "Rick waves his arms around", + "identifier": "no", + "caption": "never gonna", + "tintColor": "912F8D", + "imageURL": "https://variety.com/wp-content/uploads/2021/07/Rick-Astley-Never-Gonna-Give-You-Up.png?w=681&h=383&crop=1", + "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", + "date": "2022-05-05", + "notify": false + }, + { + "title": "#StandWithUkraine", + "identifier": "support-ukraine", + "caption": "Find out how you can help support those impacted by the Russian invasion.", + "tintColor": "003e80", + "imageURL": "https://user-images.githubusercontent.com/705880/156053447-a158cac7-df5f-4497-8025-15c3c2e10b48.png", + "url": "https://linktr.ee/razomforukraine", + "date": "2022-03-01", + "notify": false + }, + { + "title": "New to SideStore?", + "identifier": "updated-faq", + "caption": "Check out our updated guide to learn how to sideload apps!", + "tintColor": "8043FF", + "url": "https://faq.altstore.io", + "date": "2050-07-28", + "notify": false + } + ], + "userInfo": { + "patreonAccessToken": "uqoDoTxH8dY1ImE8tK76wxrzKk67gjyjBAcK8sD3RLU" + } +}