From c06947d51e1bafcd4cbfb3efac1ad3f6765d32fd Mon Sep 17 00:00:00 2001 From: John Sundell Date: Tue, 21 Aug 2018 13:14:07 +0200 Subject: [PATCH] Networking: Remove now obsolete (and uncompilable) code path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change removes a code path that would be run on iOS 8.2 or below, but since the minimum deployment target is 9.2, we don’t need to keep it around. It’s also not compilable anymore. --- Sources/Shared/Networking/Networking.swift | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/Sources/Shared/Networking/Networking.swift b/Sources/Shared/Networking/Networking.swift index 65facb8..64c16ba 100644 --- a/Sources/Shared/Networking/Networking.swift +++ b/Sources/Shared/Networking/Networking.swift @@ -86,27 +86,8 @@ fileprivate struct QueryBuilder { allowedCharacters.removeCharacters(in: escapingCharacters) - var escapedString = "" - - if #available(iOS 8.3, *) { - escapedString = string.addingPercentEncoding( + return string.addingPercentEncoding( withAllowedCharacters: allowedCharacters as CharacterSet) ?? string - } else { - var index = string.startIndex - - while index != string.endIndex { - let endIndex = string.index(index, offsetBy: 50, limitedBy: string.endIndex) ?? string.endIndex - let range = Range(index..