mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-17 10:43:30 +01:00
Fixes grayed-out .ipas due to duplicate UTI declarations
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
import MobileCoreServices
|
||||||
|
|
||||||
import AltKit
|
import AltKit
|
||||||
import Roxas
|
import Roxas
|
||||||
@@ -649,9 +650,18 @@ private extension MyAppsViewController
|
|||||||
self.presentSideloadingAlert { (shouldContinue) in
|
self.presentSideloadingAlert { (shouldContinue) in
|
||||||
guard shouldContinue else { return }
|
guard shouldContinue else { return }
|
||||||
|
|
||||||
let iOSAppUTI = "com.apple.itunes.ipa" // Declared by the system.
|
let supportedTypes: [String]
|
||||||
|
|
||||||
let documentPickerViewController = UIDocumentPickerViewController(documentTypes: [iOSAppUTI], in: .import)
|
if let types = UTTypeCreateAllIdentifiersForTag(kUTTagClassFilenameExtension, "ipa" as CFString, nil)?.takeRetainedValue()
|
||||||
|
{
|
||||||
|
supportedTypes = (types as NSArray).map { $0 as! String }
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
supportedTypes = ["com.apple.itunes.ipa"] // Declared by the system.
|
||||||
|
}
|
||||||
|
|
||||||
|
let documentPickerViewController = UIDocumentPickerViewController(documentTypes: supportedTypes, in: .import)
|
||||||
documentPickerViewController.delegate = self
|
documentPickerViewController.delegate = self
|
||||||
self.present(documentPickerViewController, animated: true, completion: nil)
|
self.present(documentPickerViewController, animated: true, completion: nil)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user