From 74ae31cd350c36c50283dbde4fd2c5af640541dc Mon Sep 17 00:00:00 2001 From: Arif Burak Demiray <57103426+arifBurakDemiray@users.noreply.github.com> Date: Mon, 29 Jan 2024 13:35:43 +0000 Subject: [PATCH] [CPP] Add warnings to all SDK example apps that would check if propper credentials have been set or it still has the defaults. (#132) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: warn for default * Update example_integration.cpp * Update example_integration.cpp --------- Co-authored-by: Artūrs Kadiķis --- examples/example_integration.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/example_integration.cpp b/examples/example_integration.cpp index 1497337..e8306aa 100644 --- a/examples/example_integration.cpp +++ b/examples/example_integration.cpp @@ -47,7 +47,14 @@ int main() { ct.SetMetrics("Windows 10", "10.22", "Mac", "800x600", "Carrier", "1.0"); // start the SDK (initialize the SDK) - ct.start("YOUR_APP_KEY", "https://try.count.ly", 443, true); + string _appKey = "YOUR_APP_KEY"; + string _serverUrl = "https://your.server.ly"; + + if(_appKey.compare("YOUR_APP_KEY") == 0 || _serverUrl.compare("https://your.server.ly") == 0) { + cerr << "Please do not use default set of app key and server url" << endl; + } + + ct.start(_appKey, _serverUrl, 443, true); ct.setAutomaticSessionUpdateInterval(5);// The value is set so low just for internal validation. ct.setMaxRQProcessingBatchSize(2); // in most cases not needed to be set. The value is set so low just for internal validation