Skip to content

Commit 74ae31c

Browse files
[CPP] Add warnings to all SDK example apps that would check if propper credentials have been set or it still has the defaults. (#132)
* feat: warn for default * Update example_integration.cpp * Update example_integration.cpp --------- Co-authored-by: Artūrs Kadiķis <[email protected]>
1 parent 6537dad commit 74ae31c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

examples/example_integration.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,14 @@ int main() {
4747
ct.SetMetrics("Windows 10", "10.22", "Mac", "800x600", "Carrier", "1.0");
4848

4949
// start the SDK (initialize the SDK)
50-
ct.start("YOUR_APP_KEY", "https://try.count.ly", 443, true);
50+
string _appKey = "YOUR_APP_KEY";
51+
string _serverUrl = "https://your.server.ly";
52+
53+
if(_appKey.compare("YOUR_APP_KEY") == 0 || _serverUrl.compare("https://your.server.ly") == 0) {
54+
cerr << "Please do not use default set of app key and server url" << endl;
55+
}
56+
57+
ct.start(_appKey, _serverUrl, 443, true);
5158

5259
ct.setAutomaticSessionUpdateInterval(5);// The value is set so low just for internal validation.
5360
ct.setMaxRQProcessingBatchSize(2); // in most cases not needed to be set. The value is set so low just for internal validation

0 commit comments

Comments
 (0)