Invalid scheme for URLEndpoint url (http); must be either ws or wss

Hi, I am using Cocubase lite 2.x but following code getting crash.

 let kSyncEndpoint  = "http://ipaddress:4984/db/"
 let targetEndpoint = URLEndpoint(url: URL(string: kSyncEndpoint)!)
        let replConfig = ReplicatorConfiguration(database: database, target: targetEndpoint)
        
        replConfig.replicatorType = .pushAndPull
        replConfig.allowReplicatingInBackground = true
        replConfig.continuous = true
         replicator = Replicator(config: replConfig)
        replicator?.start()

But on replicator = Replicator(config: replConfig) app is getting crash with following error.

ASSERTION FAILED: Invalid scheme for URLEndpoint url (http); must be either ws or wss

Is it issue with http url? is it really required to use https url for testing purpose aslo?

Read the message again. It tells you what schemes to use.

The Couchbase Lite 2 replicator uses WebSockets, not (directly) HTTP.

Yes Jens, I was realized after i read document. so i marked as flaged.

Thanks for your reply.