Last active
October 4, 2022 13:04
-
-
Save cci-rmirza/7b6a70cdd05dac465fe23338e9c499b6 to your computer and use it in GitHub Desktop.
Countly SDK Setup - TR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private func setCountly() { | |
let config = CountlyConfig() | |
config.appKey = Configuration.isInBeta ? "0de383003ac05f5e26c58e68caf68945ef95a478" : "c366cd0e6e796fb9a7457be62f9b3d3e8450aa1a" | |
config.host = "https://ccinext.count.ly" | |
config.features = [CLYFeature.pushNotifications, CLYFeature.crashReporting] | |
config.enableRemoteConfig = true | |
config.remoteConfigCompletionHandler = { (error : Error?) in | |
if error == nil { | |
RemoteConfigManager.shared.start() | |
} | |
else { | |
print("There was an error while fetching Remote Config:\n\(error!.localizedDescription)") | |
} | |
} | |
#if DEBUG | |
config.pushTestMode = CLYPushTestMode.development | |
config.enableDebug = true | |
config.sendPushTokenAlways = true | |
#endif | |
Countly.sharedInstance().start(with: config) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment