Skip to content
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

Prepare 4.7.0 release #213

Merged
merged 113 commits into from
Jun 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 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
bca7a0d
Merge branch 'master' into next-release
torchhound Oct 25, 2019
df2bc50
[4.2.1] - 2019-11-15 (#81)
torchhound Nov 15, 2019
a49e73a
Evaluation Reasons (#82)
torchhound Dec 2, 2019
37203f7
Experimentation 1.5 (#83)
torchhound Dec 3, 2019
65b9760
Prepare version 4.3.0
torchhound Dec 3, 2019
0ef032a
Merge branch 'master' into next-release
torchhound Dec 3, 2019
b54b1de
Merge branch 'master' into next-release
torchhound Dec 3, 2019
99005da
Update ios-eventsource to 4.1.0 (#84)
torchhound Dec 13, 2019
b54d2f3
Merge branch 'master' into next-release
torchhound Dec 13, 2019
3828c3b
Fixed change listener not firing when only value changes (#85)
torchhound Dec 19, 2019
d662436
Updated CHANGELOG, README, and podspec for 4.3.2
torchhound Dec 19, 2019
7ef5579
Merge branch 'next-release' of https://github.com/launchdarkly/ios-sw…
torchhound Dec 19, 2019
9ded27a
Merge branch 'master' into next-release
torchhound Dec 20, 2019
9268e1a
Adds startAwaitingFlags function (#86)
torchhound Jan 13, 2020
7d1af9c
[ch61092] Add X-LaunchDarkly-Payload-ID to event request headers (#87)
torchhound Jan 14, 2020
6d9fd24
Change CHANGELOG entry for new header to match other SDKs
torchhound Jan 15, 2020
4daf39d
Merge branch 'master' into next-release
torchhound Jan 15, 2020
69c3529
Added single retry attempt to event post (#88)
torchhound Jan 29, 2020
2d1a6c0
Bumped patch version, added CHANGELOG for 4.4.1
torchhound Feb 4, 2020
a65b2fe
Merge branch 'next-release' of https://github.com/launchdarkly/ios-sw…
torchhound Feb 4, 2020
28b3180
Changed 4.4.1 entry
torchhound Feb 4, 2020
f83d568
Further 4.4.1 entry revision
torchhound Feb 4, 2020
040ca57
Changed retry event post for loop to function call (#89)
torchhound Feb 13, 2020
1fc5940
Added once to CHANGELOG 4.4.1
torchhound Feb 13, 2020
3325cf2
[ch65670] Fix Xcode 11.4 build and unit tests (#90)
torchhound Mar 26, 2020
e0b9bb0
Merge branch 'master' into next-release
torchhound Mar 27, 2020
4a0a509
Fix FlagStore to synchronize reads with writes.
gwhelanLD Mar 30, 2020
6c29daa
Merge pull request #91 from launchdarkly/gw/thread-sanitizer-fixes
gwhelanLD Mar 30, 2020
6628d30
Add xcode compatibility information to readme (#93)
bwoskow-ld Apr 24, 2020
6aaa403
Add xcode compatibility information to readme (#93)
bwoskow-ld Apr 24, 2020
6fc6e8f
Fix for concurrency bug exposed by restwrapper. (#94)
gwhelanLD May 18, 2020
e157d45
General cleanup. (#92)
gwhelanLD May 18, 2020
ff0451d
[ch75316] Added maxCachedUsers to LDConfig and UserEnvironmentFlagCac…
torchhound May 27, 2020
2841b25
Added CHANGELOG for 4.6
torchhound May 27, 2020
b2d8941
Added maxCachedUsers to objc LDConfig (#97)
torchhound May 27, 2020
a3e9087
Changed version to 4.6.0
torchhound May 27, 2020
f2fc6e8
Merge branch 'v4' of https://github.com/launchdarkly/ios-client-sdk
torchhound May 27, 2020
ec6e33e
Merge branch 'master' into next-release
torchhound May 27, 2020
4c65c8d
[ch66864] Added startCompleteWhenFlagsReceivedTimeout (#98)
torchhound Jun 2, 2020
9d0d2c9
Bump version to 4.7.0 and add CHANGELOG
torchhound Jun 4, 2020
320147d
Changed startWaitSeconds type signature from Int to TimeInterval
torchhound Jun 4, 2020
599c435
Changed startWaitSeconds doc string type to TimeInterval
torchhound Jun 4, 2020
041ad1b
Clarified 4.7.0 CHANGELOG
torchhound Jun 4, 2020
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ 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.7.0] - 2020-06-03
### Added
- Added a new method signature for `startCompleteWhenFlagsReceived` that accepts an additional argument specifying a maximum time to wait for flags to be received before calling the completion closure. The completion closure on this method will be passed a `Bool` on completion indication whether the operation timed out.

## [4.6.0] - 2020-05-26
### Added
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.6.0"
ld.version = "4.7.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.6.0'}
ld.source = { :git => "https://github.com/launchdarkly/ios-client-sdk.git", :tag => '4.7.0'}

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

Expand Down
39 changes: 38 additions & 1 deletion LaunchDarkly/LaunchDarkly/LDClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,44 @@ public class LDClient {
completion?()
}
}

/**
See [start](x-source-tag://start) for more information on starting the SDK.

This method listens for flag updates so the completion will only return once an update has occurred. If the SDK is configured to start offline the method will ignore the timeout and call the completion with True without awaiting a flag update.

- parameter config: The LDConfig that contains the desired configuration. (Required)
- parameter user: The LDUser set with the desired user. If omitted, LDClient retains the previously set user, or default if one was never set. (Optional)
- parameter startWaitSeconds: A TimeInterval representing how long to wait for flags before returning true in the completion to indicate that it timed out.
- parameter completion: Closure called when the embedded `setOnlineIdentify` call completes, subject to throttling delays. Takes a Bool as a parameter that indicates whether the SDK did not come online within startWaitSeconds. (Optional)
*/
public func startCompleteWhenFlagsReceived(config: LDConfig, user: LDUser? = nil, startWaitSeconds: TimeInterval, completion: ((_ timedOut: Bool) -> Void)? = nil) {
if !config.startOnline {
startCompleteWhenFlagsReceived(config: config, user: user)
completion?(timeOutCheck)
} else {
let startTime = Date().timeIntervalSince1970
startCompleteWhenFlagsReceived(config: config, user: user) {
if startTime + startWaitSeconds > Date().timeIntervalSince1970 {
self.internalTimeOutCheckQueue.sync {
self.timeOutCheck = false
completion?(self.timeOutCheck)
}
}
}
DispatchQueue.global().asyncAfter(deadline: .now() + startWaitSeconds) {
self.internalTimeOutCheckQueue.sync {
if self.timeOutCheck {
completion?(self.timeOutCheck)
}
}
}
}
}

private var timeOutCheck = true
private let internalTimeOutCheckQueue: DispatchQueue = DispatchQueue(label: "TimeOutQueue")

private func convertCachedData(skipDuringStart skip: Bool) {
guard !skip
else {
Expand Down Expand Up @@ -1009,7 +1046,7 @@ public class LDClient {
private(set) var flagCache: FeatureFlagCaching
private(set) var cacheConverter: CacheConverting
private(set) var flagSynchronizer: LDFlagSynchronizing
private(set) var flagChangeNotifier: FlagChangeNotifying
var flagChangeNotifier: FlagChangeNotifying
private(set) var eventReporter: EventReporting
private(set) var environmentReporter: EnvironmentReporting
private(set) var throttler: Throttling
Expand Down
14 changes: 14 additions & 0 deletions LaunchDarkly/LaunchDarkly/ObjectiveC/ObjcLDClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,20 @@ public final class ObjcLDClient: NSObject {
@objc public func startCompleteWhenFlagsReceived(config configWrapper: ObjcLDConfig, user userWrapper: ObjcLDUser? = nil, completion: (() -> Void)? = nil) {
LDClient.shared.startCompleteWhenFlagsReceived(config: configWrapper.config, user: userWrapper?.user, completion: completion)
}

/**
See [start](x-source-tag://start) for more information on starting the SDK.

This method listens for flag updates so the completion will only return once an update has occurred. If the SDK is configured to start offline the method will ignore the timeout and call the completion with True without awaiting a flag update.

- parameter configWrapper: The LDConfig that contains the desired configuration. (Required)
- parameter userWrapper: The LDUser set with the desired user. If omitted, LDClient retains the previously set user, or default if one was never set. (Optional)
- parameter startWaitSeconds: A TimeInterval representing how long to wait for flags before returning true in the completion to indicate that it timed out.
- parameter completion: Closure called when the embedded `setOnlineIdentify` call completes, subject to throttling delays. Takes a Bool as a parameter that indicates whether the SDK did not come online within startWaitSeconds. (Optional)
*/
@objc public func startCompleteWhenFlagsReceived(config configWrapper: ObjcLDConfig, user userWrapper: ObjcLDUser? = nil, startWaitSeconds: TimeInterval, completion: ((_ timedOut: Bool) -> Void)? = nil) {
LDClient.shared.startCompleteWhenFlagsReceived(config: configWrapper.config, user: userWrapper?.user, startWaitSeconds: startWaitSeconds, completion: completion)
}

/**
Stops the LDClient. Stopping the client means the LDClient goes offline and stops recording events. LDClient will no longer provide feature flag values, only returning fallback values.
Expand Down
Loading