Swiftpack.co - Swift Packages by configcat

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.

Packages published by configcat

configcat/swift-sdk 11.0.2
ConfigCat SDK for Swift. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.
⭐️ 19
🕓 2 weeks ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
v11.0.2
2 weeks ago
### Fixed - The custom base URL was overridden by the config JSON preferences URL.
v11.0.1
4 weeks ago
### Fixed - Wrong condition (introduced in `11.0.0`) used by the cache validity check. The previous condition did not allow the reloading of the in-memory cache when the external cache data was modified.
v11.0.0
5 weeks ago
### Added - Support for the new Config JSON v6 format: updated the config model and implemented new features in setting evaluation logic. - Ability to pass a custom logger (by conforming `protocol ConfigCatLogger`) implementation with the `logger` configuration option. The default logger implementation still using `os_log`. - [Privacy manifest](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files#4284009) file that describes the SDK's required reason API usage. - `visionOS` device platform support. ### Breaking changes - The `onConfigChanged` hook now gets a `Config` object that contains all the newly downloaded settings & segments. - The `custom` init parameter of `ConfigCatUser` now accepts `Any` typed values not just strings. This allows the usage of various types in the user object's custom attributes. - Renamed `matchedEvaluationRule` / `matchedEvaluationPercentageRule` properties of `EvaluationDetails` to `matchedTargetingRule` / `matchedPercentageOption` - Renamed `LogLevel` to `ConfigCatLogLevel`.
v10.0.0
34 weeks ago
### Added - The concept of **Snapshots**. They are for capturing the state of the SDK's feature flag data. A snapshot allows synchronous operations on the captured context. ```swift let snapshot = configCatClient.snapshot() let isMyFeatureEnabled = snapshot.getValue(for: "isMyFeatureEnabled", defaultValue: false) ``` Snapshots are created from the actual state of the SDK; therefore, it's crucial to know whether the SDK has valid feature flag data to work on. The SDK already provides an `onClientReady` hook to determine whether creating snapshots is safe. It's being changed to accept a `state` parameter to give details about the SDK's initialization state. ```swift client.hooks.addOnReady { state in // the state parameter indicates what is the SDK's initialization state } ``` These are the possible `state` values: - `noFlagData`: This means the SDK has no feature flag data to work on (it didn't get anything from the cache or the network) - `hasLocalOverrideFlagDataOnly`: The SDK was initialized with `localOnly` [flag overrides](https://configcat.com/docs/sdk-reference/ios/#flag-overrides). - `hasCachedFlagDataOnly`: The SDK has feature flag data only from the cache. It can happen when the SDK is configured with `PollingModes.manualPoll()` and there isn't yet a `client.forceRefresh()` call. Another example could be an SDK configured with `PollingModes.autoPoll()`, but it can't reach the ConfigCat CDN, so it falls back to the cache. - `hasUpToDateFlagData`: The SDK is initialized with up-to-date feature flag data. This functionality was extended with a new awaitable method `waitForReady()`, which asynchronously waits for the `onClientReady` hook to fire and returns with the SDK's initialization state. ```swift let state = await client.waitForReady() ``` ### Changed - Standardized config cache key generation algorithm and cache payload format to allow [shared caches](https://configcat.com/docs/advanced/caching/#shared-cache) to be used by SDKs of different platforms. ### Removed - `getVariationId()` and `getAllVariationIds()`. Alternative: `getValueDetails()` / `getAllValueDetails()`. - `refresh()`. Alternative: `forceRefresh()`. - Init function of `PollingModes.autoPoll()` with an `onConfigChanged` callback parameter. Alternative for subscribing to config changes: [Hooks](https://configcat.com/docs/sdk-reference/ios/#hooks). - Each `***Sync()` method that used `DispatchSemaphore` for synchronizing mainly asynchronous operations. For an alternative, see the added **Snapshots** feature.
v9.4.0
1 year ago
- Deprecated each `...Sync()` method. The synchronization with `DispatchSemaphore` is considered dangerous due to thread priority inversion. More details [here](https://developer.apple.com/documentation/xcode/diagnosing-performance-issues-early). As there is no official way to do this in a safe way we'll remove these methods in the next major version.
v9.3.0
1 year ago
- Set a default cache implementation that uses `UserDefaults` to store the latest `config.json`. - Added `getAllValueDetails()` method. - Deprecated `getVariationId()` and `getAllVariationIds()` methods in favor of `getValueDetails()` and `getAllValueDetails()`.
v9.2.4
1 year ago
### Fixed - Call `onClientReady` upon offline mode initialization.
v9.2.3
1 year ago
### Fixed - A bug where calling `close()` on an already closed instance could remove an other instance from the singleton map that was created with the same SDK key. - Added missing methods to `ConfigCatClientProtocol`.
v9.2.2
1 year ago
### Fixed - Exposed missing types and functions to Objective-C.
v9.2.1
1 year ago
### Added - New factory method which accepts a configuration callback. ```swift let client = ConfigCatClient.get(sdkKey: "<sdkKey>") { options in options.pollingMode = PollingModes.autoPoll() } ```
iOS macOS watchOS tvOS

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics