cloudant / swift-cloudant

A Swift Lang client for Cloudant and CouchDB
Apache License 2.0
42 stars 20 forks source link

Use CouchDBClient.version for user-agent string #173

Closed tomblench closed 6 years ago

tomblench commented 6 years ago

What

Fix incorrect behaviour when fetching version number for user-agent string

How

Bundle(for:) is not supported on Linux (https://github.com/apple/swift-corelibs-foundation/blob/master/Foundation/Bundle.swift), and we don't expect it to be supported any time soon.

Instead, define the version number in CouchDBClient and hardcode the first part of the user-agent as "SwiftCloudant".

Testing

All existing tests pass

TODO

Once merged, fix instructions in https://github.com/cloudant/cloudant-sync/blob/master/releasing-swift.md regarding version number updates.

Issues

See #170