diff --git a/Nudge/Utilities/Utils.swift b/Nudge/Utilities/Utils.swift index 90cac559..08ccce91 100644 --- a/Nudge/Utilities/Utils.swift +++ b/Nudge/Utilities/Utils.swift @@ -781,9 +781,16 @@ struct UIUtilities { return nil } - return URL(string: actionButtonPath) ?? URL(fileURLWithPath: actionButtonPath) + // Check if the string is a URL with a scheme + if URL(string: actionButtonPath)?.scheme != nil { + return URL(string: actionButtonPath) + } else { + // It's a file path + return URL(fileURLWithPath: actionButtonPath) + } } + if AppStateManager().requireMajorUpgrade() { if majorUpgradeAppPathExists { return URL(fileURLWithPath: OSVersionRequirementVariables.majorUpgradeAppPath)