mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Fix file providers (#346)
* Make file providers work at all NSExtensionFileProviderDocumentGroup must be a valid app group. This updates it to use the new name of the app group including the team ID. * Update AltStore/Operations/ResignAppOperation.swift
This commit is contained in:
@@ -122,6 +122,15 @@ private extension ResignAppOperation
|
||||
if let appGroups = profile.entitlements[.appGroups] as? [String]
|
||||
{
|
||||
infoDictionary[Bundle.Info.appGroups] = appGroups
|
||||
|
||||
// To keep file providers working, remap the NSExtensionFileProviderDocumentGroup, if there is one.
|
||||
if var extensionInfo = infoDictionary["NSExtension"] as? [String: Any],
|
||||
let appGroup = extensionInfo["NSExtensionFileProviderDocumentGroup"] as? String,
|
||||
let localAppGroup = appGroups.filter({ $0.contains(appGroup) }).min(by: { $0.count < $1.count })
|
||||
{
|
||||
extensionInfo["NSExtensionFileProviderDocumentGroup"] = localAppGroup
|
||||
infoDictionary["NSExtension"] = extensionInfo
|
||||
}
|
||||
}
|
||||
|
||||
// Add app-specific exported UTI so we can check later if this app (extension) is installed or not.
|
||||
|
||||
Reference in New Issue
Block a user