[6.0.0] - 2022-05-04
This major version has accompanying migration guides for Swift and Objective-C. Please see the guide for more information on updating to this version of the SDK, as the following is just a summary of the changes.
Note that Objective-C bridging types are prefixed by Objc, but that prefix is not exposed to code written in Objective-C. For example, changes listed to ObjcLDClient are changes to the class referred to as LDClient from within Objective-C.
LDValue class to represent any data type that is allowed in JSON. This new type is used to provide more type safety when representing complex or non-statically determined data types. The SDK also provides the bridge types ObjcLDValue and ObjcLDValueType for Objective-C interoperability.UserAttribute class which provides a less error-prone way to refer to user attribute names in configuration.boolVariation, intVariation, doubleVariation, stringVariation, and jsonVariation, to LDClient.boolVariationDetail, intVariationDetail, doubleVariationDetail, stringVariationDetail, and jsonVariationDetail, to LDClient.jsonVariation and jsonVariationDetail to ObjcLDClient. These functions allow evaluating feature flags where the provided defaultValue and the resulting variation can be any valid JSON data type.ObjcLDJSONEvaluationDetail for retrieving the detailed evaluation information of arbitrary type flag variations.ObjcLDChangedFlagHandler type alias for new non-type specific Objective-C flag observers.LDClient.track(key: data: metricValue:) no longer throws.data parameter of LDClient.track(key: data: metricValue:) has changed from Any? to LDValue?.ObjcLDClient.track(key: data:) and ObjcLDClient.track(key: data: metricValue:) no longer throws. In Objective-C this change means that the track functions no longer accept a error: parameter.data parameter of ObjcLDClient.track(key: data:) and ObjcLDClient.track(key: data: metricValue) has changed from Any? to ObjLDValue?. In Objective-C this would be a change from id _Nullable to LDValue * _Nullable.LDClient.allFlags now has the type [LDFlagKey: LDValue]? rather than [LDFlagKey: Any]?.ObjcLDClient.allFlags now has the type [String: ObjcLDValue]? rather than [String: Any]?. In Objective-C this would be a change from NSDictionary<NSString*, id> * _Nullable to NSDictionary<NSString*, LDValue*> * _Nullable.LDUser.custom dictionary, and the corresponding LDUser.init parameter has been changed from [String: Any]? to [String: LDValue].ObjcLDUser.custom property has been changed from [String: Any]? to [String: ObjcLDValue]. In Objective-C this would be a change from NSDictionary<NSString*, id> * _Nullable to NSDictionary<NSString*, LDValue*> * _Nonnull.LDUser.privateAttributes property, and the corresponding LDUser.init parameter, have been changed from [String]? to [UserAttribute].ObjcLDUser.privateAttributes property has been changed from [String]? to [String]. In Objective-C this would be a change from NSArray<NSString*> * _Nullable to NSArray<NSString*> * _Nonnull.LDChangedFlag.oldValue and LDChangedFlag.newValue have been changed from Any? to LDValue.LDConfig.privateUserAttributes property has been changed from [String]? to [UserAttribute].ObjcLDConfig.privateUserAttributes now has the non-optional type [String] rather than [String]?. In Objective-C this would be a change from NSArray<NSString*> * _Nullable to NSArray<NSString*> * _Nonnull.LDEvaluationDetail.reason property has been changed from [String: Any] to [String: LDValue].reason property of ObjcLDBoolEvaluationDetail, ObjcLDIntegerEvaluationDetail, ObjcLDDoubleEvaluationDetail, and ObjcLDStringEvaluationDetail has been changed from [String: Any]? to [String: ObjcLDValue]?. In Objective-C this would be a change from NSDictionary<NSString*, id> * _Nullable to NSDictionary<NSString*, LDValue*> * _Nullable.Equatable instance for LDUser has been changed to compare all user properties, rather than just the key property."custom" as a private attribute name in LDConfig.privateUserAttributes or LDUser.privateAttributes will no longer set all LDUser custom attributes private.device and operatingSystem custom attributes can now be set private.LDClient.variation(forKey: defaultValue:) and LDClient.variationDetail(forKey: defaultValue:) functions. Please use the new type-specific variation functions instead (e.g. LDClient.boolVariation(forKey: defaultValue:)).LDFlagValueConvertible protocol which was previously used to constrain the parameters and return types of the variation functions.LDErrorHandler and LDClient.observeError(owner: handler:) have been removed. Please use ConnectionInformation instead.LDUser.init(userDictionary: ) and ObjcLDUser.init(userDictionary: ) initializers, please use the explicit initializers instead.LDUser.CodingKeys. To refer to user attributes, please use UserAttribute instead.LDUser.privatizableAttributes and ObjcLDUser.privatizableAttributes.ObjcLDUser.attributeCustom.LDUser.device and LDUser.operatingSystem properties, and the corresponding LDUser.init parameters have been removed. These fields will be included in the LDUser.custom dictionary.ObjcLDUser.device and ObjcLDUser.operatingSystem properties have been removed. These fields will be included in the ObjcLDUser.custom dictionary.ObjcLDClient functions, arrayVariation, arrayVariationDetail, dictionaryVariation, and dictionaryVariationDetail, have been removed. Please use ObjcLDClient.jsonVariation and ObjcLDClient.jsonVariationDetail instead.ObjcLDChangedFlag have been removed. Please use the base class ObjcLDChangedFlag, which now provides oldValue and newValue ObjcLDValue properties. The removed classes are ObjcLDBoolChangedFlag, ObjcLDIntegerChangedFlag, ObjcLDDoubleChangedFlag, ObjcLDStringChangedFlag, ObjcLDArrayChangedFlag, and ObjcLDDictionaryChangedFlag.ObjcLDArrayEvaluationDetail and ObjcLDDictionaryEvaluationDetail have been removed. Please use ObjcLDJSONEvaluationDetail instead.ObjcLDBoolChangedFlagHandler, ObjcLDIntegerChangedFlagHandler, ObjcLDDoubleChangedFlagHandler, ObjcLDStringChangedFlagHandler, ObjcLDArrayChangedFlagHandler, and ObjcLDDictionaryChangedFlagHandler, have been removed. Please use ObjcLDChangedFlagHandler instead.ObjcLDClient functions, observeBool, observeInteger, observeDouble, observeString, observeArray, and observeDictionary, have been removed. Please use the non-type specific ObjcLDClient.observe(key: owner: handler:) instead.Fetched April 11, 2026