From 1f5b9fc6825a5ec3f50ec70aff1edddc78502aed Mon Sep 17 00:00:00 2001 From: Matt Czech Date: Tue, 4 Nov 2025 16:35:57 -0600 Subject: [PATCH] [PM-26063] Move ExternalLinksConstants to BitwardenKit (#2100) --- .../Utilities/ExternalLinksConstants.swift | 44 ++----------------- .../Utilities/ExternalLinksConstants.swift | 18 ++++++++ .../Utilities/ExternalLinksConstants.swift | 17 ++----- 3 files changed, 25 insertions(+), 54 deletions(-) create mode 100644 BitwardenKit/Core/Platform/Utilities/ExternalLinksConstants.swift diff --git a/AuthenticatorShared/Core/Platform/Utilities/ExternalLinksConstants.swift b/AuthenticatorShared/Core/Platform/Utilities/ExternalLinksConstants.swift index eefe28564..4c0f49798 100644 --- a/AuthenticatorShared/Core/Platform/Utilities/ExternalLinksConstants.swift +++ b/AuthenticatorShared/Core/Platform/Utilities/ExternalLinksConstants.swift @@ -1,34 +1,15 @@ +import BitwardenKit import Foundation // MARK: - ExternalLinksConstants /// Links that are used throughout the app. /// -enum ExternalLinksConstants { +extension ExternalLinksConstants { // MARK: Properties - /// A link to Bitwarden's organizations information webpage. - static let aboutOrganizations = URL(string: "https://bitwarden.com/help/about-organizations")! - - /// A link to the app review page within the app store. - static let appReview = URL(string: "https://itunes.apple.com/us/app/id1137397744?action=write-review") - - static let backupInformation = URL(string: "https://support.apple.com/guide/iphone/back-up-iphone-iph3ecf67d29/ios") - - /// A link to Bitwarden's help page for learning more about the account fingerprint phrase. - static let fingerprintPhrase = URL(string: "https://bitwarden.com/help/fingerprint-phrase/")! - - /// A link to Bitwarden's help page for generating username types. - static let generatorUsernameTypes = URL(string: "https://bitwarden.com/help/generator/#username-types")! - - /// A link for beta users to provide feedback. - static let giveFeedback = URL(string: "https://livefrontinc.typeform.com/to/irgrRu4a") - - /// A link to Bitwarden's general help and feedback page. - static let helpAndFeedback = URL(string: "http://bitwarden.com/help/")! - - /// A link to Bitwarden's import items help webpage. - static let importItems = URL(string: "http://bitwarden.com/help/import-data/")! + /// A link to Apple's guide on backing up iPhone. + static let backupInformation = URL(string: "https://support.apple.com/guide/iphone/back-up-iphone-iph3ecf67d29/ios")! /// A link to the password manager app within the app store. static let passwordManagerLink = URL(string: "https://itunes.apple.com/app/id1137397744?mt=8")! @@ -42,23 +23,6 @@ enum ExternalLinksConstants { /// A deeplink to the password manager app to open the options menu. static let passwordManagerSettings = URL(string: "bitwarden://settings/account_security")! - /// A markdown link to Bitwarden's privacy policy. - static let privacyPolicy = URL(string: "https://bitwarden.com/privacy/")! - - /// A markdown link to Bitwarden's help page about protecting individual items. - static let protectIndividualItems = URL( - string: "https://bitwarden.com/help/managing-items/#protect-individual-items", - )! - - /// A link to Bitwarden's recovery code help page. - static let recoveryCode = URL(string: "https://bitwarden.com/help/lost-two-step-device/")! - - /// A link to Bitwarden's product page for Sends. - static let sendInfo = URL(string: "https://bitwarden.com/products/send/")! - - /// A markdown link to Bitwarden's terms of service. - static let termsOfService = URL(string: "https://bitwarden.com/terms/")! - /// A link to the Bitwarden Help Center page for syncing TOTP codes between PM and Authenticator. static let totpSyncHelp = URL(string: "https://bitwarden.com/help/totp-sync/")! } diff --git a/BitwardenKit/Core/Platform/Utilities/ExternalLinksConstants.swift b/BitwardenKit/Core/Platform/Utilities/ExternalLinksConstants.swift new file mode 100644 index 000000000..087d539a1 --- /dev/null +++ b/BitwardenKit/Core/Platform/Utilities/ExternalLinksConstants.swift @@ -0,0 +1,18 @@ +import Foundation + +// MARK: - ExternalLinksConstants + +/// Links that are used throughout the apps. +/// +public enum ExternalLinksConstants { + // MARK: Properties + + /// A link to Bitwarden's help page for the Flight Recorder. + public static let flightRecorderHelp = URL(string: "https://bitwarden.com/help/flight-recorder")! + + /// A link to Bitwarden's general help and feedback page. + public static let helpAndFeedback = URL(string: "https://bitwarden.com/help/")! + + /// A markdown link to Bitwarden's privacy policy. + public static let privacyPolicy = URL(string: "https://bitwarden.com/privacy/")! +} diff --git a/BitwardenShared/Core/Platform/Utilities/ExternalLinksConstants.swift b/BitwardenShared/Core/Platform/Utilities/ExternalLinksConstants.swift index ccdeaf3b7..175b23cda 100644 --- a/BitwardenShared/Core/Platform/Utilities/ExternalLinksConstants.swift +++ b/BitwardenShared/Core/Platform/Utilities/ExternalLinksConstants.swift @@ -1,10 +1,11 @@ +import BitwardenKit import Foundation // MARK: - ExternalLinksConstants /// Links that are used throughout the app. /// -enum ExternalLinksConstants { +extension ExternalLinksConstants { // MARK: Properties /// A link to Bitwarden's organizations information webpage. @@ -22,27 +23,15 @@ enum ExternalLinksConstants { /// A link to Bitwarden's help page for learning more about the account fingerprint phrase. static let fingerprintPhrase = URL(string: "https://bitwarden.com/help/fingerprint-phrase/")! - /// A link the Bitwarden's help page for the flight recorder. - static let flightRecorderHelp = URL(string: "https://bitwarden.com/help/flight-recorder")! - /// A link to Bitwarden's help page for generating username types. static let generatorUsernameTypes = URL(string: "https://bitwarden.com/help/generator/#username-types")! - /// A link to Bitwarden's general help and feedback page. - static let helpAndFeedback = URL(string: "https://bitwarden.com/help/")! - /// A link to the import logins help page. static let importHelp = URL(string: "https://bitwarden.com/help/import-data/")! - /// A link to the new device verification help page. - static let newDeviceVerification = URL(string: "https://bitwarden.com/help/new-device-verification/")! - /// A link to the password options within the passwords section of the settings menu. static let passwordOptions = URL(string: "App-prefs:PASSWORDS&path=PASSWORD_OPTIONS")! - /// A markdown link to Bitwarden's privacy policy. - static let privacyPolicy = URL(string: "https://bitwarden.com/privacy/")! - /// A markdown link to Bitwarden's help page about protecting individual items. static let protectIndividualItems = URL( string: "https://bitwarden.com/help/managing-items/#protect-individual-items", @@ -54,7 +43,7 @@ enum ExternalLinksConstants { /// A markdown link to Bitwarden's terms of service. static let termsOfService = URL(string: "https://bitwarden.com/terms/")! - /// A markdown link to Bitwarden's markting email preferences. + /// A markdown link to Bitwarden's marketing email preferences. static let unsubscribeFromMarketingEmails = URL(string: "https://bitwarden.com/email-preferences/")! /// A link to Bitwarden's help page for showing website icons.