-
Notifications
You must be signed in to change notification settings - Fork 94
Release 6.0 #269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release 6.0 #269
Conversation
Parameterize CI against multiple Xcode versions. Pin to exact dependency versions and remove resolved package files.
Add spaces in comments for new comment spacing lint rule.
…e that only compares keys. (#194)
|
Is there a replacement for |
|
Yes, you can use |
|
We have the following protocol that relies on it, not sure how to migrate it etc |
|
We'll have some migration guides published on the docs site shortly that may be helpful. The impression I get from your code sample is that the |
|
Here are the migration guides for Swift and Objective-C. |
|
Indeed you are correct, thanks for pointing out this issue in the migration guide. I've put a fix up internally, so it'll be fixed on the site as soon as it gets through review and release. Thanks! |

[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 toObjcLDClientare changes to the class referred to asLDClientfrom within Objective-C.Added
LDValueclass 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 typesObjcLDValueandObjcLDValueTypefor Objective-C interoperability.UserAttributeclass which provides a less error-prone way to refer to user attribute names in configuration.boolVariation,intVariation,doubleVariation,stringVariation, andjsonVariation, toLDClient.boolVariationDetail,intVariationDetail,doubleVariationDetail,stringVariationDetail, andjsonVariationDetail, toLDClient.jsonVariationandjsonVariationDetailtoObjcLDClient. These functions allow evaluating feature flags where the provideddefaultValueand the resulting variation can be any valid JSON data type.ObjcLDJSONEvaluationDetailfor retrieving the detailed evaluation information of arbitrary type flag variations.ObjcLDChangedFlagHandlertype alias for new non-type specific Objective-C flag observers.Changed (API)
LDClient.track(key: data: metricValue:)no longerthrows.dataparameter ofLDClient.track(key: data: metricValue:)has changed fromAny?toLDValue?.ObjcLDClient.track(key: data:)andObjcLDClient.track(key: data: metricValue:)no longerthrows. In Objective-C this change means that thetrackfunctions no longer accept aerror:parameter.dataparameter ofObjcLDClient.track(key: data:)andObjcLDClient.track(key: data: metricValue)has changed fromAny?toObjLDValue?. In Objective-C this would be a change fromid _NullabletoLDValue * _Nullable.LDClient.allFlagsnow has the type[LDFlagKey: LDValue]?rather than[LDFlagKey: Any]?.ObjcLDClient.allFlagsnow has the type[String: ObjcLDValue]?rather than[String: Any]?. In Objective-C this would be a change fromNSDictionary<NSString*, id> * _NullabletoNSDictionary<NSString*, LDValue*> * _Nullable.LDUser.customdictionary, and the correspondingLDUser.initparameter has been changed from[String: Any]?to[String: LDValue].ObjcLDUser.customproperty has been changed from[String: Any]?to[String: ObjcLDValue]. In Objective-C this would be a change fromNSDictionary<NSString*, id> * _NullabletoNSDictionary<NSString*, LDValue*> * _Nonnull.LDUser.privateAttributesproperty, and the correspondingLDUser.initparameter, have been changed from[String]?to[UserAttribute].ObjcLDUser.privateAttributesproperty has been changed from[String]?to[String]. In Objective-C this would be a change fromNSArray<NSString*> * _NullabletoNSArray<NSString*> * _Nonnull.LDChangedFlag.oldValueandLDChangedFlag.newValuehave been changed fromAny?toLDValue.LDConfig.privateUserAttributesproperty has been changed from[String]?to[UserAttribute].ObjcLDConfig.privateUserAttributesnow has the non-optional type[String]rather than[String]?. In Objective-C this would be a change fromNSArray<NSString*> * _NullabletoNSArray<NSString*> * _Nonnull.LDEvaluationDetail.reasonproperty has been changed from[String: Any]to[String: LDValue].reasonproperty ofObjcLDBoolEvaluationDetail,ObjcLDIntegerEvaluationDetail,ObjcLDDoubleEvaluationDetail, andObjcLDStringEvaluationDetailhas been changed from[String: Any]?to[String: ObjcLDValue]?. In Objective-C this would be a change fromNSDictionary<NSString*, id> * _NullabletoNSDictionary<NSString*, LDValue*> * _Nullable.Changed (behavioral)
Equatableinstance forLDUserhas been changed to compare all user properties, rather than just thekeyproperty."custom"as a private attribute name inLDConfig.privateUserAttributesorLDUser.privateAttributeswill no longer set allLDUsercustom attributes private.deviceandoperatingSystemcustom attributes can now be set private.Removed
LDClient.variation(forKey: defaultValue:)andLDClient.variationDetail(forKey: defaultValue:)functions. Please use the new type-specific variation functions instead (e.g.LDClient.boolVariation(forKey: defaultValue:)).LDFlagValueConvertibleprotocol which was previously used to constrain the parameters and return types of the variation functions.LDErrorHandlerandLDClient.observeError(owner: handler:)have been removed. Please useConnectionInformationinstead.LDUser.init(userDictionary: )andObjcLDUser.init(userDictionary: )initializers, please use the explicit initializers instead.LDUser.CodingKeys. To refer to user attributes, please useUserAttributeinstead.LDUser.privatizableAttributesandObjcLDUser.privatizableAttributes.ObjcLDUser.attributeCustom.LDUser.deviceandLDUser.operatingSystemproperties, and the correspondingLDUser.initparameters have been removed. These fields will be included in theLDUser.customdictionary.ObjcLDUser.deviceandObjcLDUser.operatingSystemproperties have been removed. These fields will be included in theObjcLDUser.customdictionary.ObjcLDClientfunctions,arrayVariation,arrayVariationDetail,dictionaryVariation, anddictionaryVariationDetail, have been removed. Please useObjcLDClient.jsonVariationandObjcLDClient.jsonVariationDetailinstead.ObjcLDChangedFlaghave been removed. Please use the base classObjcLDChangedFlag, which now providesoldValueandnewValueObjcLDValueproperties. The removed classes areObjcLDBoolChangedFlag,ObjcLDIntegerChangedFlag,ObjcLDDoubleChangedFlag,ObjcLDStringChangedFlag,ObjcLDArrayChangedFlag, andObjcLDDictionaryChangedFlag.ObjcLDArrayEvaluationDetailandObjcLDDictionaryEvaluationDetailhave been removed. Please useObjcLDJSONEvaluationDetailinstead.ObjcLDBoolChangedFlagHandler,ObjcLDIntegerChangedFlagHandler,ObjcLDDoubleChangedFlagHandler,ObjcLDStringChangedFlagHandler,ObjcLDArrayChangedFlagHandler, andObjcLDDictionaryChangedFlagHandler, have been removed. Please useObjcLDChangedFlagHandlerinstead.ObjcLDClientfunctions,observeBool,observeInteger,observeDouble,observeString,observeArray, andobserveDictionary, have been removed. Please use the non-type specificObjcLDClient.observe(key: owner: handler:)instead.