Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
abe59a0
Changes user-device to device model identifier (#75)
markpokornycos May 17, 2019
a0ed7a0
Replaced entire flag store ff array instead of in place manipulation
torchhound Jun 18, 2019
41572d9
Updated CHANGELOG and bumped version number
torchhound Jun 18, 2019
706768d
Added correct copy behavior to FlagStore delete and update
torchhound Jun 18, 2019
1a924a0
Merge pull request #76 from launchdarkly/jc/concurrency-fix
torchhound Jun 18, 2019
a7fc8c6
Improved CHANGELOG entry for 4.0.1
torchhound Jun 18, 2019
825908c
Changed version to 4.1.0, updated CHANGELOG
torchhound Jun 19, 2019
f204362
Update 4.1.0 release date
torchhound Jun 19, 2019
35fe469
installs ios-eventsource 4.0.2
markpokornycos Jun 25, 2019
872dc91
installs CocoaPods 1.7.2
markpokornycos Jun 25, 2019
a25e6ff
clears swift 5 update warning
markpokornycos Jun 25, 2019
ea1eb0f
updates circle config to use xcode 10.2.1
markpokornycos Jun 25, 2019
bbe700f
advances version to 4.1.1
markpokornycos Jun 25, 2019
3b49d6d
installs Nimble 8.0.2
markpokornycos Jun 25, 2019
e1ebc1d
updates SwiftLint to 0.33.0
markpokornycos Jun 25, 2019
ff7b3b0
Merge branch 'master' into next-release
torchhound Jul 9, 2019
403aad9
Update 4.1.1 release date
torchhound Jul 9, 2019
7da46cb
Improved CHANGELOG 4.1.1 description
torchhound Jul 9, 2019
419b138
Made CHANGELOG 4.1.1 more consistent
torchhound Jul 9, 2019
27e6b7e
Merge pull request #77 from launchdarkly/version_4.1.1
torchhound Jul 9, 2019
802dff6
Merge branch 'master' into next-release
torchhound Jul 9, 2019
dfbb85f
Merge branch 'master' into next-release
torchhound Jul 10, 2019
c5589c2
4.1.2 release, updated version numbers and CHANGELOG
torchhound Jul 11, 2019
6c007f8
Made 4.1.2 CHANGELOG entry more descriptive
torchhound Jul 11, 2019
19e9764
Merge branch 'master' into next-release
torchhound Jul 11, 2019
71b1a4e
Rebuilt Connection Status, added unit tests, fixed warnings
torchhound Aug 16, 2019
63a0ad2
Changed guard to equals in Dictionary extension, changed ConnectionIn…
torchhound Aug 16, 2019
7e0c447
Fixed threading issues and reference semantics
torchhound Aug 16, 2019
6d942ef
Improved ConnectionInformation toString, fixed background behavior
torchhound Aug 23, 2019
13e3224
Added network connectivity check, changed TimeIntervals to Optionals
torchhound Aug 26, 2019
283a1a0
Added Connection Status files to correct Target Membership, added con…
torchhound Aug 26, 2019
2a288cc
PR review changes
torchhound Aug 27, 2019
f034c6b
More PR review changes
torchhound Aug 27, 2019
4bc8148
Even more PR review changes
torchhound Aug 27, 2019
c200953
Removed ConnectionInformationCaching, removed redundant variables
torchhound Aug 27, 2019
4b83ed3
Simplified synchronizing error behavior for connection status
torchhound Aug 27, 2019
37edbd2
DRY up setupListeners
torchhound Aug 27, 2019
43fba6d
Fixed string cases for LastConnectionFailureReason Codable
torchhound Aug 27, 2019
07983fb
Forgot to add polling last successful connection
torchhound Aug 28, 2019
962111b
Store is now in Cache dir, removed listeners and 1 ldclient.shared, c…
torchhound Aug 29, 2019
acbbe2f
Added ConnectionModeChangedObserver
torchhound Aug 29, 2019
11f1fcb
Fixed confusing docstring, removed unnecessary flag synchronizer
torchhound Aug 29, 2019
4ea4674
Changed getValue and toString to description
torchhound Aug 29, 2019
178199d
Changed description to computed property
torchhound Aug 29, 2019
cbc7d92
Removed connectionModeCheck
torchhound Aug 29, 2019
8ee3fde
Improved background connection status behavior
torchhound Aug 29, 2019
05cd525
Changed ConnectionInformation description to computed property
torchhound Aug 29, 2019
b29f212
Merge pull request #78 from launchdarkly/jc/ch34534/connection-status-v2
torchhound Sep 9, 2019
eae3119
Added new identify method, updated swiftlint rules
torchhound Sep 9, 2019
b637c84
Made Identify actually change the user, fixed unit tests
torchhound Sep 11, 2019
29891e6
Removed unnecessary _user assignment
torchhound Sep 11, 2019
2d2ea9e
Move swiftlint disable to LDClient, move user assignment into identif…
torchhound Sep 11, 2019
1d1996a
Added private setOnline and go functions for identify
torchhound Sep 19, 2019
799b1bd
Forgot to replace go in guard with goIdentify
torchhound Sep 19, 2019
ebc945a
Copied user property unit tests for identify
torchhound Sep 20, 2019
d850196
Added optimization to not call setOnline when there is no completion …
torchhound Sep 20, 2019
2834529
Testing identifyInternal change in IH
torchhound Sep 20, 2019
1afaaea
requested PR changes
torchhound Sep 23, 2019
d34e4d6
Fixed convertCachedData call count, some PR feedback fixes
torchhound Sep 24, 2019
e730d9d
Simplified unit tests, added comment about thread safety
torchhound Oct 11, 2019
bd0a4b8
Merge pull request #79 from launchdarkly/jc/ch40005/identify-method
torchhound Oct 11, 2019
b54ef8c
Changed lastSuccessfulConnection to lastKnownFlagValidity, added on s…
torchhound Oct 16, 2019
b38bc22
Fixed handler
torchhound Oct 18, 2019
e352876
Remove unnecessary import
torchhound Oct 18, 2019
5279281
Changed eventSource access level
torchhound Oct 18, 2019
7d9a3f0
Reset lastKnownFlagValidity to nil when we make a successful stream c…
torchhound Oct 18, 2019
ad1d6b4
Made comment about lastKnownFlagValidity having a value more clear
torchhound Oct 18, 2019
705ca57
Changed guard let to if let in DarklyService EventSource extension
torchhound Oct 21, 2019
9d41357
Merge pull request #80 from launchdarkly/jc/connection-status-time-ch…
torchhound Oct 24, 2019
0a29569
Updated README, CHANGELOG, and podspec for 4.2.0
torchhound Oct 24, 2019
b9119c8
Made 4.2.0 CHANGELOG entry more detailed
torchhound Oct 25, 2019
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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ All notable changes to the LaunchDarkly iOS SDK will be documented in this file.
### Multiple Environment clients
Version 4.0.0 does not support multiple environments. If you use version `2.14.0` or later and set `LDConfig`'s `secondaryMobileKeys` you will not be able to migrate to version `4.0.0`. Multiple Environments will be added in a future release to the Swift SDK.

## [4.2.0] - 2019-10-25
### Added
- The `identify` function allows a completion to be called after a user is updated.
- The Connection Status API allows greater introspection into the current LaunchDarkly connection and the health of local flags.
• This feature adds a new class called `ConnectionInformation` that contains properties that keep track of the current connection mode e.g. streaming or polling, when and how a connection failed, and the last time flags were updated. This class can be accessed from `LDClient.shared.getConnectionInformation`.
• Additionally, a new observer function called `observeCurrentConnectionMode` allows your application to listen to changes in the SDK's connection to LaunchDarkly.

### Changed
- The `user` property is now deprecated in favor of the `identify` function.

## [4.1.2] - 2019-07-11
### Fixed
- WatchKit is now conditionally imported in WatchOS only, to fix an error in Xcode 11.
Expand Down
4 changes: 2 additions & 2 deletions LaunchDarkly.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |ld|

ld.name = "LaunchDarkly"
ld.version = "4.1.2"
ld.version = "4.2.0"
ld.summary = "iOS SDK for LaunchDarkly"

ld.description = <<-DESC
Expand All @@ -25,7 +25,7 @@ Pod::Spec.new do |ld|
ld.tvos.deployment_target = "9.0"
ld.osx.deployment_target = "10.10"

ld.source = { :git => "https://github.com/launchdarkly/ios-client-sdk.git", :tag => '4.1.2'}
ld.source = { :git => "https://github.com/launchdarkly/ios-client-sdk.git", :tag => '4.2.0'}

ld.source_files = "LaunchDarkly/LaunchDarkly/**/*.{h,m,swift}"

Expand Down
40 changes: 40 additions & 0 deletions LaunchDarkly.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,22 @@
83F0A5641FB5F33800550A95 /* LDConfigSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83F0A5631FB5F33800550A95 /* LDConfigSpec.swift */; };
83FEF8DD1F266742001CF12C /* FlagSynchronizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83FEF8DC1F266742001CF12C /* FlagSynchronizer.swift */; };
83FEF8DF1F2667E4001CF12C /* EventReporter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83FEF8DE1F2667E4001CF12C /* EventReporter.swift */; };
C408884723033B3600420721 /* ConnectionInformationStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = C408884623033B3600420721 /* ConnectionInformationStore.swift */; };
C408884923033B7500420721 /* ConnectionInformation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C408884823033B7500420721 /* ConnectionInformation.swift */; };
C443A40323145FB700145710 /* ConnectionInformation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C408884823033B7500420721 /* ConnectionInformation.swift */; };
C443A40423145FBE00145710 /* ConnectionInformation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C408884823033B7500420721 /* ConnectionInformation.swift */; };
C443A40523145FBF00145710 /* ConnectionInformation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C408884823033B7500420721 /* ConnectionInformation.swift */; };
C443A40623145FED00145710 /* ConnectionInformationStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = C408884623033B3600420721 /* ConnectionInformationStore.swift */; };
C443A40723145FEE00145710 /* ConnectionInformationStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = C408884623033B3600420721 /* ConnectionInformationStore.swift */; };
C443A40823145FEE00145710 /* ConnectionInformationStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = C408884623033B3600420721 /* ConnectionInformationStore.swift */; };
C443A40A2315AA4D00145710 /* NetworkReporter.swift in Sources */ = {isa = PBXBuildFile; fileRef = C443A4092315AA4D00145710 /* NetworkReporter.swift */; };
C443A40B2315AA4D00145710 /* NetworkReporter.swift in Sources */ = {isa = PBXBuildFile; fileRef = C443A4092315AA4D00145710 /* NetworkReporter.swift */; };
C443A40C2315AA4D00145710 /* NetworkReporter.swift in Sources */ = {isa = PBXBuildFile; fileRef = C443A4092315AA4D00145710 /* NetworkReporter.swift */; };
C443A40D2315AA4D00145710 /* NetworkReporter.swift in Sources */ = {isa = PBXBuildFile; fileRef = C443A4092315AA4D00145710 /* NetworkReporter.swift */; };
C443A40F23186A4F00145710 /* ConnectionModeChangeObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = C443A40E23186A4F00145710 /* ConnectionModeChangeObserver.swift */; };
C443A41023186A4F00145710 /* ConnectionModeChangeObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = C443A40E23186A4F00145710 /* ConnectionModeChangeObserver.swift */; };
C443A41123186A4F00145710 /* ConnectionModeChangeObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = C443A40E23186A4F00145710 /* ConnectionModeChangeObserver.swift */; };
C443A41223186A4F00145710 /* ConnectionModeChangeObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = C443A40E23186A4F00145710 /* ConnectionModeChangeObserver.swift */; };
E48F5215B96AE48D10185962 /* Pods_LaunchDarkly_tvOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB95B7FEBDC1E23F47304829 /* Pods_LaunchDarkly_tvOS.framework */; };
/* End PBXBuildFile section */

Expand Down Expand Up @@ -440,6 +456,10 @@
94D29EF04A706E975E771E84 /* Pods_LaunchDarkly_watchOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LaunchDarkly_watchOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
AC953A896A624F4525C218E5 /* Pods-LaunchDarkly_watchOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LaunchDarkly_watchOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LaunchDarkly_watchOS/Pods-LaunchDarkly_watchOS.debug.xcconfig"; sourceTree = "<group>"; };
B0A56C29F8C0E59F338F9A07 /* Pods-LaunchDarkly_tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LaunchDarkly_tvOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-LaunchDarkly_tvOS/Pods-LaunchDarkly_tvOS.release.xcconfig"; sourceTree = "<group>"; };
C408884623033B3600420721 /* ConnectionInformationStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectionInformationStore.swift; sourceTree = "<group>"; };
C408884823033B7500420721 /* ConnectionInformation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectionInformation.swift; sourceTree = "<group>"; };
C443A4092315AA4D00145710 /* NetworkReporter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkReporter.swift; sourceTree = "<group>"; };
C443A40E23186A4F00145710 /* ConnectionModeChangeObserver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectionModeChangeObserver.swift; sourceTree = "<group>"; };
D58D143F8FD161584B3FF3AF /* Pods-LaunchDarklyTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LaunchDarklyTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-LaunchDarklyTests/Pods-LaunchDarklyTests.release.xcconfig"; sourceTree = "<group>"; };
D6840A437019F1CB72997480 /* Pods-LaunchDarkly_iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LaunchDarkly_iOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-LaunchDarkly_iOS/Pods-LaunchDarkly_iOS.release.xcconfig"; sourceTree = "<group>"; };
D8204934C417AFCE089F38BC /* Pods-LaunchDarklyTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LaunchDarklyTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LaunchDarklyTests/Pods-LaunchDarklyTests.debug.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -613,6 +633,7 @@
8354AC742243168800CDE602 /* Cache */ = {
isa = PBXGroup;
children = (
C408884623033B3600420721 /* ConnectionInformationStore.swift */,
83D559731FD87CC9002D10C8 /* KeyedValueCache.swift */,
8354AC6F2243166900CDE602 /* UserEnvironmentFlagCache.swift */,
832D68A1224A38FC005F052A /* CacheConverter.swift */,
Expand Down Expand Up @@ -706,6 +727,7 @@
8354EFDE1F26380700C05156 /* Event.swift */,
83883DD4220B68A000EEAB95 /* ErrorObserver.swift */,
8354AC5F224150C300CDE602 /* Cache */,
C408884823033B7500420721 /* ConnectionInformation.swift */,
);
path = Models;
sourceTree = "<group>";
Expand Down Expand Up @@ -811,6 +833,7 @@
8358F25D1F474E5900ECE1AF /* LDChangedFlag.swift */,
8358F2611F47747F00ECE1AF /* FlagChangeObserver.swift */,
83B9A081204F6022000C3F17 /* FlagsUnchangedObserver.swift */,
C443A40E23186A4F00145710 /* ConnectionModeChangeObserver.swift */,
);
path = FlagChange;
sourceTree = "<group>";
Expand Down Expand Up @@ -900,6 +923,7 @@
8347BB0B21F147E100E56BCD /* LDTimer.swift */,
83883DD9220B6A9A00EEAB95 /* ErrorNotifier.swift */,
8354AC742243168800CDE602 /* Cache */,
C443A4092315AA4D00145710 /* NetworkReporter.swift */,
);
path = "Service Objects";
sourceTree = "<group>";
Expand Down Expand Up @@ -1373,14 +1397,17 @@
8311886C2113AE6400D77CB5 /* ObjcLDChangedFlag.swift in Sources */,
83906A7921190B4000D7D3C5 /* FlagValueCounter.swift in Sources */,
8311884C2113ADDE00D77CB5 /* FlagChangeObserver.swift in Sources */,
C443A41223186A4F00145710 /* ConnectionModeChangeObserver.swift in Sources */,
831188592113AE1200D77CB5 /* FlagStore.swift in Sources */,
C443A40D2315AA4D00145710 /* NetworkReporter.swift in Sources */,
83906A7A21190B4E00D7D3C5 /* EventTrackingContext.swift in Sources */,
831188652113AE4600D77CB5 /* Date.swift in Sources */,
831188672113AE4D00D77CB5 /* Thread.swift in Sources */,
832D68A0224A3896005F052A /* DeprecatedCacheModelV5.swift in Sources */,
8311886D2113AE6700D77CB5 /* ObjcLDVariationValue.swift in Sources */,
8354AC642241511D00CDE602 /* CacheableEnvironmentFlags.swift in Sources */,
83D1522E224D91B90054B6D4 /* DeprecatedCacheModelV3.swift in Sources */,
C443A40823145FEE00145710 /* ConnectionInformationStore.swift in Sources */,
831188662113AE4A00D77CB5 /* AnyComparer.swift in Sources */,
831188492113ADD400D77CB5 /* LDFlagBaseTypeConvertible.swift in Sources */,
8311885C2113AE2200D77CB5 /* HTTPHeaders.swift in Sources */,
Expand All @@ -1391,6 +1418,7 @@
8311884B2113ADDA00D77CB5 /* LDChangedFlag.swift in Sources */,
8311885E2113AE2900D77CB5 /* HTTPURLResponse.swift in Sources */,
8347BB0F21F147E100E56BCD /* LDTimer.swift in Sources */,
C443A40523145FBF00145710 /* ConnectionInformation.swift in Sources */,
8354AC732243166900CDE602 /* UserEnvironmentFlagCache.swift in Sources */,
8311885B2113AE1D00D77CB5 /* Throttler.swift in Sources */,
831188612113AE3700D77CB5 /* Optional.swift in Sources */,
Expand Down Expand Up @@ -1427,12 +1455,15 @@
831EF34820655E730001C643 /* LDFlagValueConvertible.swift in Sources */,
831EF34920655E730001C643 /* LDFlagBaseTypeConvertible.swift in Sources */,
831EF34A20655E730001C643 /* FeatureFlag.swift in Sources */,
C443A40C2315AA4D00145710 /* NetworkReporter.swift in Sources */,
831EF34B20655E730001C643 /* LDChangedFlag.swift in Sources */,
8354AC722243166900CDE602 /* UserEnvironmentFlagCache.swift in Sources */,
C443A40423145FBE00145710 /* ConnectionInformation.swift in Sources */,
832D68A4224A38FC005F052A /* CacheConverter.swift in Sources */,
831EF34C20655E730001C643 /* FlagChangeObserver.swift in Sources */,
831EF34D20655E730001C643 /* FlagsUnchangedObserver.swift in Sources */,
831EF34E20655E730001C643 /* Event.swift in Sources */,
C443A41123186A4F00145710 /* ConnectionModeChangeObserver.swift in Sources */,
831EF35020655E730001C643 /* ClientServiceFactory.swift in Sources */,
831EF35120655E730001C643 /* KeyedValueCache.swift in Sources */,
831AAE2E20A9E4F600B46DBA /* Throttler.swift in Sources */,
Expand All @@ -1448,6 +1479,7 @@
831EF35B20655E730001C643 /* DarklyService.swift in Sources */,
831EF35C20655E730001C643 /* HTTPURLResponse.swift in Sources */,
8354AC6B22418C0600CDE602 /* CacheableUserEnvironmentFlags.swift in Sources */,
C443A40723145FEE00145710 /* ConnectionInformationStore.swift in Sources */,
831EF35D20655E730001C643 /* HTTPURLRequest.swift in Sources */,
831EF35E20655E730001C643 /* Dictionary.swift in Sources */,
835E4C54206BDF8D004C6E6C /* EnvironmentReporter.swift in Sources */,
Expand Down Expand Up @@ -1494,14 +1526,17 @@
8372668C20D4439600BD1088 /* DateFormatter.swift in Sources */,
83A2D6241F51CD7A00EA3BD4 /* LDUser.swift in Sources */,
8354EFE21F26380700C05156 /* Event.swift in Sources */,
C408884923033B7500420721 /* ConnectionInformation.swift in Sources */,
831D8B721F71D3E700ED65E8 /* DarklyService.swift in Sources */,
835E1D431F685AC900184DB4 /* ObjcLDChangedFlag.swift in Sources */,
8358F25E1F474E5900ECE1AF /* LDChangedFlag.swift in Sources */,
8354AC6922418C0600CDE602 /* CacheableUserEnvironmentFlags.swift in Sources */,
83D559741FD87CC9002D10C8 /* KeyedValueCache.swift in Sources */,
831AAE2C20A9E4F600B46DBA /* Throttler.swift in Sources */,
8354EFE11F26380700C05156 /* LDConfig.swift in Sources */,
C443A40F23186A4F00145710 /* ConnectionModeChangeObserver.swift in Sources */,
83F0A5621FB4D66600550A95 /* AnyComparer.swift in Sources */,
C443A40A2315AA4D00145710 /* NetworkReporter.swift in Sources */,
83EBCBA320D9A1F3003A7142 /* FlagValueCounter.swift in Sources */,
831D8B741F72994600ED65E8 /* FlagStore.swift in Sources */,
8358F2601F476AD800ECE1AF /* FlagChangeNotifier.swift in Sources */,
Expand All @@ -1518,6 +1553,7 @@
83B9A082204F6022000C3F17 /* FlagsUnchangedObserver.swift in Sources */,
8354EFE01F26380700C05156 /* LDClient.swift in Sources */,
831425B1206B030100F2EF36 /* EnvironmentReporter.swift in Sources */,
C408884723033B3600420721 /* ConnectionInformationStore.swift in Sources */,
83B6C4B61F4DE7630055351C /* LDCommon.swift in Sources */,
83EF678A1F97CFEC00403126 /* Dictionary.swift in Sources */,
8347BB0C21F147E100E56BCD /* LDTimer.swift in Sources */,
Expand Down Expand Up @@ -1622,14 +1658,17 @@
831AAE2D20A9E4F600B46DBA /* Throttler.swift in Sources */,
83EBCBA420D9A1F3003A7142 /* FlagValueCounter.swift in Sources */,
83D9EC872062DEAB004D7FA6 /* FlagSynchronizer.swift in Sources */,
C443A41023186A4F00145710 /* ConnectionModeChangeObserver.swift in Sources */,
83D9EC882062DEAB004D7FA6 /* FlagChangeNotifier.swift in Sources */,
C443A40B2315AA4D00145710 /* NetworkReporter.swift in Sources */,
83D9EC892062DEAB004D7FA6 /* EventReporter.swift in Sources */,
83D9EC8A2062DEAB004D7FA6 /* FlagStore.swift in Sources */,
83D9EC8B2062DEAB004D7FA6 /* Log.swift in Sources */,
832D689E224A3896005F052A /* DeprecatedCacheModelV5.swift in Sources */,
8354AC622241511D00CDE602 /* CacheableEnvironmentFlags.swift in Sources */,
83D9EC8C2062DEAB004D7FA6 /* HTTPHeaders.swift in Sources */,
83D1522C224D91B90054B6D4 /* DeprecatedCacheModelV3.swift in Sources */,
C443A40623145FED00145710 /* ConnectionInformationStore.swift in Sources */,
83D9EC8D2062DEAB004D7FA6 /* DarklyService.swift in Sources */,
83D9EC8E2062DEAB004D7FA6 /* HTTPURLResponse.swift in Sources */,
83D9EC8F2062DEAB004D7FA6 /* HTTPURLRequest.swift in Sources */,
Expand All @@ -1640,6 +1679,7 @@
83D9EC922062DEAB004D7FA6 /* Data.swift in Sources */,
8347BB0D21F147E100E56BCD /* LDTimer.swift in Sources */,
8354AC712243166900CDE602 /* UserEnvironmentFlagCache.swift in Sources */,
C443A40323145FB700145710 /* ConnectionInformation.swift in Sources */,
83D9EC932062DEAB004D7FA6 /* Array.swift in Sources */,
83D9EC942062DEAB004D7FA6 /* JSONSerialization.swift in Sources */,
83D9EC952062DEAB004D7FA6 /* Date.swift in Sources */,
Expand Down
30 changes: 30 additions & 0 deletions LaunchDarkly/GeneratedCode/mocks.generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ final class DarklyStreamingProviderMock: DarklyStreamingProvider {
onErrorEventCallback?()
}

// MARK: onReadyStateChangedEvent
var onReadyStateChangedEventCallCount = 0
var onReadyStateChangedEventCallback: (() -> Void)?
var onReadyStateChangedEventReceivedHandler: LDEventSourceEventHandler?
func onReadyStateChangedEvent(_ handler: LDEventSourceEventHandler?) {
onReadyStateChangedEventCallCount += 1
onReadyStateChangedEventReceivedHandler = handler
onReadyStateChangedEventCallback?()
}

// MARK: open
var openCallCount = 0
var openCallback: (() -> Void)?
Expand Down Expand Up @@ -405,6 +415,16 @@ final class FlagChangeNotifyingMock: FlagChangeNotifying {
addFlagsUnchangedObserverCallback?()
}

// MARK: addConnectionModeChangedObserver
var addConnectionModeChangedObserverCallCount = 0
var addConnectionModeChangedObserverCallback: (() -> Void)?
var addConnectionModeChangedObserverReceivedObserver: ConnectionModeChangedObserver?
func addConnectionModeChangedObserver(_ observer: ConnectionModeChangedObserver) {
addConnectionModeChangedObserverCallCount += 1
addConnectionModeChangedObserverReceivedObserver = observer
addConnectionModeChangedObserverCallback?()
}

// MARK: removeObserver
var removeObserverCallCount = 0
var removeObserverCallback: (() -> Void)?
Expand All @@ -415,6 +435,16 @@ final class FlagChangeNotifyingMock: FlagChangeNotifying {
removeObserverCallback?()
}

// MARK: notifyConnectionModeChangedObservers
var notifyConnectionModeChangedObserversCallCount = 0
var notifyConnectionModeChangedObserversCallback: (() -> Void)?
var notifyConnectionModeChangedObserversReceivedConnectionMode: ConnectionInformation.ConnectionMode?
func notifyConnectionModeChangedObservers(connectionMode: ConnectionInformation.ConnectionMode) {
notifyConnectionModeChangedObserversCallCount += 1
notifyConnectionModeChangedObserversReceivedConnectionMode = connectionMode
notifyConnectionModeChangedObserversCallback?()
}

// MARK: notifyObservers
var notifyObserversCallCount = 0
var notifyObserversCallback: (() -> Void)?
Expand Down
6 changes: 1 addition & 5 deletions LaunchDarkly/LaunchDarkly/Extensions/Dictionary.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,7 @@ extension Optional where Wrapped == [String: Any] {
public static func == (lhs: [String: Any]?, rhs: [String: Any]?) -> Bool {
guard let lhs = lhs
else {
guard let _ = rhs
else {
return true
}
return false
return rhs == nil
}
guard let rhs = rhs
else {
Expand Down
Loading