Skip to content

Commit

Permalink
Prepare 4.1.1 release (#181)
Browse files Browse the repository at this point in the history
* Changes user-device to device model identifier (#75)

* installs new deviceModel into EnvironmentReporter and renames old deviceModel to deviceType

* use CwSysCtl for macos model

* Replaced entire flag store ff array instead of in place manipulation

* Updated CHANGELOG and bumped version number

* Added correct copy behavior to FlagStore delete and update

* Improved CHANGELOG entry for 4.0.1

* Changed version to 4.1.0, updated CHANGELOG

* Update 4.1.0 release date

* installs ios-eventsource 4.0.2

* installs CocoaPods 1.7.2

* clears swift 5 update warning

* updates circle config to use xcode 10.2.1

* advances version to 4.1.1

* installs Nimble 8.0.2

* updates SwiftLint to 0.33.0

* Update 4.1.1 release date

* Improved CHANGELOG 4.1.1 description

* Made CHANGELOG 4.1.1 more consistent
  • Loading branch information
torchhound authored Jul 9, 2019
1 parent e20c9c3 commit 62806ea
Show file tree
Hide file tree
Showing 57 changed files with 1,589 additions and 1,521 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# config file version: 1.2.0
# config file version: 1.2.1
version: 2
jobs:
build:
Expand All @@ -12,7 +12,7 @@ jobs:
FL_OUTPUT_DIR: output

macos:
xcode: '10.2.0'
xcode: '10.2.1'

steps:
- checkout
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ 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.1.1] - 2019-07-09
### Change
- Updated to `ios-eventsource` version `4.0.2`. This fixes a potential hang on LDClient start.

## [4.1.0] - 2019-06-19
### Change
- Installs new `deviceModel` into `EnvironmentReporter` and renames old `deviceModel` to `deviceType`.
Expand Down
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "launchdarkly/ios-eventsource" >= 4.0.1
github "launchdarkly/ios-eventsource" >= 4.0.2
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "launchdarkly/ios-eventsource" "4.0.1"
github "launchdarkly/ios-eventsource" "4.0.2"
10 changes: 5 additions & 5 deletions Carthage/Build/.ios-eventsource.version

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file modified Carthage/Build/iOS/DarklyEventSource.framework/DarklyEventSource
Binary file not shown.
Binary file modified Carthage/Build/iOS/DarklyEventSource.framework/Info.plist
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file modified Carthage/Build/tvOS/DarklyEventSource.framework/DarklyEventSource
Binary file not shown.
Binary file modified Carthage/Build/tvOS/DarklyEventSource.framework/Info.plist
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Binary file modified Carthage/Build/watchOS/DarklyEventSource.framework/Info.plist
Binary file not shown.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# A sample Gemfile
source "https://rubygems.org"
gem 'cocoapods', '~>1.6.1'
gem 'cocoapods', '~>1.7.2'
20 changes: 10 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ GEM
tzinfo (~> 1.1)
atomos (0.1.3)
claide (1.0.2)
cocoapods (1.6.1)
cocoapods (1.7.2)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.6.1)
cocoapods-deintegrate (>= 1.0.2, < 2.0)
cocoapods-core (= 1.7.2)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.2.2, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
Expand All @@ -22,13 +22,13 @@ GEM
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (>= 2.2.0, < 3.0)
fourflusher (>= 2.3.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.6.6)
nap (~> 1.0)
ruby-macho (~> 1.4)
xcodeproj (>= 1.8.1, < 2.0)
cocoapods-core (1.6.1)
xcodeproj (>= 1.10.0, < 2.0)
cocoapods-core (1.7.2)
activesupport (>= 4.0.2, < 6)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
Expand All @@ -45,7 +45,7 @@ GEM
colored2 (3.1.2)
concurrent-ruby (1.1.5)
escape (0.0.4)
fourflusher (2.2.0)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
i18n (0.9.5)
Expand All @@ -59,7 +59,7 @@ GEM
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
xcodeproj (1.8.2)
xcodeproj (1.10.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
Expand All @@ -70,7 +70,7 @@ PLATFORMS
ruby

DEPENDENCIES
cocoapods (~> 1.6.1)
cocoapods (~> 1.7.2)

BUNDLED WITH
1.16.1
1.17.3
6 changes: 3 additions & 3 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.0"
ld.version = "4.1.1"
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.0'}
ld.source = { :git => "https://github.com/launchdarkly/ios-client-sdk.git", :tag => '4.1.1'}

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

Expand All @@ -34,6 +34,6 @@ Pod::Spec.new do |ld|
ld.swift_version = '5.0'

ld.subspec 'Core' do |es|
es.dependency 'DarklyEventSource', '~> 4.0.1'
es.dependency 'DarklyEventSource', '~> 4.0.2'
end
end
2 changes: 1 addition & 1 deletion LaunchDarkly/LaunchDarkly/Support/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.0</string>
<string>4.1.1</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSHumanReadableCopyright</key>
Expand Down
14 changes: 7 additions & 7 deletions MigrationGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ LaunchDarkly Migration Guide for the iOS Swift SDK
==================================================

# Getting Started
Follow the steps below to migrate your app from v2.x or v3.x to v4.0.0. Most of these steps will be required, your IDE will give you build errors if you don't take them. We recommend reading through the guide before starting to get a feel for what you will need to do to migrate your app to v4.0.0.
Follow the steps below to migrate your app from v2.x or v3.x to v4.x. Most of these steps will be required, your IDE will give you build errors if you don't take them. We recommend reading through the guide before starting to get a feel for what you will need to do to migrate your app to v4.x.

### Multiple Environments
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.
Version 4.1 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.1. Multiple Environments will be added in a future release to the Swift SDK.

### Swift Version
Version 4.0.0 is built on Swift 4.2 using Xcode 10. The SDK will not build using previous Swift versions, and therefore you must use Xcode 10 or later to build.
Version 4.x is built on Swift 5 using Xcode 10. The SDK will not build using previous Swift versions, and therefore you must use Xcode 10 or later to build.

[API Differences from v2.x or v3.x](#api-differences-from-v2x-or-v3x) lists all of the changes to the API.

## Migration Steps
1. Integrate the v4.0.0 SDK into your app. (e.g. CocoaPods podfile or Carthage cartfile change to point to v4.0.0). See [Integrate the Swift SDK into your app using either CocoaPods or Carthage](#integrate-the-swift-sdk-into-your-app-using-either-cocoapods-or-carthage) for details.
1. Integrate the v4.x SDK into your app. (e.g. CocoaPods podfile or Carthage cartfile change to point to v4.1.1). See [Integrate the Swift SDK into your app using either CocoaPods or Carthage](#integrate-the-swift-sdk-into-your-app-using-either-cocoapods-or-carthage) for details.
2. Clean, and delete Derived Data.
3. Update imports to `LaunchDarkly`. See [Update imports to `LaunchDarkly`](#update-imports-to-launchdarkly) for details.
4. In Swift code, replace instances of `LDClient.sharedInstance()` with `LDClient.shared`. Do not change Objective-C `[LDClient sharedInstance]` occurrences.
Expand Down Expand Up @@ -101,7 +101,7 @@ Calls to `trackEvent` include a 3rd parameter `error`, which the SDK sets when a

---
## API Differences from v2.x or v3.x
This section details the changes between the v2.x or v3.x and v4.0.0 APIs.
This section details the changes between the v2.x or v3.x and v4.x APIs.

### Configuration with `LDConfig`
LDConfig has changed to a `struct`, and therefore uses value semantics.
Expand Down Expand Up @@ -202,7 +202,7 @@ This method was removed. Set the `user` property instead.

### Getting Feature Flag Values
#### `variation()`
Swift Generics allowed us to combine the `variation` methods that were used in the v2.x or v3.x SDK. v4.0.0 has one `variation` method that returns a non-Optional type that matches the non-Optional type the client app provides in the `fallback` parameter. A second `variation` method allows the client app to use an Optional as the `fallback`. This method requires the client to specify the Optional type when passing `nil` as the `fallback`. For this second method, the fallback parameter is defaulted to `nil`. When using this second method, set the type on the item holding the return value, e.g.
Swift Generics allowed us to combine the `variation` methods that were used in the v2.x or v3.x SDK. v4.x has one `variation` method that returns a non-Optional type that matches the non-Optional type the client app provides in the `fallback` parameter. A second `variation` method allows the client app to use an Optional as the `fallback`. This method requires the client to specify the Optional type when passing `nil` as the `fallback`. For this second method, the fallback parameter is defaulted to `nil`. When using this second method, set the type on the item holding the return value, e.g.
```swift
let boolFlagValue: Bool? = LDClient.shared.variation(forKey: "bool-flag-key")
```
Expand All @@ -219,7 +219,7 @@ Swift generic functions cannot operate in Objective-C. The `ObjcLDClient` wrappe
The wrapper also includes new type-based `variationAndSource` methods that return a type-based `VariationValue` object (e.g. `LDBoolVariationValue`) that encapsulates the `value` and `source`. `source` is an `ObjcLDFlagValueSource` Objective-C int backed enum (accessed in Objective-C via `LDFlagValueSource`). In addition to `server`, `cache`, and `fallback`, other possible values could be `nilSource` and `typeMismatch`. Feature Flag types that are object types have value types that are nullable in the wrapper. Take care to verify a value exists before using it.

### Monitoring Feature Flags for changes
v4.0.0 removes the `LDClientDelegate`, which included `featureFlagDidUpdate` and `userDidUpdate` that the SDK called to notify client apps of changes in the set of feature flags for a given mobile key (called the environment), and the `userUnchanged` that the SDK called in `.polling` mode when the response to a feature flag request did not change any feature flag value. In order to have the SDK notify the client app when feature flags change, we have provided a closure based observer API.
v4.x removes the `LDClientDelegate`, which included `featureFlagDidUpdate` and `userDidUpdate` that the SDK called to notify client apps of changes in the set of feature flags for a given mobile key (called the environment), and the `userUnchanged` that the SDK called in `.polling` mode when the response to a feature flag request did not change any feature flag value. In order to have the SDK notify the client app when feature flags change, we have provided a closure based observer API.
#### Single-key `observe()`
To monitor a single feature flag, set a callback handler using `observe(key:, owner:, handler:)`. The SDK will keep a weak reference to the `owner`. When an observed feature flag changes, the SDK executes the closure, passing into it an `LDChangedFlag` that provides the `key`, `oldValue`, `oldValueSource`, `newValue`, and `newValueSource`. The client app can use this to update itself with the new value, or use the closure as a trigger to make another `variation` request from the LDClient.
#### Multiple-key `observe()`
Expand Down
10 changes: 5 additions & 5 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@ use_frameworks!
workspace 'LaunchDarkly.xcworkspace'
target 'LaunchDarkly_iOS' do
platform :ios, '8.0'
pod 'SwiftLint', '0.32.0'
pod 'SwiftLint', '0.33.0'
end

target 'LaunchDarkly_watchOS' do
platform :watchos, '2.0'
pod 'SwiftLint', '0.32.0'
pod 'SwiftLint', '0.33.0'
end

target 'LaunchDarkly_macOS' do
platform :osx, '10.10'
pod 'SwiftLint', '0.32.0'
pod 'SwiftLint', '0.33.0'
end

target 'LaunchDarkly_tvOS' do
platform :tvos, '9.0'
pod 'SwiftLint', '0.32.0'
pod 'SwiftLint', '0.33.0'
end

target 'LaunchDarklyTests' do
platform :ios, '8.0'
pod 'OHHTTPStubs/Swift', '8.0.0'
pod 'Quick', '2.1.0'
pod 'Nimble', '8.0.1'
pod 'Nimble', '8.0.2'
pod 'Sourcery', '0.16.1'
end
16 changes: 8 additions & 8 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- Nimble (8.0.1)
- Nimble (8.0.2)
- OHHTTPStubs/Core (8.0.0)
- OHHTTPStubs/Default (8.0.0):
- OHHTTPStubs/Core
Expand All @@ -15,14 +15,14 @@ PODS:
- OHHTTPStubs/Default
- Quick (2.1.0)
- Sourcery (0.16.1)
- SwiftLint (0.32.0)
- SwiftLint (0.33.0)

DEPENDENCIES:
- Nimble (= 8.0.1)
- Nimble (= 8.0.2)
- OHHTTPStubs/Swift (= 8.0.0)
- Quick (= 2.1.0)
- Sourcery (= 0.16.1)
- SwiftLint (= 0.32.0)
- SwiftLint (= 0.33.0)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
Expand All @@ -33,12 +33,12 @@ SPEC REPOS:
- SwiftLint

SPEC CHECKSUMS:
Nimble: 45f786ae66faa9a709624227fae502db55a8bdd0
Nimble: 622629381bda1dd5678162f21f1368cec7cbba60
OHHTTPStubs: 9cbce6364bec557cc3439aa6bb7514670d780881
Quick: 4be43f6634acfa727dd106bdf3929ce125ffa79d
Sourcery: 16779170d35ee204666843b09031f36721a84bcc
SwiftLint: 009a898ef2a1c851f45e1b59349bf6ff2ddc990d
SwiftLint: fed9c66336e41fc74dc48a73678380718f0c8b0e

PODFILE CHECKSUM: 4b809540cb8663a0123a391708f47a8e0cc7fcf8
PODFILE CHECKSUM: 0f32f2b6c00b3c695951188978a8847107e43bf5

COCOAPODS: 1.6.1
COCOAPODS: 1.7.2
Loading

0 comments on commit 62806ea

Please sign in to comment.