From c736fb238bd81707707568e24ba71d4eef3cc7ba Mon Sep 17 00:00:00 2001 From: Nobuhiro Ito Date: Mon, 16 Dec 2019 14:03:47 +0900 Subject: [PATCH] remove source application validation for iOS 13.3 --- Sources/TwitterAuthentication.swift | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Sources/TwitterAuthentication.swift b/Sources/TwitterAuthentication.swift index c6f2cbe..4b30978 100644 --- a/Sources/TwitterAuthentication.swift +++ b/Sources/TwitterAuthentication.swift @@ -74,7 +74,6 @@ public class TwitterAuthentication: NSObject { public func handleOpen(_ url: URL, options: [UIApplication.OpenURLOptionsKey:Any]) -> Bool { guard url.scheme == callbackURL.scheme, - validateAcceptableSourceApp(options), state != .initial, state != .requestingToken else { return false } @@ -209,14 +208,6 @@ private extension TwitterAuthentication { } } } - - func validateAcceptableSourceApp(_ options: [UIApplication.OpenURLOptionsKey:Any]) -> Bool { - guard let source = options[.sourceApplication] as? String else { - return false - } - return source.hasPrefix("com.twitter") || source.hasPrefix("com.atebits") // Twitter App - || source.hasPrefix("com.apple.SafariViewService") // SFSafariViewController - } } //------------------------------------------------------------------------------------------