Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
Updated for Swift 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtSabintsev committed Mar 31, 2019
1 parent cbb3011 commit a535ad1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 19 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,17 @@ For the latest updates, refer to the [Releases](https://github.com/ArtSabintsev/

#### CocoaPods
```ruby
pod 'Zephyr' # Swift 4.2
pod 'Zephyr' # Swift 5.0
pod 'Zephyr', :git => 'https://github.com/ArtSabintsev/Zephyr.git', :branch => 'swift4.2' # Swift 4.2
pod 'Zephyr', :git => 'https://github.com/ArtSabintsev/Zephyr.git', :branch => 'swift4.1' # Swift 4.1
pod 'Zephyr', :git => 'https://github.com/ArtSabintsev/Zephyr.git', :branch => 'swift3.2' # Swift 3.2
pod 'Zephyr', :git => 'https://github.com/ArtSabintsev/Zephyr.git', :branch => 'swift3.1' # Swift 3.1
```

### Carthage
``` swift
github "ArtSabintsev/Zephyr" // Swift 4.2
github "ArtSabintsev/Zephyr" // Swift 5.0
github "ArtSabintsev/Zephyr" "swift4.2" // Swift 4.2
github "ArtSabintsev/Zephyr" "swift4.1" // Swift 4.1
github "ArtSabintsev/Zephyr" "swift3.2" // Swift 3.2
github "ArtSabintsev/Zephyr" "swift3.1" // Swift 3.1
Expand Down
5 changes: 1 addition & 4 deletions Sources/Zephyr.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ public final class Zephyr: NSObject {
/// If **true**, then `NSUbiquitousKeyValueStore.synchronize()` will be called immediately after any change is made.
public static var syncUbiquitousKeyValueStoreOnChange = true

@available(*, deprecated: 2.2.1, unavailable, renamed: "syncUbiquitousKeyValueStoreOnChange")
public static var syncUbiquitousStoreKeyValueStoreOnChange = true

/// The singleton for Zephyr.
private static let shared = Zephyr()

Expand Down Expand Up @@ -386,7 +383,7 @@ extension Zephyr {
return
}

if let index = registeredObservationKeys.index(of: key) {
if let index = registeredObservationKeys.firstIndex(of: key) {

userDefaults.removeObserver(self, forKeyPath: key, context: nil)
registeredObservationKeys.remove(at: index)
Expand Down
3 changes: 1 addition & 2 deletions Zephyr.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Pod::Spec.new do |s|
# Version
s.version = "3.2.0"
s.swift_version = '4.2'
s.version = "3.3.0"

# Meta
s.name = "Zephyr"
Expand Down
18 changes: 7 additions & 11 deletions ZephyrExample/ZephyrExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -181,20 +181,20 @@
55EC36331E6BB0BB00726F13 = {
CreatedOnToolsVersion = 8.2.1;
DevelopmentTeam = HT94948NDD;
LastSwiftMigration = 0900;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
8E5ACC6C1E21881B00FF1FA3 = {
CreatedOnToolsVersion = 8.2.1;
DevelopmentTeam = HT94948NDD;
LastSwiftMigration = 0900;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = 8E5ACC681E21881B00FF1FA3 /* Build configuration list for PBXProject "ZephyrExample" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -315,8 +315,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand All @@ -340,8 +339,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.sabintsev.Zephyr;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand Down Expand Up @@ -468,8 +466,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.sabintsev.Zephyr-Sample-App";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -483,8 +480,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.sabintsev.Zephyr-Sample-App";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down

0 comments on commit a535ad1

Please sign in to comment.