diff --git a/PayForMe.xcodeproj/project.pbxproj b/PayForMe.xcodeproj/project.pbxproj index 795c50f..16ef506 100644 --- a/PayForMe.xcodeproj/project.pbxproj +++ b/PayForMe.xcodeproj/project.pbxproj @@ -804,7 +804,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5; + MARKETING_VERSION = 2.5.1; PRODUCT_BUNDLE_IDENTIFIER = de.mayflower.PayForMe; PRODUCT_NAME = PayForMe; SWIFT_VERSION = 5.0; @@ -829,7 +829,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5; + MARKETING_VERSION = 2.5.1; PRODUCT_BUNDLE_IDENTIFIER = de.mayflower.PayForMe; PRODUCT_NAME = PayForMe; SWIFT_VERSION = 5.0; diff --git a/PayForMe.xcworkspace/xcshareddata/swiftpm/Package.resolved b/PayForMe.xcworkspace/xcshareddata/swiftpm/Package.resolved index 224c859..fb409cb 100644 --- a/PayForMe.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/PayForMe.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -15,8 +15,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/groue/GRDB.swift.git", "state" : { - "revision" : "04e73c26c4ce8218ab85aaf791942bb0b204f330", - "version" : "7.4.1" + "revision" : "a5a1be26b4513dc7ec360eb56bc08a345bac6649", + "version" : "7.5.0" } }, { diff --git a/PayForMe/Util/Util.swift b/PayForMe/Util/Util.swift index b3c2dfa..a191874 100644 --- a/PayForMe/Util/Util.swift +++ b/PayForMe/Util/Util.swift @@ -190,15 +190,22 @@ extension URL { func decodeCospendString() -> ProjectData { guard let host = host, let scheme = scheme, - scheme.localizedCaseInsensitiveContains("cospend"), - pathComponents.count >= 2, - pathComponents.count <= 3 + scheme.localizedCaseInsensitiveContains("cospend") else { return (nil, nil, nil) } - return (URL(string: "https://\(host)" + ((port != nil) ? ":\(port!)" : "")), - pathComponents[1], - pathComponents[safe: 2]) + + var hostString = "https://\(host)" + + if let port = port {hostString += ":\(port)"} + + if pathComponents.count > 3 { + hostString += "/" + pathComponents[1..<(pathComponents.count - 2)].joined(separator: "/") + } + + return (URL(string: hostString), + pathComponents[safe: pathComponents.count - 2], + pathComponents.last) } }