diff --git a/.travis.yml b/.travis.yml index 18d84d204..b55542832 100644 --- a/.travis.yml +++ b/.travis.yml @@ -113,7 +113,7 @@ jobs: os: osx osx_image: xcode11.3 env: - - VERSION=3.2.1 + - VERSION=3.3.0 install: # install hub - wget https://github.com/github/hub/releases/download/v2.11.2/hub-darwin-amd64-2.11.2.tgz -O /tmp/hub-darwin-amd64-2.11.2.tgz && tar -xvf /tmp/hub-darwin-amd64-2.11.2.tgz -C /usr/local/opt && ln -s /usr/local/opt/hub-darwin-amd64-2.11.2/bin/hub /usr/local/bin/hub @@ -130,7 +130,7 @@ jobs: os: osx osx_image: xcode11.3 env: - - VERSION=3.2.1 + - VERSION=3.3.0 install: # install hub - wget https://github.com/github/hub/releases/download/v2.11.2/hub-darwin-amd64-2.11.2.tgz -O /tmp/hub-darwin-amd64-2.11.2.tgz && tar -xvf /tmp/hub-darwin-amd64-2.11.2.tgz -C /usr/local/opt && ln -s /usr/local/opt/hub-darwin-amd64-2.11.2/bin/hub /usr/local/bin/hub diff --git a/CHANGELOG.md b/CHANGELOG.md index 64afcbc45..20bdc3210 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Optimizely Swift SDK Changelog +## 3.3.0 +March 11, 2020 + +This release includes an enhancement of SDK initialization API to enable SDK updated on cached datafile change. It also fixes known bugs. + +### New Features +* Add an option for **synchronous** initialization to enable SDK immediately updated when a new datafile is cached. Unless this feature is enabled, by default, the cached datafile will be used only when the SDK re-starts in the next session. Note that this option is for **synchronous** initialization only. ([#297](https://github.com/optimizely/swift-sdk/pull/297)) + + ``` + // enable SDK update when a new datafile is cached + optimizelyClient.start(datafile: data, doUpdateConfigOnNewDatafile: true) + + // by default, this feature is disabled + optimizelyClient.start(datafile: data) + ``` + +### Bug Fixes +* When a **synchronously**-initialized SDK enables background datafile polling and its datafile was changed in the server, the new datafile is cached but SDK is not dynamically updated. ([#297](https://github.com/optimizely/swift-sdk/pull/297)) +* When background datafile polling is enabled and app goes to background and comes back to foreground after some delays, datafile fetching is called multiple times back-to-back. ([#301](https://github.com/optimizely/swift-sdk/pull/301)) +* NotificationCenter can cause crashes when multiple threads add/call listeners simultaneously. ([#304](https://github.com/optimizely/swift-sdk/pull/304)) + + ## 3.2.1 January 16, 2020 diff --git a/README.md b/README.md index 19e500fdd..5b4de0f36 100644 --- a/README.md +++ b/README.md @@ -28,18 +28,28 @@ up an Optimizely X project and start using the SDK. Please note below that _\_ is used to represent the platform on which you are building your app. Currently, we support ```iOS``` and ```tvOS``` platforms. +#### Swift Package Manager + Add the following line to the dependencies value of your _Package.swift_: + +``` +dependencies: [ + .package(url: "https://github.com/optimizely/swift-sdk.git", + .upToNextMinor(from: “3.3.0”)) +] +``` + #### CocoaPods 1. Add the following lines to the _Podfile_:
-	```use_frameworks!```
-    ```pod 'OptimizelySwiftSDK', '~> 3.2.1'```
-    
+```use_frameworks!``` +```pod 'OptimizelySwiftSDK', '~> 3.3.0'``` + 2. Run the following command:
``` pod install ```
Further installation instructions for Cocoapods: https://guides.cocoapods.org/using/getting-started.html #### Carthage -1. Add the following lines to the _Cartfile_:
```github "optimizely/swift-sdk" ~> 3.2.1```
+1. Add the following lines to the _Cartfile_:
```github "optimizely/swift-sdk" ~> 3.3.0```
2. Run the following command:
```carthage update```
@@ -56,15 +66,6 @@ Further installation instructions for Cocoapods: https://guides.cocoapods.org/us Futher installation instructions for Carthage: https://github.com/Carthage/Carthage -#### Swift Package Manager - Add the following line to the dependencies value of your _Package.swift_: - -``` -dependencies: [ - .package(url: "https://github.com/optimizely/swift-sdk.git", .upToNextMinor(from: “3.2.1”)) -] -``` - ### Samples A sample code for SDK initialization and experiments: