Skip to content

Commit

Permalink
Merge pull request #14 from takasek/swift4.2
Browse files Browse the repository at this point in the history
Swift4.2
  • Loading branch information
takasek authored Aug 12, 2019
2 parents 8b0ff17 + 170711c commit 44ae47c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 31 deletions.
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

3 changes: 2 additions & 1 deletion Notifwift.podspec
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
Pod::Spec.new do |s|
s.name = "Notifwift"
s.version = "1.0.0"
s.version = "1.1.0"
s.summary = "NSNotificationCenter wrapper for Swift"
s.license = 'MIT'
s.homepage = "https://github.com/takasek/Notifwift"
s.author = { "takasek" => "takassekiyoshi@gmail.com" }
s.source = { :git => "https://github.com/takasek/Notifwift.git",
:tag => s.version.to_s }
s.source_files = "Sources/*.swift"
s.swift_version = "4.2"
s.requires_arc = true

s.ios.deployment_target = "8.0"
Expand Down
6 changes: 2 additions & 4 deletions Notifwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand Down Expand Up @@ -327,7 +327,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
Expand All @@ -346,7 +346,6 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Notifwift/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = takasek.Notifwift;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -366,7 +365,6 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Notifwift/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = takasek.Notifwift;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
25 changes: 0 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,28 +172,8 @@ final class MyUserRepository {
The Notifwift instance is alive during MyViewController instance.
It dies when MyViewController instance dies, so observers registered in the Notifwift instance are to be removed automatically. Never mind if you have to manage observer!


## Migration to Swift 3.0

Notifwift 0.x accepts notification names as `String literal`. However, Notifwift 1.x accepts them as `Notification.Name`.

The change comes from the `Swift 3.0`'s concept.

[https://swift.org/migration-guide/](https://swift.org/migration-guide/) says,

>In Swift 3, many of Foundation’s “stringly-typed” APIs have been changed to use struct “wrapper types”, such as the new Notification.Name type. Since, it’s common for notification names and other string constants to be declared globally or as static members, the best way to take advantage of these new types is usually to construct the wrapper at the point of declaration:
>
```swift
static let MyGreatNotification = Notification.Name("MyGreatNotification")
// Use site (no change)
NotificationCenter.default().post(name: MyController.MyGreatNotification, object: self)'
```


## Installation

### For Swift 3.0

Notifwift is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile:

```ruby
Expand All @@ -206,11 +186,6 @@ Notifwift is available through [Carthage](https://github.com/Carthage/Carthage).
github "takasek/Notifwift"
```

### for Swift 2.3

take a look at the [`Swift-2.3` branch](https://github.com/takasek/Notifwift/tree/swift-2.3)


## Author

[takasek](https://twitter.com/takasek)
Expand Down

0 comments on commit 44ae47c

Please sign in to comment.