From 3685f7d1958a214ad2352a4b53c14a2600f12fba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=A1vio=20Caetano?= Date: Fri, 26 Jan 2018 11:37:10 -0500 Subject: [PATCH] Fix: better logging for when protocol isn't found on --- ReCaptcha/Classes/ReCaptcha.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ReCaptcha/Classes/ReCaptcha.swift b/ReCaptcha/Classes/ReCaptcha.swift index 27ccaef..5a29dd0 100644 --- a/ReCaptcha/Classes/ReCaptcha.swift +++ b/ReCaptcha/Classes/ReCaptcha.swift @@ -143,8 +143,11 @@ private extension ReCaptcha.Config { return url } +#if DEBUG + print("⚠️ WARNING! Protocol not found for ReCaptcha domain (\(url))! You should add http:// or https:// to it!") +#endif + if let fixedURL = URL(string: "http://" + url.absoluteString) { - debugPrint("[ReCaptcha] - Prepending 'http://' to url (\(url))") return fixedURL }