Search code examples
ioscountly-analytics

Countly iOS SDK fails request


I have added Count.ly iOS SDK to project, in didFinishLaunchingWithOptions I have added Count.ly initialisation as

        let config: CountlyConfig = CountlyConfig()
        config.appKey = "MY_APP_KEY"
        config.host = "https://try.count.ly/"
        config.enableDebug = true
        config.deviceID = CLYIDFV
        config.updateSessionPeriod = 300
        //You can specify optional features you want here
        config.features = [CLYCrashReporting, CLYAutoViewTracking]

        Countly.sharedInstance().start(with: config)

But in console it is giving error

[Countly] Request <0x170003290> failed!

And it is not showing anything on dashboard. My Account is on trial version enterprise edition. Do I have to do any other configuration?


Solution

  • Please make sure you do not add extra / at the end of host.

    config.host = "https://try.count.ly/"
    

    should be

    config.host = "https://try.count.ly"
    

    Disclaimer: I'm the SDK Developer

    (EDIT: incorrect host configurations like this one is now handled automatically on v17.05+)