Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Commit 4a67321

Browse files
committed
Merge branch 'develop' into sam/netp-waitlist
# By Diego Rey Mendez (4) and others # Via Diego Rey Mendez * develop: Fixes the BSK version manually #3 Fixes the BSK version manually #2 Fixes the BSK version manually Fix auth token issues (#1563) Bye Catalina (#1501) exempt apps.facebook.com & standard.co.uk for CTL (#1505) Update Gemfile to use fastlane fork (#1537) PopUp window positioning (#1551) Fix AdClickAttribution Mock causing test failures (#1538) Bump version to 1.54.0 (55) Update embedded files Show privacy dashboard for duckduckgo serp (#1521) Use unencrypted password for deduplicated Credentials objects (#1554) DBP: Add missing selector properties to CCF (#1555) # Conflicts: # DuckDuckGo.xcodeproj/project.pbxproj # DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
2 parents ee1b03a + 4e23500 commit 4a67321

File tree

37 files changed

+631
-263
lines changed

37 files changed

+631
-263
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
CURRENT_PROJECT_VERSION = 54
1+
CURRENT_PROJECT_VERSION = 55

Configuration/Version.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
MARKETING_VERSION = 1.53.2
1+
MARKETING_VERSION = 1.54.0

DuckDuckGo.xcodeproj/project.pbxproj

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,11 @@
5252
1D69C553291302F200B75945 /* BWVault.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D69C552291302F200B75945 /* BWVault.swift */; };
5353
1D6A492029CF7A490011DF74 /* NSPopoverExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D6A491F29CF7A490011DF74 /* NSPopoverExtension.swift */; };
5454
1D6A492129CF7A490011DF74 /* NSPopoverExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D6A491F29CF7A490011DF74 /* NSPopoverExtension.swift */; };
55+
1D76760E2A9CE4F000DA0BD7 /* SupportedOsChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D8057C72A83CAEE00F4FED6 /* SupportedOsChecker.swift */; };
5556
1D77921828FDC54C00BE0210 /* FaviconReferenceCacheTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D77921728FDC54C00BE0210 /* FaviconReferenceCacheTests.swift */; };
5657
1D77921A28FDC79800BE0210 /* FaviconStoringMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D77921928FDC79800BE0210 /* FaviconStoringMock.swift */; };
58+
1D8057C82A83CAEE00F4FED6 /* SupportedOsChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D8057C72A83CAEE00F4FED6 /* SupportedOsChecker.swift */; };
59+
1D8057C92A83CB3C00F4FED6 /* SupportedOsChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D8057C72A83CAEE00F4FED6 /* SupportedOsChecker.swift */; };
5760
1D8B7D6A2A38BF050045C6F6 /* FireproofDomainsStoreMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6BBF1712744CE36004F850E /* FireproofDomainsStoreMock.swift */; };
5861
1D8B7D6B2A38BF060045C6F6 /* FireproofDomainsStoreMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6BBF1712744CE36004F850E /* FireproofDomainsStoreMock.swift */; };
5962
1DA6D0FD2A1FF9A100540406 /* HTTPCookie.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DA6D0FC2A1FF9A100540406 /* HTTPCookie.swift */; };
@@ -2117,8 +2120,6 @@
21172120
7B736E582A4A22B700F9922A /* Main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B5F14C52A145D6A0060320F /* Main.swift */; };
21182121
7B736E6A2A4A22FC00F9922A /* enableOnDemand.app in Embed NetP Controller Apps */ = {isa = PBXBuildFile; fileRef = 7B736E5F2A4A22B700F9922A /* enableOnDemand.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
21192122
7B838C382A1DD8DD00E05A13 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4B2D06522A11D19B00DE1F49 /* Assets.xcassets */; };
2120-
7B934C3E2A866CFF00FC8F9C /* NetworkProtectionOnboardingMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B934C3D2A866CFF00FC8F9C /* NetworkProtectionOnboardingMenu.swift */; };
2121-
7B934C3F2A866CFF00FC8F9C /* NetworkProtectionOnboardingMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B934C3D2A866CFF00FC8F9C /* NetworkProtectionOnboardingMenu.swift */; };
21222123
7B934C412A866DD400FC8F9C /* UserDefaults+NetworkProtectionShared.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B934C402A866DD400FC8F9C /* UserDefaults+NetworkProtectionShared.swift */; };
21232124
7BA4727D26F01BC400EAA165 /* CoreDataTestUtilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B9292C42667104B00AD2C21 /* CoreDataTestUtilities.swift */; };
21242125
7BAF9E4B2A8A3CC9002D3B6E /* UserDefaults+NetworkProtectionShared.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B934C402A866DD400FC8F9C /* UserDefaults+NetworkProtectionShared.swift */; };
@@ -3000,6 +3001,7 @@
30003001
1D77921728FDC54C00BE0210 /* FaviconReferenceCacheTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FaviconReferenceCacheTests.swift; sourceTree = "<group>"; };
30013002
1D77921928FDC79800BE0210 /* FaviconStoringMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FaviconStoringMock.swift; sourceTree = "<group>"; };
30023003
1D77921C28FFF27C00BE0210 /* RunningApplicationCheck.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunningApplicationCheck.swift; sourceTree = "<group>"; };
3004+
1D8057C72A83CAEE00F4FED6 /* SupportedOsChecker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SupportedOsChecker.swift; sourceTree = "<group>"; };
30033005
1DA6D0FC2A1FF9A100540406 /* HTTPCookie.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HTTPCookie.swift; sourceTree = "<group>"; };
30043006
1DA6D0FF2A1FF9DC00540406 /* HTTPCookieTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HTTPCookieTests.swift; sourceTree = "<group>"; };
30053007
1DB9617929F1D06D00CF5568 /* InternalUserDeciderMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InternalUserDeciderMock.swift; sourceTree = "<group>"; };
@@ -4373,6 +4375,14 @@
43734375
path = RunningApplication;
43744376
sourceTree = "<group>";
43754377
};
4378+
1D8057C62A83CAD500F4FED6 /* OsVersion */ = {
4379+
isa = PBXGroup;
4380+
children = (
4381+
1D8057C72A83CAEE00F4FED6 /* SupportedOsChecker.swift */,
4382+
);
4383+
path = OsVersion;
4384+
sourceTree = "<group>";
4385+
};
43764386
313AED9F287CAC5A00E1E8F4 /* UI */ = {
43774387
isa = PBXGroup;
43784388
children = (
@@ -6438,6 +6448,7 @@
64386448
AA80EC52256BE33A007083E7 /* Localizables */,
64396449
1D43EAFF291D7D280065E5D6 /* Logging */,
64406450
85AC3B3325DA828900C7D2AA /* Network */,
6451+
1D8057C62A83CAD500F4FED6 /* OsVersion */,
64416452
4BB88B4E25B7BA20006F6B06 /* Utilities */,
64426453
1D77921B28FFF26100BE0210 /* RunningApplication */,
64436454
AA86491424D831C4001BABEE /* View */,
@@ -8868,6 +8879,7 @@
88688879
3192A00D2A4C4CFF0084EA89 /* ChromiumDataImporter.swift in Sources */,
88698880
3192A00E2A4C4CFF0084EA89 /* LegacyWebKitDownloadDelegate.swift in Sources */,
88708881
3192A00F2A4C4CFF0084EA89 /* WKBackForwardListItemViewModel.swift in Sources */,
8882+
1D76760E2A9CE4F000DA0BD7 /* SupportedOsChecker.swift in Sources */,
88718883
3192A0102A4C4CFF0084EA89 /* BWNotRespondingAlert.swift in Sources */,
88728884
3192A0112A4C4CFF0084EA89 /* DebugUserScript.swift in Sources */,
88738885
3192A0122A4C4CFF0084EA89 /* RecentlyClosedTab.swift in Sources */,
@@ -9460,6 +9472,7 @@
94609472
3706FAB4293F65D500E42796 /* NSPopUpButtonExtension.swift in Sources */,
94619473
3706FAB5293F65D500E42796 /* ConfigurationManager.swift in Sources */,
94629474
3706FAB6293F65D500E42796 /* YoutubePlayerUserScript.swift in Sources */,
9475+
1D8057C92A83CB3C00F4FED6 /* SupportedOsChecker.swift in Sources */,
94639476
373D9B4929EEAC1B00381FDD /* SyncMetadataDatabase.swift in Sources */,
94649477
3706FAB7293F65D500E42796 /* PixelParameters.swift in Sources */,
94659478
3706FAB8293F65D500E42796 /* FaviconImageCache.swift in Sources */,
@@ -9787,7 +9800,6 @@
97879800
85774B002A713D3B00DE0561 /* BookmarksBarMenuFactory.swift in Sources */,
97889801
B602E81E2A1E25B1006D261F /* NEOnDemandRuleExtension.swift in Sources */,
97899802
3706FBC7293F65D500E42796 /* HistoryStore.swift in Sources */,
9790-
7B934C3F2A866CFF00FC8F9C /* NetworkProtectionOnboardingMenu.swift in Sources */,
97919803
3706FBC8293F65D500E42796 /* FirePopoverCollectionViewItem.swift in Sources */,
97929804
3706FBC9293F65D500E42796 /* ArrayExtension.swift in Sources */,
97939805
3706FBCA293F65D500E42796 /* CrashReportSender.swift in Sources */,
@@ -10626,6 +10638,7 @@
1062610638
4BE65485271FCD7B008D1D63 /* LoginFaviconView.swift in Sources */,
1062710639
4B0511CA262CAA5A00F6079C /* FireproofDomainsViewController.swift in Sources */,
1062810640
AA4D700725545EF800C3411E /* URLEventHandler.swift in Sources */,
10641+
1D8057C82A83CAEE00F4FED6 /* SupportedOsChecker.swift in Sources */,
1062910642
AA92127725ADA07900600CD4 /* WKWebViewExtension.swift in Sources */,
1063010643
AAAB9114288EB1D600A057A9 /* CleanThisHistoryMenuItem.swift in Sources */,
1063110644
B6A9E499261474120067D1B9 /* TimedPixel.swift in Sources */,
@@ -11001,7 +11014,6 @@
1100111014
B64C84E32692DC9F0048FEBE /* PermissionAuthorizationViewController.swift in Sources */,
1100211015
4B92929D26670D2A00AD2C21 /* BookmarkNode.swift in Sources */,
1100311016
B693955226F04BEB0015B914 /* LongPressButton.swift in Sources */,
11004-
7B934C3E2A866CFF00FC8F9C /* NetworkProtectionOnboardingMenu.swift in Sources */,
1100511017
B6085D062743905F00A9C456 /* CoreDataStore.swift in Sources */,
1100611018
B6DB3AF6278EA0130024C5C4 /* BundleExtension.swift in Sources */,
1100711019
4B0511E1262CAA8600F6079C /* NSOpenPanelExtensions.swift in Sources */,

DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DuckDuckGo/AppDelegate/UpdateController.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ final class UpdateController: NSObject {
3838
}
3939

4040
func checkForUpdates(_ sender: Any!) {
41+
if !SupportedOSChecker.isCurrentOSReceivingUpdates {
42+
showNotSupportedInfo()
43+
}
44+
4145
NSApp.windows.forEach {
4246
if let controller = $0.windowController, "\(type(of: controller))" == "SUUpdateAlert" {
4347
$0.orderFrontRegardless()
@@ -65,6 +69,13 @@ final class UpdateController: NSObject {
6569
#endif
6670
}
6771

72+
private func showNotSupportedInfo() {
73+
if NSAlert.osNotSupported().runModal() != .cancel {
74+
let url = Preferences.UnsupportedDeviceInfoBox.softwareUpdateURL
75+
NSWorkspace.shared.open(url)
76+
}
77+
}
78+
6879
}
6980

7081
extension UpdateController: SPUStandardUserDriverDelegate {
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"color-space" : "srgb",
6+
"components" : {
7+
"alpha" : "0.140",
8+
"blue" : "0x33",
9+
"green" : "0xCC",
10+
"red" : "0xFF"
11+
}
12+
},
13+
"idiom" : "universal"
14+
}
15+
],
16+
"info" : {
17+
"author" : "xcode",
18+
"version" : 1
19+
}
20+
}

DuckDuckGo/Common/Extensions/NSAlertExtension.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,20 @@ extension NSAlert {
177177
return alert
178178
}
179179

180+
static func osNotSupported() -> NSAlert {
181+
let alert = NSAlert()
182+
alert.messageText = UserText.aboutUnsupportedDeviceInfo1
183+
alert.informativeText = UserText.aboutUnsupportedDeviceInfo2Part1 + " " +
184+
UserText.aboutUnsupportedDeviceInfo2Part2(version: "\(SupportedOSChecker.SupportedVersion.major).\(SupportedOSChecker.SupportedVersion.minor)") + " " +
185+
UserText.aboutUnsupportedDeviceInfo2Part3 + " " +
186+
UserText.aboutUnsupportedDeviceInfo2Part4
187+
alert.alertStyle = .warning
188+
189+
alert.addButton(withTitle: UserText.checkForUpdate)
190+
alert.addButton(withTitle: UserText.ok)
191+
return alert
192+
}
193+
180194
@discardableResult
181195
func runModal() async -> NSApplication.ModalResponse {
182196
await withCheckedContinuation { continuation in

DuckDuckGo/Common/Extensions/NSRectExtension.swift

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,20 @@ import Foundation
2020

2121
extension NSRect {
2222

23-
var center: CGPoint {
24-
CGPoint(x: midX, y: midY)
23+
var topLeft: NSPoint {
24+
NSPoint(x: minX, y: maxY)
25+
}
26+
27+
var center: NSPoint {
28+
NSPoint(x: midX, y: midY)
29+
}
30+
31+
var droppingPoint: NSPoint {
32+
NSPoint(x: self.midX, y: maxY)
33+
}
34+
35+
func frameOrigin(fromDroppingPoint droppingPoint: NSPoint) -> NSPoint {
36+
NSPoint(x: droppingPoint.x - self.width / 2, y: droppingPoint.y - self.height)
2537
}
2638

2739
// Apply an offset so that we don't get caught by the "Line of Death" https://textslashplain.com/2017/01/14/the-line-of-death/

DuckDuckGo/Common/Extensions/NSWindowExtension.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ import Cocoa
2121
extension NSWindow {
2222

2323
func setFrameOrigin(droppingPoint: NSPoint) {
24-
let frameOrigin = NSPoint(x: droppingPoint.x - frame.size.width/2, y: droppingPoint.y - frame.size.height)
25-
setFrameOrigin(frameOrigin)
24+
setFrameOrigin(frame.frameOrigin(fromDroppingPoint: droppingPoint))
25+
}
26+
27+
func setFrameOrigin(cascadedFrom window: NSWindow) {
28+
setFrameTopLeftPoint(cascadeTopLeft(from: window.frame.topLeft))
2629
}
2730

2831
private static let lastLeftHitKey = "_lastLeftHit"

DuckDuckGo/Common/Extensions/WKWebViewConfigurationExtensions.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ extension WKWebViewConfiguration {
3939
preferences.javaScriptCanOpenWindowsAutomatically = true
4040
preferences.isFraudulentWebsiteWarningEnabled = false
4141

42-
if urlSchemeHandler(forURLScheme: DuckPlayer.duckPlayerScheme) == nil {
43-
setURLSchemeHandler(DuckPlayerSchemeHandler(), forURLScheme: DuckPlayer.duckPlayerScheme)
42+
if SupportedOSChecker.isCurrentOSReceivingUpdates {
43+
if urlSchemeHandler(forURLScheme: DuckPlayer.duckPlayerScheme) == nil {
44+
setURLSchemeHandler(DuckPlayerSchemeHandler(), forURLScheme: DuckPlayer.duckPlayerScheme)
45+
}
4446
}
4547

4648
let userContentController = UserContentController(assetsPublisher: contentBlocking.contentBlockingAssetsPublisher,

0 commit comments

Comments
 (0)