diff --git a/appdb/Tabs/Downloads/Downloading/IPAWebViewController.swift b/appdb/Tabs/Downloads/Downloading/IPAWebViewController.swift index 134e6f88..0cf40bd4 100644 --- a/appdb/Tabs/Downloads/Downloading/IPAWebViewController.swift +++ b/appdb/Tabs/Downloads/Downloading/IPAWebViewController.swift @@ -269,6 +269,7 @@ extension IPAWebViewController { extension IPAWebViewController: WKScriptMessageHandler { func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) { guard let base64DataString = message.body as? String else { return } + guard base64DataString.starts(with: "data:application/octet-stream;base64,") else { return } // Before decoding we need to drop this: "data:application/octet-stream;base64," guard let dataDecoded = Data(base64Encoded: String(base64DataString.dropFirst(37))) else { return } let filename: String = Global.randomString(length: 15) + "-MEGA.ipa" diff --git a/appdb/Tabs/Featured/See All/SeeAll.swift b/appdb/Tabs/Featured/See All/SeeAll.swift index 42a06c3f..2c93478f 100644 --- a/appdb/Tabs/Featured/See All/SeeAll.swift +++ b/appdb/Tabs/Featured/See All/SeeAll.swift @@ -110,7 +110,7 @@ class SeeAll: LoadingTableView { if Global.isIpad { // Add 'Dismiss' button for iPad let dismissButton = UIBarButtonItem(title: "Dismiss".localized(), style: .done, target: self, action: #selector(self.dismissAnimated)) - self.navigationItem.rightBarButtonItems = [dismissButton] + self.navigationItem.leftBarButtonItems = [dismissButton] } // Refresh action