diff --git a/.travis.yml b/.travis.yml index a3b034b2..97082d1a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,24 +2,24 @@ language: generic matrix: include: - os: osx - osx_image: xcode11 + osx_image: xcode11.3 name: Danger env: - CACHE_NAME=SWIFT5_1 - SWIFT_VERSION=5.0 - SWIFT_TOOLS_VERSION=5.1 - XCODEGEN_VERSION=2.5.0 - - IOS_SIMULATOR='name=iPhone 11,OS=13.0' - - IOS_SDK=iphonesimulator13.0 + - IOS_SIMULATOR='name=iPhone 11,OS=13.2' + - IOS_SDK=iphonesimulator13.2 - TVOS_SIMULATOR='name=Apple TV 4K (at 1080p)' - - TVOS_SDK=appletvsimulator13.0 + - TVOS_SDK=appletvsimulator13.2 - WATCHOS_SIMULATOR='name=Apple Watch Series 4 - 44mm' - - WATCHOS_SDK=watchsimulator6.0 + - WATCHOS_SDK=watchsimulator6.1 before_install: - brew install danger/tap/danger-swift script: DEBUG="*" danger-swift ci - os: osx - osx_image: xcode11 + osx_image: xcode11.3 name: Swift 5.1 compatibility env: - CACHE_NAME=SWIFT5_1 @@ -119,11 +119,11 @@ before_install: script: - set -o pipefail - - if [[ "$SWIFT_VERSION" != "5.0" ]]; then mv Cartfile_4.2.private Cartfile.private; fi - - if [[ "$SWIFT_VERSION" != "5.0" ]]; then mv Cartfile_4.2.resolved Cartfile.resolved; fi - - carthage update --no-use-binaries --cache-builds --verbose - - xcodebuild -version - - xcodebuild -showsdks + # - if [[ "$SWIFT_VERSION" != "5.0" ]]; then mv Cartfile_4.2.private Cartfile.private; fi + # - if [[ "$SWIFT_VERSION" != "5.0" ]]; then mv Cartfile_4.2.resolved Cartfile.resolved; fi + # - carthage update --no-use-binaries --cache-builds --verbose + # - xcodebuild -version + # - xcodebuild -showsdks - xcodebuild -project "$PROJECT" -scheme 'SwiftyUserDefaults' -sdk $IOS_SDK -destination "$IOS_SIMULATOR" ONLY_ACTIVE_ARCH=NO CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO SWIFT_VERSION=$SWIFT_VERSION build | xcpretty - xcodebuild -project "$PROJECT" -scheme 'SwiftyUserDefaults' -sdk $TVOS_SDK -destination "$TVOS_SIMULATOR" ONLY_ACTIVE_ARCH=NO CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO SWIFT_VERSION=$SWIFT_VERSION build | xcpretty diff --git a/CHANGELOG.md b/CHANGELOG.md index a130a114..7527bfe8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ### Next +### 5.0.0 (2019-12-31) +* 🚀 + ### 5.0.0-beta.5 (2019-10-05) * Removed Combine extensions for now. Due to problems with weak-linking the framework, it's too difficult to support it with ease using all package managers and also without breaking backwards-compatibility. Probably gonna introduce it once we only support Xcode 11. [@sunshinejr](https://github.com/sunshinejr) diff --git a/Cartfile.resolved b/Cartfile.resolved index 9f666f44..aba4316e 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,2 +1,2 @@ -github "Quick/Nimble" "v8.0.2" -github "Quick/Quick" "v2.1.0" +github "Quick/Nimble" "v8.0.5" +github "Quick/Quick" "v2.2.0" diff --git a/README.md b/README.md index 0c04bc66..d3a69e14 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Previous versions' documentation: [Version 4.0.0](https://github.com/sunshinejr/SwiftyUserDefaults/blob/566ace16ee91242b61e2e9da6cdbe7dfdadd926c/README.md), [Version 3.0.1](https://github.com/sunshinejr/SwiftyUserDefaults/blob/14b629b035bf6355b46ece22c3851068a488a895/README.md)
Migration guides: [from 4.x to 5.x](MigrationGuides/migration_4_to_5.md), [from 4.0.0-alpha.1 to 4.0.0-alpha.3](MigrationGuides/migration_4_alpha_1_to_4_alpha_2.md), [from 3.x to 4.x](MigrationGuides/migration_3_to_4.md) -# Version 5.0.0-beta.5 +# Version 5.0.0

Features • @@ -453,7 +453,7 @@ let hasKey = Defaults.hasKey(\.skipLogin) If you're using CocoaPods, just add this line to your Podfile: ```ruby -pod 'SwiftyUserDefaults', '5.0.0-beta.5' +pod 'SwiftyUserDefaults', '~> 5.0' ``` Install by running this command in your terminal: @@ -473,7 +473,7 @@ import SwiftyUserDefaults Just add to your Cartfile: ```ruby -github "sunshinejr/SwiftyUserDefaults" "5.0.0-beta.5" +github "sunshinejr/SwiftyUserDefaults" ~> 5.0 ``` ### Swift Package Manager @@ -484,7 +484,7 @@ let package = Package( name: "MyPackage", products: [...], dependencies: [ - .package(url: "https://github.com/sunshinejr/SwiftyUserDefaults.git", .exact("5.0.0-beta.5"), + .package(url: "https://github.com/sunshinejr/SwiftyUserDefaults.git", .upToNextMajor(from: "5.0.0")) ], targets: [...] ) diff --git a/Sources/PropertyWrappers.swift b/Sources/PropertyWrappers.swift index 13e0982e..585038f1 100644 --- a/Sources/PropertyWrappers.swift +++ b/Sources/PropertyWrappers.swift @@ -63,8 +63,8 @@ public final class SwiftyUserDefault where T.T == T { self.options = options if options.contains(.observed) { - observation = adapter.observe(key) { update in - self._value = update.newValue + observation = adapter.observe(key) { [weak self] update in + self?._value = update.newValue } } } @@ -74,8 +74,8 @@ public final class SwiftyUserDefault where T.T == T { self.options = options if options.contains(.observed) { - observation = Defaults.observe(key) { update in - self._value = update.newValue + observation = Defaults.observe(key) { [weak self] update in + self?._value = update.newValue } } } diff --git a/SwiftyUserDefaults.podspec b/SwiftyUserDefaults.podspec index baca2ed3..de27c50a 100644 --- a/SwiftyUserDefaults.podspec +++ b/SwiftyUserDefaults.podspec @@ -1,8 +1,8 @@ Pod::Spec.new do |s| s.name = 'SwiftyUserDefaults' - s.version = '5.0.0-beta.5' + s.version = '5.0.0' s.license = 'MIT' - s.summary = 'Swifty API for NSUserDefaults' + s.summary = 'Swifty API for UserDefaults' s.homepage = 'https://github.com/sunshinejr/SwiftyUserDefaults' s.authors = { 'Radek Pietruszewski' => 'this.is@radex.io', 'Łukasz Mróz' => 'thesunshinejr@gmail.com' } s.source = { :git => 'https://github.com/radex/SwiftyUserDefaults.git', :tag => s.version }