diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 5d643bac6a..415c2f063b 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -9977,7 +9977,7 @@ repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 104.0.0; + version = 104.0.2; }; }; C14882EB27F211A000D59F0C /* XCRemoteSwiftPackageReference "SwiftSoup" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index bafadaff66..31faa8367e 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/DuckDuckGo/BrowserServicesKit", "state" : { - "revision" : "872090e651ad8e26ca9903a95f3d094b21d48e23", - "version" : "104.0.0" + "revision" : "381cd794bd00b388e8db4722af0a78cb8c729ef9", + "version" : "104.0.2" } }, { @@ -156,7 +156,7 @@ { "identity" : "trackerradarkit", "kind" : "remoteSourceControl", - "location" : "https://github.com/duckduckgo/TrackerRadarKit", + "location" : "https://github.com/duckduckgo/TrackerRadarKit.git", "state" : { "revision" : "a6b7ba151d9dc6684484f3785293875ec01cc1ff", "version" : "1.2.2" diff --git a/DuckDuckGo/PrivacyDashboard/PrivacyDashboardViewController.swift b/DuckDuckGo/PrivacyDashboard/PrivacyDashboardViewController.swift index 48a5b0d6e0..586c8e99d9 100644 --- a/DuckDuckGo/PrivacyDashboard/PrivacyDashboardViewController.swift +++ b/DuckDuckGo/PrivacyDashboard/PrivacyDashboardViewController.swift @@ -219,6 +219,8 @@ extension PrivacyDashboardViewController { let ampURLString: String let urlParametersRemoved: Bool let isDesktop: Bool + let error: Error? + let httpStatusCode: Int? } enum WebsiteBreakageError: Error { @@ -252,7 +254,8 @@ extension PrivacyDashboardViewController { reportFlow: source, siteType: breakageAdditionalInfo.isDesktop ? .desktop : .mobile, atb: StatisticsUserDefaults().atb ?? "", - model: UIDevice.current.model) - + model: UIDevice.current.model, + error: breakageAdditionalInfo.error, + httpStatusCode: breakageAdditionalInfo.httpStatusCode) } } diff --git a/DuckDuckGo/TabViewController.swift b/DuckDuckGo/TabViewController.swift index f0d388a281..0e58ca1c50 100644 --- a/DuckDuckGo/TabViewController.swift +++ b/DuckDuckGo/TabViewController.swift @@ -110,6 +110,7 @@ class TabViewController: UIViewController { private var httpsForced: Bool = false private var lastUpgradedURL: URL? private var lastError: Error? + private var lastHttpStatusCode: Int? private var shouldReloadOnError = false private var failingUrls = Set() private var urlProvidedBasicAuthCredential: (credential: URLCredential, url: URL)? @@ -919,15 +920,17 @@ class TabViewController: UIViewController { return nil } return PrivacyDashboardViewController.BreakageAdditionalInfo(currentURL: currentURL, - httpsForced: httpsForced, - ampURLString: linkProtection.lastAMPURLString ?? "", - urlParametersRemoved: linkProtection.urlParametersRemoved, - isDesktop: tabModel.isDesktop) + httpsForced: httpsForced, + ampURLString: linkProtection.lastAMPURLString ?? "", + urlParametersRemoved: linkProtection.urlParametersRemoved, + isDesktop: tabModel.isDesktop, + error: lastError, + httpStatusCode: lastHttpStatusCode) } - + public func print() { let printFormatter = webView.viewPrintFormatter() - + let printInfo = UIPrintInfo(dictionary: nil) printInfo.jobName = Bundle.main.infoDictionary!["CFBundleName"] as? String ?? "DuckDuckGo" printInfo.outputType = .general @@ -1062,6 +1065,7 @@ extension TabViewController: WKNavigationDelegate { let httpResponse = navigationResponse.response as? HTTPURLResponse let isSuccessfulResponse = httpResponse?.isSuccessfulResponse ?? false + lastHttpStatusCode = httpResponse?.statusCode let didMarkAsInternal = internalUserDecider.markUserAsInternalIfNeeded(forUrl: webView.url, response: httpResponse) if didMarkAsInternal { diff --git a/DuckDuckGoTests/BrokenSiteReportingTests.swift b/DuckDuckGoTests/BrokenSiteReportingTests.swift index 40c578f113..838b3478bf 100644 --- a/DuckDuckGoTests/BrokenSiteReportingTests.swift +++ b/DuckDuckGoTests/BrokenSiteReportingTests.swift @@ -90,8 +90,10 @@ final class BrokenSiteReportingTests: XCTestCase { reportFlow: .dashboard, siteType: .mobile, atb: "", - model: test.model ?? "") - + model: test.model ?? "", + error: nil, + httpStatusCode: nil) + let reporter = WebsiteBreakageReporter(pixelHandler: { params in for expectedParam in test.expectReportURLParams { diff --git a/LocalPackages/DuckUI/Package.swift b/LocalPackages/DuckUI/Package.swift index 5444c96dd6..2b87e6ee97 100644 --- a/LocalPackages/DuckUI/Package.swift +++ b/LocalPackages/DuckUI/Package.swift @@ -31,7 +31,7 @@ let package = Package( targets: ["DuckUI"]) ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "104.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "104.0.2"), ], targets: [ .target( diff --git a/LocalPackages/SyncUI/Package.swift b/LocalPackages/SyncUI/Package.swift index 010012fb5c..76d3fa59b6 100644 --- a/LocalPackages/SyncUI/Package.swift +++ b/LocalPackages/SyncUI/Package.swift @@ -33,7 +33,7 @@ let package = Package( ], dependencies: [ .package(path: "../DuckUI"), - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "104.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "104.0.2"), .package(url: "https://github.com/duckduckgo/DesignResourcesKit", exact: "2.0.0") ], targets: [ diff --git a/LocalPackages/Waitlist/Package.swift b/LocalPackages/Waitlist/Package.swift index e3ce289fce..3a6e951abd 100644 --- a/LocalPackages/Waitlist/Package.swift +++ b/LocalPackages/Waitlist/Package.swift @@ -15,7 +15,7 @@ let package = Package( targets: ["Waitlist", "WaitlistMocks"]) ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "104.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "104.0.2"), .package(url: "https://github.com/duckduckgo/DesignResourcesKit", exact: "2.0.0") ], targets: [