Skip to content

Commit f435228

Browse files
committed
version 4.4.0 - increase minimum OS version. remove SpinLock. Update readme.
1 parent 1df9731 commit f435228

File tree

8 files changed

+48
-68
lines changed

8 files changed

+48
-68
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 4.4.0
2+
* Increase minimal version iOS 11.0, tvOS 11.0, macOS 10.13, watchOS 4.0
3+
* Remove SpinLock
4+
15
# 4.3.5
26
* fix makeGraph while use container hierarchy
37

DITranquillity.podspec

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = 'DITranquillity'
4-
s.version = '4.3.5'
4+
s.version = '4.4.0'
55
s.summary = 'DITranquillity - Dependency injection for iOS/macOS/tvOS (Swift) '
66

77
s.description = <<-DESC
@@ -18,12 +18,12 @@ Pod::Spec.new do |s|
1818
s.requires_arc = true
1919
s.swift_version = '5.1'
2020

21-
s.dependency 'SwiftLazy', '>= 1.1.6'
21+
s.dependency 'SwiftLazy', '>= 1.2.0'
2222

23-
s.ios.deployment_target = '8.0'
24-
s.tvos.deployment_target = '9.0'
25-
s.osx.deployment_target = '10.10'
26-
s.watchos.deployment_target = '2.0'
23+
s.ios.deployment_target = '11.0'
24+
s.tvos.deployment_target = '11.0'
25+
s.osx.deployment_target = '10.13'
26+
s.watchos.deployment_target = '4.0'
2727

2828
# subspecs is very long validation - 'pod lib lint' check all combination....
2929
core_h = 'Sources/DITranquillity.h'

DITranquillity.xcodeproj/project.pbxproj

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@
6060
ABBE383E25FDE60F00DAFB62 /* ThreadDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABBE383C25FDE60F00DAFB62 /* ThreadDictionary.swift */; };
6161
ABBE383F25FDE60F00DAFB62 /* ThreadDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABBE383C25FDE60F00DAFB62 /* ThreadDictionary.swift */; };
6262
ABBE384025FDE60F00DAFB62 /* ThreadDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABBE383C25FDE60F00DAFB62 /* ThreadDictionary.swift */; };
63+
ABC184872A2A675000C1DEB0 /* SwiftLazy in Frameworks */ = {isa = PBXBuildFile; productRef = ABC184862A2A675000C1DEB0 /* SwiftLazy */; };
64+
ABC184892A2A675500C1DEB0 /* SwiftLazy in Frameworks */ = {isa = PBXBuildFile; productRef = ABC184882A2A675500C1DEB0 /* SwiftLazy */; };
6365
ABDA289B23ABBECD00BEB63F /* DIStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABE60EDC23AA75AC00DEA34A /* DIStorage.swift */; };
6466
ABDA289C23ABBECD00BEB63F /* DIContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABE60EDB23AA75AC00DEA34A /* DIContainer.swift */; };
6567
ABDA289E23ABBECD00BEB63F /* Multithread.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABE60EB923AA75AC00DEA34A /* Multithread.swift */; };
@@ -381,13 +383,15 @@
381383
isa = PBXFrameworksBuildPhase;
382384
buildActionMask = 2147483647;
383385
files = (
386+
ABC184872A2A675000C1DEB0 /* SwiftLazy in Frameworks */,
384387
);
385388
runOnlyForDeploymentPostprocessing = 0;
386389
};
387390
169C0E431DA35CBE001F0AD5 /* Frameworks */ = {
388391
isa = PBXFrameworksBuildPhase;
389392
buildActionMask = 2147483647;
390393
files = (
394+
ABC184892A2A675500C1DEB0 /* SwiftLazy in Frameworks */,
391395
);
392396
runOnlyForDeploymentPostprocessing = 0;
393397
};
@@ -761,6 +765,7 @@
761765
);
762766
name = "DITranquillity-OSX";
763767
packageProductDependencies = (
768+
ABC184862A2A675000C1DEB0 /* SwiftLazy */,
764769
);
765770
productName = DITranquillity;
766771
productReference = 169C0DE51DA3501F001F0AD5 /* DITranquillity.framework */;
@@ -781,6 +786,7 @@
781786
);
782787
name = "DITranquillity-tvOS";
783788
packageProductDependencies = (
789+
ABC184882A2A675500C1DEB0 /* SwiftLazy */,
784790
);
785791
productName = DITranquillity;
786792
productReference = 169C0E4B1DA35CBE001F0AD5 /* DITranquillity.framework */;
@@ -1225,7 +1231,7 @@
12251231
"@executable_path/Frameworks",
12261232
"@loader_path/Frameworks",
12271233
);
1228-
MACOSX_DEPLOYMENT_TARGET = 10.10;
1234+
MACOSX_DEPLOYMENT_TARGET = 10.13;
12291235
MARKETING_VERSION = 4.3.4;
12301236
OTHER_SWIFT_FLAGS = "";
12311237
PRODUCT_BUNDLE_IDENTIFIER = "com.sia.DITranquillity-OSX";
@@ -1265,7 +1271,7 @@
12651271
"@executable_path/Frameworks",
12661272
"@loader_path/Frameworks",
12671273
);
1268-
MACOSX_DEPLOYMENT_TARGET = 10.10;
1274+
MACOSX_DEPLOYMENT_TARGET = 10.13;
12691275
MARKETING_VERSION = 4.3.4;
12701276
OTHER_SWIFT_FLAGS = "";
12711277
PRODUCT_BUNDLE_IDENTIFIER = "com.sia.DITranquillity-OSX";
@@ -1320,7 +1326,7 @@
13201326
SWIFT_PRECOMPILE_BRIDGING_HEADER = NO;
13211327
SWIFT_VERSION = 5.0;
13221328
TARGETED_DEVICE_FAMILY = 3;
1323-
TVOS_DEPLOYMENT_TARGET = 9.0;
1329+
TVOS_DEPLOYMENT_TARGET = 11.0;
13241330
WATCHOS_DEPLOYMENT_TARGET = 2.0;
13251331
};
13261332
name = Debug;
@@ -1362,7 +1368,7 @@
13621368
SWIFT_PRECOMPILE_BRIDGING_HEADER = NO;
13631369
SWIFT_VERSION = 5.0;
13641370
TARGETED_DEVICE_FAMILY = 3;
1365-
TVOS_DEPLOYMENT_TARGET = 9.0;
1371+
TVOS_DEPLOYMENT_TARGET = 11.0;
13661372
WATCHOS_DEPLOYMENT_TARGET = 2.0;
13671373
};
13681374
name = Release;
@@ -1506,7 +1512,7 @@
15061512
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
15071513
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
15081514
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1509-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
1515+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
15101516
LD_RUNPATH_SEARCH_PATHS = (
15111517
"$(inherited)",
15121518
"@executable_path/Frameworks",
@@ -1550,7 +1556,7 @@
15501556
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
15511557
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
15521558
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1553-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
1559+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
15541560
LD_RUNPATH_SEARCH_PATHS = (
15551561
"$(inherited)",
15561562
"@executable_path/Frameworks",
@@ -1616,7 +1622,7 @@
16161622
SWIFT_VERSION = 5.0;
16171623
TARGETED_DEVICE_FAMILY = 4;
16181624
TVOS_DEPLOYMENT_TARGET = 9.0;
1619-
WATCHOS_DEPLOYMENT_TARGET = 2.0;
1625+
WATCHOS_DEPLOYMENT_TARGET = 4.0;
16201626
};
16211627
name = Debug;
16221628
};
@@ -1661,7 +1667,7 @@
16611667
SWIFT_VERSION = 5.0;
16621668
TARGETED_DEVICE_FAMILY = 4;
16631669
TVOS_DEPLOYMENT_TARGET = 9.0;
1664-
WATCHOS_DEPLOYMENT_TARGET = 2.0;
1670+
WATCHOS_DEPLOYMENT_TARGET = 4.0;
16651671
};
16661672
name = Release;
16671673
};
@@ -1814,6 +1820,16 @@
18141820
package = AB393BAC28782717001DEFC7 /* XCRemoteSwiftPackageReference "SwiftLazy" */;
18151821
productName = SwiftLazy;
18161822
};
1823+
ABC184862A2A675000C1DEB0 /* SwiftLazy */ = {
1824+
isa = XCSwiftPackageProductDependency;
1825+
package = AB393BAC28782717001DEFC7 /* XCRemoteSwiftPackageReference "SwiftLazy" */;
1826+
productName = SwiftLazy;
1827+
};
1828+
ABC184882A2A675500C1DEB0 /* SwiftLazy */ = {
1829+
isa = XCSwiftPackageProductDependency;
1830+
package = AB393BAC28782717001DEFC7 /* XCRemoteSwiftPackageReference "SwiftLazy" */;
1831+
productName = SwiftLazy;
1832+
};
18171833
ABDA289823ABBECD00BEB63F /* SwiftLazy */ = {
18181834
isa = XCSwiftPackageProductDependency;
18191835
package = ABDA289923ABBECD00BEB63F /* XCRemoteSwiftPackageReference "SwiftLazy" */;

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let package = Package(
77
.library(name: "DITranquillity", targets: ["DITranquillity"])
88
],
99
dependencies: [
10-
.package(url: "https://github.com/ivlevAstef/SwiftLazy.git", from: "1.1.9")
10+
.package(url: "https://github.com/ivlevAstef/SwiftLazy.git", from: "1.2.0")
1111
],
1212
targets: [
1313
.target(name: "DITranquillity", dependencies: [

README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
<a href="http://cocoapods.org/pods/DITranquillity"><img src ="https://img.shields.io/cocoapods/v/DITranquillity.svg?style=flat"/></a>
66
<a href="https://github.com/Carthage/Carthage"><img src ="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat"/></a>
77
<a href="https://swift.org/package-manager"><img src ="https://img.shields.io/badge/SwiftPM-compatible-4BC51D.svg?style=flat"/></a>
8-
<a href="https://travis-ci.org/ivlevAstef/DITranquillity"><img src ="https://travis-ci.org/ivlevAstef/DITranquillity.svg?tag=v4.1.0"/></a>
98
<a href="https://github.com/ivlevAstef/DITranquillity/blob/master/LICENSE"><img src ="https://img.shields.io/github/license/ivlevAstef/DITranquillity.svg?maxAge=2592000"/></a>
10-
<a href="https://developer.apple.com/swift"><img src ="https://img.shields.io/badge/Swift-3.0--5.3-F16D39.svg?style=flat"/></a>
9+
<a href="https://developer.apple.com/swift"><img src ="https://img.shields.io/badge/Swift-3.0--5.8-F16D39.svg?style=flat"/></a>
1110
<a href="http://cocoapods.org/pods/DITranquillity"><img src ="https://img.shields.io/badge/platform-iOS%20%7C%20macOS%20%7C%20tvOS%20%7C%20watchOS%20%7C%20Linux-lightgrey.svg"/></a>
1211
<a href="https://codecov.io/gh/ivlevAstef/DITranquillity"><img src ="https://codecov.io/gh/ivlevAstef/DITranquillity/branch/master/graph/badge.svg"/></a>
1312
</p>
@@ -67,7 +66,7 @@ https://github.com/ivlevAstef/DITranquillity
6766

6867
Also you can edit your `Package.swift` and the following line into section `dependencies`:
6968
```Swift
70-
.package(url: "https://github.com/ivlevAstef/DITranquillity.git", from: "3.8.4")
69+
.package(url: "https://github.com/ivlevAstef/DITranquillity.git", from: "4.4.0")
7170
```
7271
And don't forget to specify in your section `target` wrote dependency line:
7372
```Swift
@@ -205,9 +204,9 @@ Also your can read articles:
205204
* Ru! Old! [https://habr.com/ru/post/311334/](https://habr.com/ru/post/311334/)
206205

207206
## Requirements
208-
iOS 9.0+,macOS 10.10+,tvOS 9.0+, watchOS, linux; ARC
207+
iOS 11.0+,macOS 10.13+,tvOS 11.0+, watchOS 4.0+, Linux; ARC
209208

210-
* Swift 5.5-5.7: Xcode 13,14; version >= 3.6.3
209+
* Swift 5.5-5.8: Xcode 13,14; version >= 3.6.3
211210
* Swift 5.0-5.3: Xcode 10.2-12.x; version >= 3.6.3
212211
* Swift 4.2: Xcode 10; version >= 3.4.3
213212
* Swift 4.1: Xcode 9.3; version >= 3.2.3
@@ -236,9 +235,5 @@ Please help library development and create [pull requests](https://github.com/iv
236235
### Plea
237236
If you like my library, then support the library by putting star.
238237

239-
You can also support the author of the library with a donation:
240-
241-
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/ivlevAstef)
242-
243238
### Question?
244239
You can feel free to ask the question at e-mail: [email protected].

README_ru.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
<a href="http://cocoapods.org/pods/DITranquillity"><img src ="https://img.shields.io/cocoapods/v/DITranquillity.svg?style=flat"/></a>
66
<a href="https://github.com/Carthage/Carthage"><img src ="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat"/></a>
77
<a href="https://swift.org/package-manager"><img src ="https://img.shields.io/badge/SwiftPM-compatible-4BC51D.svg?style=flat"/></a>
8-
<a href="https://travis-ci.org/ivlevAstef/DITranquillity"><img src ="https://travis-ci.org/ivlevAstef/DITranquillity.svg?tag=v4.1.0"/></a>
98
<a href="https://github.com/ivlevAstef/DITranquillity/blob/master/LICENSE"><img src ="https://img.shields.io/github/license/ivlevAstef/DITranquillity.svg?maxAge=2592000"/></a>
10-
<a href="https://developer.apple.com/swift"><img src ="https://img.shields.io/badge/Swift-3.0--5.3-F16D39.svg?style=flat"/></a>
9+
<a href="https://developer.apple.com/swift"><img src ="https://img.shields.io/badge/Swift-3.0--5.8-F16D39.svg?style=flat"/></a>
1110
<a href="http://cocoapods.org/pods/DITranquillity"><img src ="https://img.shields.io/badge/platform-iOS%20%7C%20macOS%20%7C%20tvOS%20%7C%20watchOS%20%7C%20Linux-lightgrey.svg"/></a>
1211
<a href="https://codecov.io/gh/ivlevAstef/DITranquillity"><img src ="https://codecov.io/gh/ivlevAstef/DITranquillity/branch/master/graph/badge.svg"/></a>
1312
</p>
@@ -65,7 +64,7 @@ https://github.com/ivlevAstef/DITranquillity
6564
```
6665
Или прописать в вашем `Package.swift` файле в секции `dependencies`:
6766
```Swift
68-
.package(url: "https://github.com/ivlevAstef/DITranquillity.git", from: "3.8.4")
67+
.package(url: "https://github.com/ivlevAstef/DITranquillity.git", from: "4.4.0")
6968
```
7069
И не забудьте указать в таргете в аргументе `dependencies` зависимость на библиотеку:
7170
```Swift
@@ -203,9 +202,9 @@ class AuthInteractorImpl: AuthInteractor {
203202
* Старая [https://habr.com/ru/post/311334/](https://habr.com/ru/post/311334/)
204203

205204
## Требования
206-
iOS 9.0+,macOS 10.10+,tvOS 9.0+, watchOS, linux; ARC
205+
iOS 11.0+,macOS 10.13+,tvOS 11.0+, watchOS 4.0+, Linux; ARC
207206

208-
* Swift 5.5-5.7: Xcode 13,14; version >= 3.6.3
207+
* Swift 5.5-5.8: Xcode 13,14; version >= 3.6.3
209208
* Swift 5.0-5.3: Xcode 10.2-12.x; version >= 3.6.3
210209
* Swift 4.1: Xcode 9.3; version >= 3.2.3
211210
* Swift 4.0: Xcode 9.0; version >= 3.0.5
@@ -233,9 +232,5 @@ iOS 9.0+,macOS 10.10+,tvOS 9.0+, watchOS, linux; ARC
233232
### Просьба
234233
Если вам понравилась моя библиотека, то поддержите библиотеку поставив звёздочку.
235234

236-
Также вы можете поддержать развитие библиотеки небольшим денежным поощрением - ведь я пишу библиотеку длинными темными ночами.
237-
238-
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/ivlevAstef)
239-
240235
### Остались вопросы?
241236
Я могу ответить на ваши вопросы по почте: [email protected]

Sources/Core/Internal/threads/FastLock.swift

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,11 @@ internal protocol FastLock {
1212
}
1313

1414
internal func makeFastLock() -> FastLock {
15-
#if os(iOS)
16-
if #available(iOS 10.0, *) {
17-
return UnfairLock()
18-
}
19-
#elseif os(OSX)
20-
if #available(OSX 10.12, *) {
21-
return UnfairLock()
22-
}
23-
#elseif os(tvOS)
24-
if #available(tvOS 10.0, *) {
25-
return UnfairLock()
26-
}
27-
#elseif os(watchOS)
28-
if #available(watchOS 3.0, *) {
29-
return UnfairLock()
30-
}
15+
#if os(Linux)
16+
return SpinLock()
17+
#else
18+
return UnfairLock()
3119
#endif
32-
33-
return SpinLock()
3420
}
3521

3622
#if os(Linux)
@@ -63,10 +49,6 @@ private class SpinLock: FastLock {
6349

6450
import Darwin
6551

66-
@available(tvOS 10.0, *)
67-
@available(OSX 10.12, *)
68-
@available(iOS 10.0, *)
69-
@available(watchOS 3.0, *)
7052
private class UnfairLock: FastLock {
7153
private let monitor: os_unfair_lock_t
7254

@@ -89,16 +71,4 @@ private class UnfairLock: FastLock {
8971
}
9072
}
9173

92-
private class SpinLock: FastLock {
93-
private var monitor: OSSpinLock = OSSpinLock()
94-
95-
func lock() {
96-
OSSpinLockLock(&monitor)
97-
}
98-
99-
func unlock() {
100-
OSSpinLockUnlock(&monitor)
101-
}
102-
}
103-
10474
#endif

jazzy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jazzy \
44
--author_url https://github.com/ivlevAstef \
55
--github_url https://github.com/ivlevAstef/DITranquillity \
66
--github-file-prefix https://github.com/ivlevAstef/DITranquillity/tree/master \
7-
--module-version 4.1.1 \
7+
--module-version 4.4.0 \
88
--xcodebuild-arguments -scheme,DITranquillity-iOS,-destination,generic/platform=iOS \
99
--module DITranquillity \
1010
--root-url https://github.com/ivlevAstef/DITranquillity/code/ \

0 commit comments

Comments
 (0)