Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
6628d30
Add xcode compatibility information to readme (#93)
bwoskow-ld Apr 24, 2020
f2fc6e8
Merge branch 'v4' of https://github.com/launchdarkly/ios-client-sdk
torchhound May 27, 2020
e3fe153
Merge branch 'v4' of https://github.com/launchdarkly/ios-client-sdk
torchhound Jun 4, 2020
0391739
Merge branch 'v5'
gwhelanLD Jul 23, 2020
9e0a614
Merge branch 'v5'
gwhelanLD Jul 23, 2020
c7f03af
Merge branch 'v5'
gwhelanLD Aug 4, 2020
d02a80d
Merge branch 'v5' of github.com:launchdarkly/ios-client-sdk
gwhelanLD Oct 9, 2020
bf3f8ac
Merge branch 'v5'
gwhelanLD Nov 6, 2020
988bcfc
Merge branch 'v5'
gwhelanLD Dec 17, 2020
7deb14a
Removed the guides link
bwoskow-ld Feb 3, 2021
35cbb28
Merge branch 'v5'
gwhelanLD Feb 11, 2021
f9c62c0
Merge branch 'v5'
gwhelanLD Feb 26, 2021
6cd5eec
Merge branch 'v5' of https://github.com/launchdarkly/ios-client-sdk i…
torchhound Apr 7, 2021
503cb8e
[ch110317] Replace `class` with equivalent `AnyObject` as the prior i…
gwhelanLD Jun 11, 2021
f544bff
Merge remote-tracking branch 'public/v5'
gwhelanLD Jun 11, 2021
2d9acce
Update dependencies. (#155)
gwhelanLD Jun 17, 2021
2dd2aa5
Merge branch 'v5'
gwhelanLD Jun 17, 2021
bb22146
Restore compatibility with Swift 5.2 (#156)
gwhelanLD Jun 17, 2021
54aef07
Merge branch 'v5'
gwhelanLD Jun 18, 2021
5de6afc
Merge branch 'v5'
gwhelanLD Jun 18, 2021
b9d04c6
Update Sourcery and SwiftLint. (#157)
gwhelanLD Jun 22, 2021
8ea40ad
[ch115624] Fixes for polling mode (#158)
gwhelanLD Aug 9, 2021
f4a74cc
Merge branch 'v5'
gwhelanLD Aug 13, 2021
5c04f08
[ch115552] Filter deep nulls in flag data. (#159)
gwhelanLD Aug 13, 2021
2c8db33
Merge branch 'v5'
gwhelanLD Aug 13, 2021
a2bf12b
Add CI job for Xcode 13. (#160)
gwhelanLD Oct 1, 2021
d2e99bd
Remove Cartfile that specifies redundant framework dependency on LDSw…
gwhelanLD Nov 19, 2021
be3ff00
Fix CircleCI and improve build time of documentation step (#163)
gwhelanLD Dec 8, 2021
bfe48df
Permit additional fields on delete dictionary. (#164)
gwhelanLD Dec 28, 2021
22f1aff
Cleanup error notifier (#165)
gwhelanLD Dec 28, 2021
425154e
Remove oldest deprecated caches.
gwhelanLD Jan 6, 2022
15949b6
Remove LDFlagBaseTypeConvertible we never used.
gwhelanLD Jan 6, 2022
302a5d5
Break out variaiton methods from LDClient.swift.
gwhelanLD Jan 6, 2022
a97c363
Remove FlagStore from within LDUser.
gwhelanLD Jan 6, 2022
15d68fa
Simplify cache load in identify.
gwhelanLD Jan 9, 2022
000ca61
Improvements to LDTimer and Throttler cleanup. (#170)
gwhelanLD Jan 12, 2022
53799f2
Remove variation methods that allowed optional default values, and im…
gwhelanLD Jan 18, 2022
b732e7a
Update LDSwiftEventSource version and test dependencies. (#172)
gwhelanLD Jan 19, 2022
2f24471
Merge branch 'v5'
louis-launchdarkly Jan 19, 2022
822703a
(v6) Remove oldest deprecated caches. (#166)
gwhelanLD Jan 19, 2022
79a30b7
Merge branch 'v6' into gw/remove-base-type-convertible
gwhelanLD Jan 19, 2022
ca6a45d
Merge branch 'gw/remove-base-type-convertible' into gw/break-up-client
gwhelanLD Jan 19, 2022
66df0fb
Merge branch 'gw/break-up-client' into gw/remove-user-flag-store
gwhelanLD Jan 19, 2022
3ab332b
Merge pull request #167 from launchdarkly/gw/remove-base-type-convert…
gwhelanLD Jan 20, 2022
d36d2d6
Merge pull request #168 from launchdarkly/gw/break-up-client
gwhelanLD Jan 20, 2022
ecefd76
Merge pull request #169 from launchdarkly/gw/remove-user-flag-store
gwhelanLD Jan 20, 2022
216f929
Merge pull request #171 from launchdarkly/gw/remove-optional-variation
gwhelanLD Jan 20, 2022
dcce03e
Use CircleCI macOS Gen2 resource class. (#173)
gwhelanLD Feb 4, 2022
b90ff4a
Merge branch 'master' into v6
gwhelanLD Feb 4, 2022
e4073ad
Remove ErrorNotifier and file headers.
gwhelanLD Mar 7, 2022
e67ee30
(V6) Remove ErrorNotifier and file headers (#174)
gwhelanLD Mar 9, 2022
916c185
(V6) Remove Date extensions, isWithin and isEarlierThan. (#175)
gwhelanLD Mar 9, 2022
466d2a8
(V6) Remove test helper and tests for test helper that was not used. …
gwhelanLD Mar 9, 2022
cebd6f2
Remove functionality of privatizing all custom attributes with the pr…
gwhelanLD Mar 10, 2022
1cb2067
Simplify event reporting complete callback to not include published d…
gwhelanLD Mar 10, 2022
096ad3e
Add UserAttribute class.
gwhelanLD Mar 10, 2022
99256d5
Remove Dictionary initializer for LDUser.
gwhelanLD Mar 10, 2022
bd239e7
Merge pull request #177 from launchdarkly/gw/lduser-simplification
gwhelanLD Mar 11, 2022
a4231b0
Merge pull request #178 from launchdarkly/gw/simplify-event-reporting…
gwhelanLD Mar 11, 2022
a98286f
Merge pull request #179 from launchdarkly/gw/add-user-attribute
gwhelanLD Mar 11, 2022
ec8c2cd
Merge pull request #180 from launchdarkly/gw/remove-lduser-dict-init
gwhelanLD Mar 11, 2022
121eda5
Use LDValue for LDUser custom attributes and add Encodable implementa…
gwhelanLD Mar 11, 2022
9fb18b6
Bump LDSwiftEventSource to 1.3.1 to fix race condition. (#182)
gwhelanLD Mar 11, 2022
2be5569
Merge branch 'v5'
gwhelanLD Mar 11, 2022
dd7cfc4
Merge branch 'master' into v6
gwhelanLD Mar 14, 2022
b67929f
Merge branch 'v6' into gw/sc-144834/lduser-ldvalue
gwhelanLD Mar 14, 2022
61f92be
Silence warning so CI validation passes.
gwhelanLD Mar 14, 2022
8f4d721
Use LDValue for Event fields and summarization.
gwhelanLD Mar 15, 2022
f6ebd86
Use Encodable instances for Event serialization.
gwhelanLD Mar 16, 2022
79705a2
Break up Event model into multiple SubEvent models.
gwhelanLD Mar 16, 2022
f537121
Clean up EventReporterSpec.
gwhelanLD Mar 16, 2022
1aceb27
Use LDValue for LDChangedFlag.
gwhelanLD Mar 18, 2022
782f828
Use LDValue to simplify DiagnosticEventSpec encoding tests.
gwhelanLD Mar 18, 2022
0b7539c
Remove unused import.
gwhelanLD Mar 18, 2022
95d9005
Remove unused LDUser code.
gwhelanLD Mar 18, 2022
26cef81
Make trackEvents and trackReason non-optional in FeatureFlag and spec…
gwhelanLD Mar 21, 2022
ac0fda3
Merge pull request #181 from launchdarkly/gw/sc-144834/lduser-ldvalue
gwhelanLD Mar 21, 2022
b40e3d2
Merge pull request #183 from launchdarkly/gw/sc-144831/ldavlue-for-ev…
gwhelanLD Mar 21, 2022
6e67675
Merge pull request #184 from launchdarkly/gw/sc-144845/encodable-events
gwhelanLD Mar 21, 2022
b3397cb
Merge pull request #185 from launchdarkly/gw/sc-144844/break-up-event
gwhelanLD Mar 21, 2022
ca3ddc4
Merge pull request #186 from launchdarkly/gw/event-reporter-spec-cleanup
gwhelanLD Mar 22, 2022
d83ad6e
Merge pull request #188 from launchdarkly/gw/use-ldvalue-for-ldchange…
gwhelanLD Mar 22, 2022
d70421f
Merge pull request #189 from launchdarkly/gw/simplify-diagnosticevent…
gwhelanLD Mar 22, 2022
85d2c27
Merge pull request #190 from launchdarkly/gw/remove-unused-lduser-code
gwhelanLD Mar 22, 2022
257550e
Merge pull request #191 from launchdarkly/gw/non-optional-tracking-fl…
gwhelanLD Mar 22, 2022
c6201c5
(V6) Add Codable instance for FeatureFlag. (#192)
gwhelanLD Mar 25, 2022
18c3c9b
(V6) LDValue for flags (#193)
gwhelanLD Apr 21, 2022
979bf7f
Update LDUser to use default equatable instance rather than custom on…
gwhelanLD Apr 22, 2022
ade9499
(V6) Objective-C bridging (#196)
gwhelanLD May 2, 2022
a0e04ec
(V6) Bring back some ObjcLDUser attribute* constants (#198)
gwhelanLD May 4, 2022
ccc5702
master -> main
keelerm84 May 4, 2022
7a0d0ea
Merge branch 'v6'
keelerm84 May 4, 2022
7fd2c0c
Update changelog for 6.0 release
keelerm84 May 4, 2022
040a40a
Bump versions
keelerm84 May 4, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
- run:
name: CocoaPods spec lint
command: |
if [ "$CIRCLE_BRANCH" = 'master' ]; then
if [ "$CIRCLE_BRANCH" = 'main' ]; then
pod spec lint
else
pod lib lint
Expand Down
2 changes: 1 addition & 1 deletion .circleci/run-build-locally.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ curl --user ${CIRCLE_TOKEN}: \
--request POST \
--form config=@.circleci/config.yml \
--form notify=false \
https://circleci.com/api/v1.1/project/github/launchdarkly/ios-swift-client-sdk-private/tree/master
https://circleci.com/api/v1.1/project/github/launchdarkly/ios-swift-client-sdk-private/tree/main
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
**Requirements**

- [ ] I have added test coverage for new or changed functionality
- [ ] I have followed the repository's [pull request submission guidelines](../blob/master/CONTRIBUTING.md#submitting-pull-requests)
- [ ] I have followed the repository's [pull request submission guidelines](../blob/v6/CONTRIBUTING.md#submitting-pull-requests)
- [ ] I have validated my changes against all supported platform versions

**Related issues**
Expand Down
19 changes: 6 additions & 13 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ custom_categories:
- LDConfig
- LDUser
- LDEvaluationDetail
- LDValue

- name: Flag Change Observers
children:
Expand All @@ -35,33 +36,25 @@ custom_categories:

- name: Other Types
children:
- UserAttribute
- LDStreamingMode
- LDFlagValueConvertible
- LDFlagKey
- LDInvalidArgumentError
- LDErrorHandler
- RequestHeaderTransform

- name: Objective-C Core Interfaces
children:
- ObjcLDClient
- ObjcLDConfig
- ObjcLDUser
- ObjcLDChangedFlag
- ObjcLDValue
- ObjcLDValueType

- name: Objective-C EvaluationDetail Wrappers
children:
- ObjcLDBoolEvaluationDetail
- ObjcLDIntegerEvaluationDetail
- ObjcLDDoubleEvaluationDetail
- ObjcLDStringEvaluationDetail
- ObjcLDArrayEvaluationDetail
- ObjcLDDictionaryEvaluationDetail

- name: Objective-C ChangedFlag Wrappers
children:
- ObjcLDBoolChangedFlag
- ObjcLDIntegerChangedFlag
- ObjcLDDoubleChangedFlag
- ObjcLDStringChangedFlag
- ObjcLDArrayChangedFlag
- ObjcLDDictionaryChangedFlag
- ObjcLDJSONEvaluationDetail
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,58 @@

All notable changes to the LaunchDarkly iOS SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).

## [6.0.0] - 2022-05-04

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.

### Added
- Added the `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.
- Added the `UserAttribute` class which provides a less error-prone way to refer to user attribute names in configuration.
- Added the type specific variation functions, `boolVariation`, `intVariation`, `doubleVariation`, `stringVariation`, and `jsonVariation`, to `LDClient`.
- Added the type specific detailed variation functions, `boolVariationDetail`, `intVariationDetail`, `doubleVariationDetail`, `stringVariationDetail`, and `jsonVariationDetail`, to `LDClient`.
- Added `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.
- Added `ObjcLDJSONEvaluationDetail` for retrieving the detailed evaluation information of arbitrary type flag variations.
- Added `ObjcLDChangedFlagHandler` type alias for new non-type specific Objective-C flag observers.

### Changed (API)
- `LDClient.track(key: data: metricValue:)` no longer `throws`.
- The type of the `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.
- The type of the `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`.
- The type of the `LDUser.custom` dictionary, and the corresponding `LDUser.init` parameter has been changed from `[String: Any]?` to `[String: LDValue]`.
- The type of the `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`.
- The type of the `LDUser.privateAttributes` property, and the corresponding `LDUser.init` parameter, have been changed from `[String]?` to `[UserAttribute]`.
- The type of the `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`.
- The types of the properties `LDChangedFlag.oldValue` and `LDChangedFlag.newValue` have been changed from `Any?` to `LDValue`.
- The type of the `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`.
- The type of the `LDEvaluationDetail.reason` property has been changed from `[String: Any]` to `[String: LDValue]`.
- The type of the `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`.

### Changed (behavioral)
- The `Equatable` instance for `LDUser` has been changed to compare all user properties, rather than just the `key` property.
- Using `"custom"` as a private attribute name in `LDConfig.privateUserAttributes` or `LDUser.privateAttributes` will no longer set all `LDUser` custom attributes private.
- The automatically set `device` and `operatingSystem` custom attributes can now be set private.
- SDK versions from 4.0.0 and less than 6.0.0 supported migration of cached flag data from any SDK version of at least 2.3.3. The 6.0.0 release only supports migration of cached flag data from SDK versions of at least 4.0.0.

### Removed
- Removed `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:)`).
- Removed the `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.
- Removed the `LDUser.init(userDictionary: )` and `ObjcLDUser.init(userDictionary: )` initializers, please use the explicit initializers instead.
- Removed `LDUser.CodingKeys`. To refer to user attributes, please use `UserAttribute` instead.
- Removed `LDUser.privatizableAttributes` and `ObjcLDUser.privatizableAttributes`.
- Removed `ObjcLDUser.attributeCustom`.
- The `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.
- The `ObjcLDUser.device` and `ObjcLDUser.operatingSystem` properties have been removed. These fields will be included in the `ObjcLDUser.custom` dictionary.
- The `ObjcLDClient` functions, `arrayVariation`, `arrayVariationDetail`, `dictionaryVariation`, and `dictionaryVariationDetail`, have been removed. Please use `ObjcLDClient.jsonVariation` and `ObjcLDClient.jsonVariationDetail` instead.
- The per-type instances of `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`.
- The classes `ObjcLDArrayEvaluationDetail` and `ObjcLDDictionaryEvaluationDetail` have been removed. Please use `ObjcLDJSONEvaluationDetail` instead.
- The type aliases, `ObjcLDBoolChangedFlagHandler`, `ObjcLDIntegerChangedFlagHandler`, `ObjcLDDoubleChangedFlagHandler`, `ObjcLDStringChangedFlagHandler`, `ObjcLDArrayChangedFlagHandler`, and `ObjcLDDictionaryChangedFlagHandler`, have been removed. Please use `ObjcLDChangedFlagHandler` instead.
- The `ObjcLDClient` functions, `observeBool`, `observeInteger`, `observeDouble`, `observeString`, `observeArray`, and `observeDictionary`, have been removed. Please use the non-type specific `ObjcLDClient.observe(key: owner: handler:)` instead.

## [5.4.5] - 2022-03-11
### Fixed
- Fixed race condition in `LDSwiftEventSource` that could cause a crash if the stream is explicitly stopped (such as when `identify` is called) while the stream is waiting to reconnect.
Expand Down
2 changes: 1 addition & 1 deletion LaunchDarkly.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Pod::Spec.new do |ld|

ld.name = "LaunchDarkly"
ld.version = "5.4.5"
ld.version = "6.0.0"
ld.summary = "iOS SDK for LaunchDarkly"

ld.description = <<-DESC
Expand Down
Loading