[AltStoreCore] Replaces remaining Bundle.appGroups.first with Bundle.altstoreAppGroup

Ensures we can still find the correct AltStore app group even if it isn’t the first one listed in the Info.plist.
This commit is contained in:
Riley Testut
2023-04-04 17:23:40 -05:00
parent 9a5ed50d25
commit 1a1d301642
2 changed files with 2 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ import Foundation
public extension FileManager
{
var altstoreSharedDirectory: URL? {
guard let appGroup = Bundle.main.appGroups.first else { return nil }
guard let appGroup = Bundle.main.altstoreAppGroup else { return nil }
let sharedDirectoryURL = self.containerURL(forSecurityApplicationGroupIdentifier: appGroup)
return sharedDirectoryURL

View File

@@ -13,7 +13,7 @@ import Roxas
public extension UserDefaults
{
static let shared: UserDefaults = {
guard let appGroup = Bundle.main.appGroups.first else { return .standard }
guard let appGroup = Bundle.main.altstoreAppGroup else { return .standard }
let sharedUserDefaults = UserDefaults(suiteName: appGroup)!
return sharedUserDefaults