From 9715da47c85f36cae13ec28dfbdcddf43f339ca5 Mon Sep 17 00:00:00 2001 From: Alexander Borsuk Date: Fri, 18 Jun 2021 13:19:39 +0200 Subject: [PATCH] [ios] Fixed crash on urls with spaces Signed-off-by: Alexander Borsuk --- iphone/Maps/Core/DeepLink/DeepLinkHandler.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iphone/Maps/Core/DeepLink/DeepLinkHandler.swift b/iphone/Maps/Core/DeepLink/DeepLinkHandler.swift index 03a3956072..f15b179324 100644 --- a/iphone/Maps/Core/DeepLink/DeepLinkHandler.swift +++ b/iphone/Maps/Core/DeepLink/DeepLinkHandler.swift @@ -28,7 +28,9 @@ func applicationDidReceiveUniversalLink(_ universalLink: URL) -> Bool { // Convert http(s)://omaps.app/ENCODEDCOORDS/NAME to om://ENCODEDCOORDS/NAME - self.url = URL(string: String(format: "om:/%@", universalLink.path)) + self.url = URL(string: universalLink.absoluteString + .replacingOccurrences(of: "http://omaps.app", with: "om:/") + .replacingOccurrences(of: "https://omaps.app", with: "om:/")) return handleDeepLink(url: self.url!) }