diff --git a/appdb/Startup/AppDelegate.swift b/appdb/Startup/AppDelegate.swift index 362f4ff9..ba698031 100644 --- a/appdb/Startup/AppDelegate.swift +++ b/appdb/Startup/AppDelegate.swift @@ -88,7 +88,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UITabBarControllerDelegat func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool { // Handle IPA - if url.isFileURL && IPAFileManager.shared.supportedFileExtensions.contains(url.pathExtension) { + if url.isFileURL && IPAFileManager.shared.supportedFileExtensions.contains(url.pathExtension.lowercased()) { if !FileManager.default.isReadableFile(atPath: url.path) { // Handle 'Open in appdb' from share sheet diff --git a/appdb/Tabs/Downloads/Library/IPAFileManager.swift b/appdb/Tabs/Downloads/Library/IPAFileManager.swift index d1e700b1..ba50aa48 100644 --- a/appdb/Tabs/Downloads/Library/IPAFileManager.swift +++ b/appdb/Tabs/Downloads/Library/IPAFileManager.swift @@ -310,7 +310,7 @@ struct IPAFileManager { func moveEventualIPAFilesToDocumentsDirectory(from directory: URL) { guard FileManager.default.fileExists(atPath: directory.path) else { return } let inboxContents = try? FileManager.default.contentsOfDirectory(at: directory, includingPropertiesForKeys: nil) - let ipas = inboxContents?.filter { supportedFileExtensions.contains($0.pathExtension) } + let ipas = inboxContents?.filter { supportedFileExtensions.contains($0.pathExtension.lowercased()) } for ipa in ipas ?? [] { let url = directory.appendingPathComponent(ipa.lastPathComponent) moveToDocuments(url: url) @@ -325,7 +325,7 @@ struct IPAFileManager { moveEventualIPAFilesToDocumentsDirectory(from: inboxDirectoryURL()) let contents = try? FileManager.default.contentsOfDirectory(at: documentsDirectoryURL(), includingPropertiesForKeys: nil) - let ipas = contents?.filter { supportedFileExtensions.contains($0.pathExtension) } + let ipas = contents?.filter { supportedFileExtensions.contains($0.pathExtension.lowercased()) } for ipa in ipas ?? [] { let filename = ipa.lastPathComponent let size = getSize(from: filename) diff --git a/appdb/Tabs/Featured/Wishes/Wishes.swift b/appdb/Tabs/Featured/Wishes/Wishes.swift index f0e373c8..dce1c4b6 100644 --- a/appdb/Tabs/Featured/Wishes/Wishes.swift +++ b/appdb/Tabs/Featured/Wishes/Wishes.swift @@ -159,7 +159,10 @@ extension Wishes { if !text.hasPrefix("http://"), !text.hasPrefix("https://") { text = "https://" + text } - guard let url = URL(string: text) else { return } + guard let url = URL(string: text) else { + Messages.shared.showError(message: "Error: malformed url".localized(), context: .viewController(self)) + return + } API.createPublishRequest(appStoreUrl: url.absoluteString) { error in if let error = error { Messages.shared.showError(message: error.prettified, context: .viewController(self))