diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dc24b72..939213b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +### 1.35.1 + +- **Added**: Auto documentation generation for `TIFoundationUtils` playground and compile checks for playground before release +- **Updated**: `AsyncOperation` fixed ordering of chain operations execution + ### 1.35.0 - **Added**: `TIDeveloperUtils` framework, that contains different utils for development diff --git a/Package.resolved b/Package.resolved index 64252c9e..d91fdd25 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,79 +1,77 @@ { - "object": { - "pins": [ - { - "package": "Alamofire", - "repositoryURL": "https://github.com/Alamofire/Alamofire.git", - "state": { - "branch": null, - "revision": "f96b619bcb2383b43d898402283924b80e2c4bae", - "version": "5.4.3" - } - }, - { - "package": "Cache", - "repositoryURL": "https://github.com/hyperoslo/Cache.git", - "state": { - "branch": null, - "revision": "c7f4d633049c3bd649a353bad36f6c17e9df085f", - "version": "6.0.0" - } - }, - { - "package": "Cursors", - "repositoryURL": "https://github.com/petropavel13/Cursors", - "state": { - "branch": null, - "revision": "a1561869135e72832eff3b1e729075c56c2eebf6", - "version": "0.5.1" - } - }, - { - "package": "KeychainAccess", - "repositoryURL": "https://github.com/kishikawakatsumi/KeychainAccess.git", - "state": { - "branch": null, - "revision": "84e546727d66f1adc5439debad16270d0fdd04e7", - "version": "4.2.2" - } - }, - { - "package": "Moya", - "repositoryURL": "https://github.com/Moya/Moya.git", - "state": { - "branch": null, - "revision": "9b906860e3c3c09032879465c471e6375829593f", - "version": "15.0.0" - } - }, - { - "package": "ReactiveSwift", - "repositoryURL": "https://github.com/ReactiveCocoa/ReactiveSwift.git", - "state": { - "branch": null, - "revision": "c43bae3dac73fdd3cb906bd5a1914686ca71ed3c", - "version": "6.7.0" - } - }, - { - "package": "RxSwift", - "repositoryURL": "https://github.com/ReactiveX/RxSwift.git", - "state": { - "branch": null, - "revision": "b4307ba0b6425c0ba4178e138799946c3da594f8", - "version": "6.5.0" - } - }, - { - "package": "TableKit", - "repositoryURL": "https://github.com/maxsokolov/TableKit.git", - "state": { - "branch": null, - "revision": "8bf4840d9d0475a92352f02f368f88b74eced447", - "version": "2.11.0" - } + "pins" : [ + { + "identity" : "alamofire", + "kind" : "remoteSourceControl", + "location" : "https://github.com/Alamofire/Alamofire.git", + "state" : { + "revision" : "f96b619bcb2383b43d898402283924b80e2c4bae", + "version" : "5.4.3" } - ] - }, - "version": 1 + }, + { + "identity" : "cache", + "kind" : "remoteSourceControl", + "location" : "https://github.com/hyperoslo/Cache.git", + "state" : { + "revision" : "c7f4d633049c3bd649a353bad36f6c17e9df085f", + "version" : "6.0.0" + } + }, + { + "identity" : "cursors", + "kind" : "remoteSourceControl", + "location" : "https://github.com/petropavel13/Cursors", + "state" : { + "revision" : "a1561869135e72832eff3b1e729075c56c2eebf6", + "version" : "0.5.1" + } + }, + { + "identity" : "keychainaccess", + "kind" : "remoteSourceControl", + "location" : "https://github.com/kishikawakatsumi/KeychainAccess.git", + "state" : { + "revision" : "84e546727d66f1adc5439debad16270d0fdd04e7", + "version" : "4.2.2" + } + }, + { + "identity" : "moya", + "kind" : "remoteSourceControl", + "location" : "https://github.com/Moya/Moya.git", + "state" : { + "revision" : "9b906860e3c3c09032879465c471e6375829593f", + "version" : "15.0.0" + } + }, + { + "identity" : "reactiveswift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/ReactiveCocoa/ReactiveSwift.git", + "state" : { + "revision" : "c43bae3dac73fdd3cb906bd5a1914686ca71ed3c", + "version" : "6.7.0" + } + }, + { + "identity" : "rxswift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/ReactiveX/RxSwift.git", + "state" : { + "revision" : "b4307ba0b6425c0ba4178e138799946c3da594f8", + "version" : "6.5.0" + } + }, + { + "identity" : "tablekit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/maxsokolov/TableKit.git", + "state" : { + "revision" : "8bf4840d9d0475a92352f02f368f88b74eced447", + "version" : "2.11.0" + } + } + ], + "version" : 2 } diff --git a/Package.swift b/Package.swift index 529317d1..32aff137 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.1 +// swift-tools-version:5.7 import PackageDescription let package = Package( @@ -64,7 +64,7 @@ let package = Package( // MARK: - Utils .target(name: "TISwiftUtils", path: "TISwiftUtils/Sources"), - .target(name: "TIFoundationUtils", dependencies: ["TISwiftUtils"], path: "TIFoundationUtils"), + .target(name: "TIFoundationUtils", dependencies: ["TISwiftUtils"], path: "TIFoundationUtils", exclude: ["TIFoundationUtils.app"]), .target(name: "TIKeychainUtils", dependencies: ["TIFoundationUtils", "KeychainAccess"], path: "TIKeychainUtils/Sources"), .target(name: "TITableKitUtils", dependencies: ["TIUIElements", "TableKit"], path: "TITableKitUtils/Sources"), .target(name: "TILogging", dependencies: ["TIUIElements", "TISwiftUtils", "TIUIKitCore"], path: "TILogging/Sources"), diff --git a/README.md b/README.md index e8ca5c99..e78ba9ca 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,71 @@ This repository contains the following frameworks: - [TIYandexMapUtils](TIYandexMapUtils) - set of helpers for map objects clustering and interacting using Yandex Maps SDK. - [TIAuth](TIAuth) - login, registration, confirmation and other related actions -Useful docs: +## Playgrounds +### Create new Playground + +```sh +cd TIModuleName +nef plaground --name TIModuleName --cocoapods --custom-podfile PlaygroundPodfile +``` +See example of `PlaygroundPodfile` in `TIFoundationUtils` + + +### Rename/add pages to Playground + +For every new feature in module create new Playground page with documentation in comments. See [nef markdown documentation](https://github.com/bow-swift/nef#-generating-a-markdown-project). + +### Create symlink to nef playground + +```sh +cd TIModuleName +ln -s TIModuleName.app/Contents/MacOS/TIModuleName.playground TIModuleName.playground +``` + +### Add nef files to TIModuleName.app/.gitignore + +``` +# gitignore nef files +**/build/ +**/nef/ +LICENSE +``` + +### Add new playground to pre release script + +`project-scripts/gen_docs_from_playgrounds.sh`: + +```sh +PLAYGROUNDS="${SRCROOT}/TIFoundationUtils/TIFoundationUtils.app +${SRCROOT}/TIModuleName/TIModuleName.app" +``` + +### Exclude .app bundles from package sources + +#### SPM + +```swift +.target(name: "TIModuleName", dependencies: ..., path: ..., exclude: ["TIModuleName.app"]), +``` + +#### Podspec + +```ruby + sources = 'your_sources_expression' + if File.basename(Dir.getwd) == s.name # installing using :path => + s.source_files = sources + s.exclude_files = s.name + '.app' + else + s.source_files = s.name + '/' + sources + s.exclude_files = s.name + '/*.app' + end +``` + +## Docs: + +- [TIFoundationUtils](docs/tifoundationutils) + * [AsyncOperation](docs/tifoundationutils/asyncoperation.md) - [Semantic Commit Messages](docs/semantic-commit-messages.md) - commit message codestyle. - [Snippets](docs/snippets.md) - useful commands and scripts for development. @@ -58,4 +121,4 @@ pod 'TIFoundationUtils', 'x.y.z' ## Legacy -Code located in root `Sources` folder and `LeadKit.podspec` should be treated as legacy and shouldn't be used in newly created projects. Please use TI* modules via SPM or CocoaPods. \ No newline at end of file +Code located in root `Sources` folder and `LeadKit.podspec` should be treated as legacy and shouldn't be used in newly created projects. Please use TI* modules via SPM or CocoaPods. diff --git a/TIAppleMapUtils/TIAppleMapUtils.podspec b/TIAppleMapUtils/TIAppleMapUtils.podspec index f9688bdb..339d3b27 100644 --- a/TIAppleMapUtils/TIAppleMapUtils.podspec +++ b/TIAppleMapUtils/TIAppleMapUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIAppleMapUtils' - s.version = '1.35.0' + s.version = '1.35.1' s.summary = 'Set of helpers for map objects clustering and interacting using Apple MapKit.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIAuth/TIAuth.podspec b/TIAuth/TIAuth.podspec index cdaa6732..ae8f0d87 100644 --- a/TIAuth/TIAuth.podspec +++ b/TIAuth/TIAuth.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIAuth' - s.version = '1.35.0' + s.version = '1.35.1' s.summary = 'Login, registration, confirmation and other related actions' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIDeveloperUtils/TIDeveloperUtils.podspec b/TIDeveloperUtils/TIDeveloperUtils.podspec index 5e51f408..11469088 100644 --- a/TIDeveloperUtils/TIDeveloperUtils.podspec +++ b/TIDeveloperUtils/TIDeveloperUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIDeveloperUtils' - s.version = '1.35.0' + s.version = '1.35.1' s.summary = 'Universal web view API' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIEcommerce/TIEcommerce.podspec b/TIEcommerce/TIEcommerce.podspec index 0fca26e8..7e1ccab1 100644 --- a/TIEcommerce/TIEcommerce.podspec +++ b/TIEcommerce/TIEcommerce.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIEcommerce' - s.version = '1.35.0' + s.version = '1.35.1' s.summary = 'Cart, products, promocodes, bonuses and other related actions' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIFoundationUtils/AsyncOperation/Playground.playground/Contents.swift b/TIFoundationUtils/AsyncOperation/Playground.playground/Contents.swift deleted file mode 100644 index 2cdcf0bf..00000000 --- a/TIFoundationUtils/AsyncOperation/Playground.playground/Contents.swift +++ /dev/null @@ -1,45 +0,0 @@ -import Foundation -import TIFoundationUtils - -let operationQueue = OperationQueue() -operationQueue.maxConcurrentOperationCount = 1 - -struct NonCancellableTask: CancellableTask { - func cancel() {} -} - -ClosureAsyncOperation { completion in - DispatchQueue.global().asyncAfter(deadline: .now() + .seconds(1)) { - completion(.success(1)) - } - return NonCancellableTask() - -} -.map { $0 * 2 } -.observe(onSuccess: { result in - debugPrint("Async operation one has finished with \(result)") -}) -.add(to: operationQueue) - -ClosureAsyncOperation { completion in - DispatchQueue.global().asyncAfter(deadline: .now() + .seconds(1)) { - completion(.success(2)) - } - return NonCancellableTask() -} -.map { $0 * 2 } -.observe(onSuccess: { result in - debugPrint("Async operation two has finished with \(result)") -}) -.add(to: operationQueue) - -// "Async operation one has finished with 2" -// "Async operation two has finished with 4" - -struct Some { - var arr: [Int] = [] - - mutating func add(_ i: Int) { - arr.append(i) - } -} diff --git a/TIFoundationUtils/AsyncOperation/Playground.playground/contents.xcplayground b/TIFoundationUtils/AsyncOperation/Playground.playground/contents.xcplayground deleted file mode 100644 index cf026f22..00000000 --- a/TIFoundationUtils/AsyncOperation/Playground.playground/contents.xcplayground +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/TIFoundationUtils/AsyncOperation/Sources/AsyncOperation+Observe.swift b/TIFoundationUtils/AsyncOperation/Sources/AsyncOperation+Observe.swift index 9dadfc85..123fda8c 100644 --- a/TIFoundationUtils/AsyncOperation/Sources/AsyncOperation+Observe.swift +++ b/TIFoundationUtils/AsyncOperation/Sources/AsyncOperation+Observe.swift @@ -25,15 +25,25 @@ import Foundation private final class ClosureObserverOperation: DependendAsyncOperation { public typealias OnResultClosure = (Result) -> Void + private let onResult: OnResultClosure? + private let callbackQueue: DispatchQueue + public init(dependency: AsyncOperation, onResult: OnResultClosure? = nil, callbackQueue: DispatchQueue = .main) { - super.init(dependency: dependency) { result in - callbackQueue.async { - onResult?(result) - } - return result + self.onResult = onResult + self.callbackQueue = callbackQueue + + super.init(dependency: dependency) { $0 } + } + + override func handle(result: Result) { + self.result = result + + callbackQueue.async { + self.onResult?(result) + self.state = .isFinished } } } diff --git a/TIFoundationUtils/AsyncOperation/Sources/DependendAsyncOperation.swift b/TIFoundationUtils/AsyncOperation/Sources/DependendAsyncOperation.swift index 6efc6288..2b7848d1 100644 --- a/TIFoundationUtils/AsyncOperation/Sources/DependendAsyncOperation.swift +++ b/TIFoundationUtils/AsyncOperation/Sources/DependendAsyncOperation.swift @@ -24,22 +24,26 @@ import Foundation open class DependendAsyncOperation: AsyncOperation { public var dependencyObservation: NSKeyValueObservation? + private let dependency: Operation public init(dependency: AsyncOperation, resultObservation: @escaping (Result) -> Result) { + self.dependency = dependency super.init() - cancelOnCancellation(of: dependency) + dependency.cancelOnCancellation(of: self) dependencyObservation = dependency.subscribe { [weak self] in - self?.result = resultObservation($0) - self?.state = .isReady + self?.handle(result: resultObservation($0)) } - addDependency(dependency) // keeps strong reference to dependency as well - - state = nil // prevent start of current operation if result is not yet provided by dependency + state = .isReady } + open override func start() { + state = .isExecuting + + dependency.start() + } } diff --git a/TIFoundationUtils/PlaygroundPodfile b/TIFoundationUtils/PlaygroundPodfile new file mode 100644 index 00000000..ab5d58c0 --- /dev/null +++ b/TIFoundationUtils/PlaygroundPodfile @@ -0,0 +1,7 @@ +target 'TIFoundationUtils' do + platform :ios, 10.0 + use_frameworks! + + pod 'TISwiftUtils', :path => '../../../../TISwiftUtils/TISwiftUtils.podspec' + pod 'TIFoundationUtils', :path => '../../../../TIFoundationUtils/TIFoundationUtils.podspec' +end diff --git a/TIFoundationUtils/TIFoundationUtils.app/.gitignore b/TIFoundationUtils/TIFoundationUtils.app/.gitignore new file mode 100644 index 00000000..b7fe13ce --- /dev/null +++ b/TIFoundationUtils/TIFoundationUtils.app/.gitignore @@ -0,0 +1,4 @@ +# gitignore nef files +**/build/ +**/nef/ +LICENSE \ No newline at end of file diff --git a/TIFoundationUtils/TIFoundationUtils.app/Contents/Info.plist b/TIFoundationUtils/TIFoundationUtils.app/Contents/Info.plist new file mode 100644 index 00000000..831ea97a --- /dev/null +++ b/TIFoundationUtils/TIFoundationUtils.app/Contents/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + launcher + CFBundleIconFile + AppIcon + CFBundleIconName + AppIcon + CFBundleIdentifier + com.fortysevendeg.nef + CFBundleInfoDictionaryVersion + 6.0 + CFBundleSupportedPlatforms + + MacOSX + + LSApplicationCategoryType + public.app-category.developer-tools + LSMinimumSystemVersion + 10.14 + NSHumanReadableCopyright + Copyright © 2019 The nef Authors. All rights reserved. + + diff --git a/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/.gitignore b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/.gitignore new file mode 100644 index 00000000..18bd1f3b --- /dev/null +++ b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/.gitignore @@ -0,0 +1,26 @@ +## gitignore nef files +**/build/ +**/nef/ +LICENSE + +## User data +**/xcuserdata/ +podfile.lock +**.DS_Store + +## Obj-C/Swift specific +*.hmap +*.ipa +*.dSYM.zip +*.dSYM + +## CocoaPods +**Pods** + +## Carthage +**Carthage** + +## SPM +.build +.swiftpm +swiftpm diff --git a/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/Podfile b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/Podfile new file mode 100644 index 00000000..ab5d58c0 --- /dev/null +++ b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/Podfile @@ -0,0 +1,7 @@ +target 'TIFoundationUtils' do + platform :ios, 10.0 + use_frameworks! + + pod 'TISwiftUtils', :path => '../../../../TISwiftUtils/TISwiftUtils.podspec' + pod 'TIFoundationUtils', :path => '../../../../TIFoundationUtils/TIFoundationUtils.podspec' +end diff --git a/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils.playground/Pages/AsyncOperation.xcplaygroundpage/Contents.swift b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils.playground/Pages/AsyncOperation.xcplaygroundpage/Contents.swift new file mode 100644 index 00000000..37a1769a --- /dev/null +++ b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils.playground/Pages/AsyncOperation.xcplaygroundpage/Contents.swift @@ -0,0 +1,77 @@ +/*: + # `AsyncOperation` - generic сабкласс Operation + +Позволяет запускать: + +- асинхронный код внутри операции +- собирать цепочки из операций +- подписываться на результат выполнения + + ## Базовые операции + + "Из коробки", на данный момент, доступен всего один сабкласс асинхронной операции, потому что больше обычно и не нужно. + Но можно наследоваться и создавать собственные сабклассы при необходимости. + */ + +/*: + ### `ClosureAsyncOperation` + + Операция принимающая некий closure, который по окончании своей работы вызовет completion, переданный ему параметром +*/ + +import Foundation +import TIFoundationUtils + +let intResultOperation = ClosureAsyncOperation { completion in + DispatchQueue.global().asyncAfter(deadline: .now() + .seconds(3)) { + completion(.success(1)) + } + return Cancellables.nonCancellable() +} + +/*: + ## Базовые операторы + + На данный момент реализовано всего два оператора: + + - `map(mapOutput:mapFailure:)` - конвертирует ResultType в новый NewResultType и ErrorType в новый NewErrorType + - `observe(onSuccess:onFailure)` - просто вызывает переданные callback'и при получении результата или ошибки + + */ + +//: ### Пример запуска асинхронных операци с применением операторов в последовательной очереди и вывод результатов + +let operationQueue = OperationQueue() +operationQueue.maxConcurrentOperationCount = 1 + +ClosureAsyncOperation { completion in + DispatchQueue.global().asyncAfter(deadline: .now() + .seconds(3)) { + completion(.success(1)) + } + return Cancellables.nonCancellable() +} +.map { $0 * 2 } +.observe(onSuccess: { result in + debugPrint("Async operation one has finished with \(result)") +}) +.add(to: operationQueue) + +ClosureAsyncOperation { completion in + DispatchQueue.global().asyncAfter(deadline: .now() + .seconds(1)) { + completion(.success("Success")) + } + return Cancellables.nonCancellable() +} +.observe(onSuccess: { result in + debugPrint("Async operation two has finished with \(result)") +}) +.add(to: operationQueue) + +/*: + В консоли будет выведено: + + ``` + "Async operation one has finished with 2" + "Async operation two has finished with Success" + ``` + */ diff --git a/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils.playground/contents.xcplayground b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils.playground/contents.xcplayground new file mode 100644 index 00000000..00daa653 --- /dev/null +++ b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils.playground/contents.xcplayground @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils.xcodeproj/project.pbxproj b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils.xcodeproj/project.pbxproj new file mode 100644 index 00000000..be06727a --- /dev/null +++ b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils.xcodeproj/project.pbxproj @@ -0,0 +1,396 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + A02229F337222E1B9E665195 /* Pods_TIFoundationUtils.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0CC8351C190B190691F8FC76 /* Pods_TIFoundationUtils.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 0CC8351C190B190691F8FC76 /* Pods_TIFoundationUtils.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TIFoundationUtils.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 59A923BF05D59C9BEC19C6FD /* Pods-TIFoundationUtils.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TIFoundationUtils.release.xcconfig"; path = "Target Support Files/Pods-TIFoundationUtils/Pods-TIFoundationUtils.release.xcconfig"; sourceTree = ""; }; + 8BACBE8322576CAD00266845 /* TIFoundationUtils.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TIFoundationUtils.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8BACBE8622576CAD00266845 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + EC0CA80D0000D9F6C5FACF34 /* Pods-TIFoundationUtils.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TIFoundationUtils.debug.xcconfig"; path = "Target Support Files/Pods-TIFoundationUtils/Pods-TIFoundationUtils.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8BACBE8022576CAD00266845 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A02229F337222E1B9E665195 /* Pods_TIFoundationUtils.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 37058452818BA6D3D6C19AA7 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 0CC8351C190B190691F8FC76 /* Pods_TIFoundationUtils.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 8B39A26221D40F8700DE2643 = { + isa = PBXGroup; + children = ( + 8BACBE8422576CAD00266845 /* TIFoundationUtils */, + 8B39A26C21D40F8700DE2643 /* Products */, + AAAF022BA9D15672298175E6 /* Pods */, + 37058452818BA6D3D6C19AA7 /* Frameworks */, + ); + sourceTree = ""; + }; + 8B39A26C21D40F8700DE2643 /* Products */ = { + isa = PBXGroup; + children = ( + 8BACBE8322576CAD00266845 /* TIFoundationUtils.framework */, + ); + name = Products; + sourceTree = ""; + }; + 8BACBE8422576CAD00266845 /* TIFoundationUtils */ = { + isa = PBXGroup; + children = ( + 8BACBE8622576CAD00266845 /* Info.plist */, + ); + path = TIFoundationUtils; + sourceTree = ""; + }; + AAAF022BA9D15672298175E6 /* Pods */ = { + isa = PBXGroup; + children = ( + EC0CA80D0000D9F6C5FACF34 /* Pods-TIFoundationUtils.debug.xcconfig */, + 59A923BF05D59C9BEC19C6FD /* Pods-TIFoundationUtils.release.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 8BACBE7E22576CAD00266845 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 8BACBE8222576CAD00266845 /* TIFoundationUtils */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8BACBE8A22576CAD00266845 /* Build configuration list for PBXNativeTarget "TIFoundationUtils" */; + buildPhases = ( + F4F8AAE8BFCE7066005B0EF5 /* [CP] Check Pods Manifest.lock */, + 8BACBE7E22576CAD00266845 /* Headers */, + 8BACBE7F22576CAD00266845 /* Sources */, + 8BACBE8022576CAD00266845 /* Frameworks */, + 8BACBE8122576CAD00266845 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = TIFoundationUtils; + productName = TIFoundationUtils2; + productReference = 8BACBE8322576CAD00266845 /* TIFoundationUtils.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 8B39A26321D40F8700DE2643 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1010; + LastUpgradeCheck = 1200; + ORGANIZATIONNAME = "47 Degrees"; + TargetAttributes = { + 8BACBE8222576CAD00266845 = { + CreatedOnToolsVersion = 10.1; + }; + }; + }; + buildConfigurationList = 8B39A26621D40F8700DE2643 /* Build configuration list for PBXProject "TIFoundationUtils" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 8B39A26221D40F8700DE2643; + productRefGroup = 8B39A26C21D40F8700DE2643 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8BACBE8222576CAD00266845 /* TIFoundationUtils */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8BACBE8122576CAD00266845 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + F4F8AAE8BFCE7066005B0EF5 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-TIFoundationUtils-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8BACBE7F22576CAD00266845 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 8B39A27721D40F8800DE2643 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_TESTING_SEARCH_PATHS = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 8B39A27821D40F8800DE2643 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTING_SEARCH_PATHS = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 8BACBE8822576CAD00266845 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = EC0CA80D0000D9F6C5FACF34 /* Pods-TIFoundationUtils.debug.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + CURRENT_TIFoundationUtils_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "$(SRCROOT)/TIFoundationUtils/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.47deg.ios.TIFoundationUtils; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 8BACBE8922576CAD00266845 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 59A923BF05D59C9BEC19C6FD /* Pods-TIFoundationUtils.release.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + CURRENT_TIFoundationUtils_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "$(SRCROOT)/TIFoundationUtils/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.47deg.ios.TIFoundationUtils; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 8B39A26621D40F8700DE2643 /* Build configuration list for PBXProject "TIFoundationUtils" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8B39A27721D40F8800DE2643 /* Debug */, + 8B39A27821D40F8800DE2643 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 8BACBE8A22576CAD00266845 /* Build configuration list for PBXNativeTarget "TIFoundationUtils" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8BACBE8822576CAD00266845 /* Debug */, + 8BACBE8922576CAD00266845 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 8B39A26321D40F8700DE2643 /* Project object */; +} diff --git a/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..e9faedbc --- /dev/null +++ b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils.xcodeproj/xcshareddata/xcschemes/TIFoundationUtils.xcscheme b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils.xcodeproj/xcshareddata/xcschemes/TIFoundationUtils.xcscheme new file mode 100644 index 00000000..393ee838 --- /dev/null +++ b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils.xcodeproj/xcshareddata/xcschemes/TIFoundationUtils.xcscheme @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils.xcworkspace/contents.xcworkspacedata b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..b2b0b0ef --- /dev/null +++ b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils/Info.plist b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils/Info.plist new file mode 100644 index 00000000..98d14f60 --- /dev/null +++ b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + NSHumanReadableCopyright + Copyright © 2019. The nef authors. + + diff --git a/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/launcher b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/launcher new file mode 100755 index 00000000..549f1531 --- /dev/null +++ b/TIFoundationUtils/TIFoundationUtils.app/Contents/MacOS/launcher @@ -0,0 +1,6 @@ +#!/bin/bash + +workspace="TIFoundationUtils.xcworkspace" +workspacePath=$(echo "$0" | rev | cut -f2- -d '/' | rev) + +open "`pwd`/$workspacePath/$workspace" diff --git a/TIFoundationUtils/TIFoundationUtils.app/Contents/Resources/AppIcon.icns b/TIFoundationUtils/TIFoundationUtils.app/Contents/Resources/AppIcon.icns new file mode 100644 index 00000000..32814f1c Binary files /dev/null and b/TIFoundationUtils/TIFoundationUtils.app/Contents/Resources/AppIcon.icns differ diff --git a/TIFoundationUtils/TIFoundationUtils.app/Contents/Resources/Assets.car b/TIFoundationUtils/TIFoundationUtils.app/Contents/Resources/Assets.car new file mode 100644 index 00000000..79d9ea89 Binary files /dev/null and b/TIFoundationUtils/TIFoundationUtils.app/Contents/Resources/Assets.car differ diff --git a/TIFoundationUtils/TIFoundationUtils.playground b/TIFoundationUtils/TIFoundationUtils.playground new file mode 120000 index 00000000..89145c90 --- /dev/null +++ b/TIFoundationUtils/TIFoundationUtils.playground @@ -0,0 +1 @@ +TIFoundationUtils.app/Contents/MacOS/TIFoundationUtils.playground \ No newline at end of file diff --git a/TIFoundationUtils/TIFoundationUtils.podspec b/TIFoundationUtils/TIFoundationUtils.podspec index fb03a9e5..81fb8902 100644 --- a/TIFoundationUtils/TIFoundationUtils.podspec +++ b/TIFoundationUtils/TIFoundationUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIFoundationUtils' - s.version = '1.35.0' + s.version = '1.35.1' s.summary = 'Set of helpers for Foundation framework classes.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } @@ -10,7 +10,14 @@ Pod::Spec.new do |s| s.ios.deployment_target = '10.0' s.swift_versions = ['5.3'] - s.source_files = s.name + '/**/Sources/**/*' + sources = '**/Sources/**/*' + if File.basename(Dir.getwd) == s.name # installing using :path => + s.source_files = sources + s.exclude_files = s.name + '.app' + else + s.source_files = s.name + '/' + sources + s.exclude_files = s.name + '/*.app' + end s.dependency 'TISwiftUtils', s.version.to_s s.framework = 'Foundation' diff --git a/TIGoogleMapUtils/TIGoogleMapUtils.podspec b/TIGoogleMapUtils/TIGoogleMapUtils.podspec index 1090ffa5..f19719fc 100644 --- a/TIGoogleMapUtils/TIGoogleMapUtils.podspec +++ b/TIGoogleMapUtils/TIGoogleMapUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIGoogleMapUtils' - s.version = '1.35.0' + s.version = '1.35.1' s.summary = 'Set of helpers for map objects clustering and interacting using Google Maps SDK.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIKeychainUtils/TIKeychainUtils.podspec b/TIKeychainUtils/TIKeychainUtils.podspec index 10aae0aa..fc391f7e 100644 --- a/TIKeychainUtils/TIKeychainUtils.podspec +++ b/TIKeychainUtils/TIKeychainUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIKeychainUtils' - s.version = '1.35.0' + s.version = '1.35.1' s.summary = 'Set of helpers for Keychain classes.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TILogging/TILogging.podspec b/TILogging/TILogging.podspec index 4a47812c..2d6ade90 100644 --- a/TILogging/TILogging.podspec +++ b/TILogging/TILogging.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TILogging' - s.version = '1.35.0' + s.version = '1.35.1' s.summary = 'Logging API' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIMapUtils/TIMapUtils.podspec b/TIMapUtils/TIMapUtils.podspec index c12f0152..cc1a494e 100644 --- a/TIMapUtils/TIMapUtils.podspec +++ b/TIMapUtils/TIMapUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIMapUtils' - s.version = '1.35.0' + s.version = '1.35.1' s.summary = 'Set of helpers for map objects clustering and interacting.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIMoyaNetworking/TIMoyaNetworking.podspec b/TIMoyaNetworking/TIMoyaNetworking.podspec index b5c1cb3e..52903c66 100644 --- a/TIMoyaNetworking/TIMoyaNetworking.podspec +++ b/TIMoyaNetworking/TIMoyaNetworking.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIMoyaNetworking' - s.version = '1.35.0' + s.version = '1.35.1' s.summary = 'Moya + Swagger network service.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TINetworking/TINetworking.podspec b/TINetworking/TINetworking.podspec index b38e764f..19417603 100644 --- a/TINetworking/TINetworking.podspec +++ b/TINetworking/TINetworking.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TINetworking' - s.version = '1.35.0' + s.version = '1.35.1' s.summary = 'Swagger-frendly networking layer helpers.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TINetworkingCache/TINetworkingCache.podspec b/TINetworkingCache/TINetworkingCache.podspec index 64082103..3073835f 100644 --- a/TINetworkingCache/TINetworkingCache.podspec +++ b/TINetworkingCache/TINetworkingCache.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TINetworkingCache' - s.version = '1.35.0' + s.version = '1.35.1' s.summary = 'Caching results of EndpointRequests.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIPagination/TIPagination.podspec b/TIPagination/TIPagination.podspec index 65a20dd2..7dcbb29e 100644 --- a/TIPagination/TIPagination.podspec +++ b/TIPagination/TIPagination.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIPagination' - s.version = '1.35.0' + s.version = '1.35.1' s.summary = 'Generic pagination component.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TISwiftUICore/TISwiftUICore.podspec b/TISwiftUICore/TISwiftUICore.podspec index 91a95b22..267918bc 100644 --- a/TISwiftUICore/TISwiftUICore.podspec +++ b/TISwiftUICore/TISwiftUICore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TISwiftUICore' - s.version = '1.35.0' + s.version = '1.35.1' s.summary = 'Core UI elements: protocols, views and helpers.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TISwiftUtils/TISwiftUtils.podspec b/TISwiftUtils/TISwiftUtils.podspec index be733f58..607019eb 100644 --- a/TISwiftUtils/TISwiftUtils.podspec +++ b/TISwiftUtils/TISwiftUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TISwiftUtils' - s.version = '1.35.0' + s.version = '1.35.1' s.summary = 'Bunch of useful helpers for Swift development.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } @@ -10,5 +10,12 @@ Pod::Spec.new do |s| s.ios.deployment_target = '9.0' s.swift_versions = ['5.3'] - s.source_files = s.name + '/Sources/**/*' + sources = 'Sources/**/*' + if File.basename(Dir.getwd) == s.name # installing using :path => + s.source_files = sources + s.exclude_files = s.name + '.app' + else + s.source_files = s.name + '/' + sources + s.exclude_files = s.name + '/*.app' + end end diff --git a/TITableKitUtils/TITableKitUtils.podspec b/TITableKitUtils/TITableKitUtils.podspec index 213b6fa7..60df6488 100644 --- a/TITableKitUtils/TITableKitUtils.podspec +++ b/TITableKitUtils/TITableKitUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TITableKitUtils' - s.version = '1.35.0' + s.version = '1.35.1' s.summary = 'Set of helpers for TableKit classes.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TITransitions/TITransitions.podspec b/TITransitions/TITransitions.podspec index 7a353d98..9923841f 100644 --- a/TITransitions/TITransitions.podspec +++ b/TITransitions/TITransitions.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TITransitions' - s.version = '1.35.0' + s.version = '1.34.1' s.summary = 'Set of custom transitions to present controller. ' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIUIElements/TIUIElements.podspec b/TIUIElements/TIUIElements.podspec index 079afb0b..336d94b3 100644 --- a/TIUIElements/TIUIElements.podspec +++ b/TIUIElements/TIUIElements.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIUIElements' - s.version = '1.35.0' + s.version = '1.35.1' s.summary = 'Bunch of useful protocols and views.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIUIKitCore/TIUIKitCore.podspec b/TIUIKitCore/TIUIKitCore.podspec index 884c8021..4e3768de 100644 --- a/TIUIKitCore/TIUIKitCore.podspec +++ b/TIUIKitCore/TIUIKitCore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIUIKitCore' - s.version = '1.35.0' + s.version = '1.35.1' s.summary = 'Core UI elements: protocols, views and helpers.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIWebView/TIWebView.podspec b/TIWebView/TIWebView.podspec index 4a0bf7a8..a63876cc 100644 --- a/TIWebView/TIWebView.podspec +++ b/TIWebView/TIWebView.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIWebView' - s.version = '1.35.0' + s.version = '1.35.1' s.summary = 'Universal web view API' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIYandexMapUtils/TIYandexMapUtils.podspec b/TIYandexMapUtils/TIYandexMapUtils.podspec index e34bd6e3..ec22d532 100644 --- a/TIYandexMapUtils/TIYandexMapUtils.podspec +++ b/TIYandexMapUtils/TIYandexMapUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIYandexMapUtils' - s.version = '1.35.0' + s.version = '1.35.1' s.summary = 'Set of helpers for map objects clustering and interacting using Yandex Maps SDK.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/docs/tifoundationutils/asyncoperation.md b/docs/tifoundationutils/asyncoperation.md new file mode 100644 index 00000000..5a2175e1 --- /dev/null +++ b/docs/tifoundationutils/asyncoperation.md @@ -0,0 +1,74 @@ + +# `AsyncOperation` - generic сабкласс Operation + +Позволяет запускать: + +- асинхронный код внутри операции +- собирать цепочки из операций +- подписываться на результат выполнения + +## Базовые операции + + "Из коробки", на данный момент, доступен всего один сабкласс асинхронной операции, потому что больше обычно и не нужно. + Но можно наследоваться и создавать собственные сабклассы при необходимости. + +### `ClosureAsyncOperation` + + Операция принимающая некий closure, который по окончании своей работы вызовет completion, переданный ему параметром + +```swift +import Foundation +import TIFoundationUtils + +let intResultOperation = ClosureAsyncOperation { completion in + DispatchQueue.global().asyncAfter(deadline: .now() + .seconds(3)) { + completion(.success(1)) + } + return Cancellables.nonCancellable() +} +``` + +## Базовые операторы + + На данный момент реализовано всего два оператора: + + - `map(mapOutput:mapFailure:)` - конвертирует ResultType в новый NewResultType и ErrorType в новый NewErrorType + - `observe(onSuccess:onFailure)` - просто вызывает переданные callback'и при получении результата или ошибки + + +### Пример запуска асинхронных операци с применением операторов в последовательной очереди и вывод результатов + +```swift +let operationQueue = OperationQueue() +operationQueue.maxConcurrentOperationCount = 1 + +ClosureAsyncOperation { completion in + DispatchQueue.global().asyncAfter(deadline: .now() + .seconds(3)) { + completion(.success(1)) + } + return Cancellables.nonCancellable() +} +.map { $0 * 2 } +.observe(onSuccess: { result in + debugPrint("Async operation one has finished with \(result)") +}) +.add(to: operationQueue) + +ClosureAsyncOperation { completion in + DispatchQueue.global().asyncAfter(deadline: .now() + .seconds(1)) { + completion(.success("Success")) + } + return Cancellables.nonCancellable() +} +.observe(onSuccess: { result in + debugPrint("Async operation two has finished with \(result)") +}) +.add(to: operationQueue) +``` + + В консоли будет выведено: + + ``` + "Async operation one has finished with 2" + "Async operation two has finished with Success" + ``` diff --git a/project-scripts/bump_version.sh b/project-scripts/bump_version.sh index 71b79d5e..52b73451 100755 --- a/project-scripts/bump_version.sh +++ b/project-scripts/bump_version.sh @@ -1,15 +1,18 @@ #!/bin/sh -# Find source dir -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +# Description: +# Updates version in podspecs +# +# Parameters: +# $1 - new version +# +# Required environment variables: +# SRCROOT - path to project folder. +# +# Examples of usage: +# . bump_version.sh 1.34.1 +# -cd "$DIR" - -# Bump version -find ../ -name '*.podspec' \ - -not -path "../Carthage/*" \ - -not -path "../*/Carthage/*" \ - -not -path "../Pods/*" \ - -not -path "../*/Pods/*" \ - -not -path "../*/.gem/*" \ - | xargs -I% npx podspec-bump -i "$1" -w -p % +for module_name in $(cat ${SRCROOT}/project-scripts/ordered_modules_list.txt); do + npx podspec-bump -i $1 -w -p ${SRCROOT}/${module_name}/${module_name}.podspec +done diff --git a/project-scripts/gen_docs_from_playgrounds.sh b/project-scripts/gen_docs_from_playgrounds.sh new file mode 100755 index 00000000..9e5c172a --- /dev/null +++ b/project-scripts/gen_docs_from_playgrounds.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Description: +# Generates markdown documentation from nef playgrounds. +# +# Required environment variables: +# SRCROOT - path to project folder. +# + +PLAYGROUNDS="${SRCROOT}/TIFoundationUtils/TIFoundationUtils.app" + +for playground_path in ${PLAYGROUNDS}; do + nef compile --project ${playground_path} + nef markdown --project ${playground_path} --output ../docs +done \ No newline at end of file diff --git a/project-scripts/ordered_modules_list.txt b/project-scripts/ordered_modules_list.txt new file mode 100644 index 00000000..46127ea8 --- /dev/null +++ b/project-scripts/ordered_modules_list.txt @@ -0,0 +1,20 @@ +TISwiftUtils +TIPagination +TIFoundationUtils +TIKeychainUtils +TIUIKitCore +TISwiftUICore +TIUIElements +TILogging +TIAuth +TITableKitUtils +TINetworking +TINetworkingCache +TIMoyaNetworking +TIMapUtils +TIAppleMapUtils +TIGoogleMapUtils +TIYandexMapUtils +TIEcommerce +TIWebView +TIDeveloperUtils \ No newline at end of file diff --git a/project-scripts/prepare_release.sh b/project-scripts/prepare_release.sh new file mode 100755 index 00000000..442154d1 --- /dev/null +++ b/project-scripts/prepare_release.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +# Description: +# Prepares new changes to release. +# +# Parameters: +# $1 - new version +# +# Required environment variables: +# SRCROOT - path to project folder. +# +# Examples of usage: +# . prepare_release.sh 1.34.1 +# + +. ${SRCROOT}/project-scripts/gen_docs_from_playgrounds.sh + +. ${SRCROOT}/project-scripts/bump_version.sh $1 \ No newline at end of file diff --git a/project-scripts/push_to_podspecs.sh b/project-scripts/push_to_podspecs.sh index 615fcc2d..edfa19bd 100755 --- a/project-scripts/push_to_podspecs.sh +++ b/project-scripts/push_to_podspecs.sh @@ -5,27 +5,6 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd "$DIR" -ORDERED_PODSPECS="../TISwiftUtils/TISwiftUtils.podspec -../TIPagination/TIPagination.podspec -../TIFoundationUtils/TIFoundationUtils.podspec -../TIKeychainUtils/TIKeychainUtils.podspec -../TIUIKitCore/TIUIKitCore.podspec -../TISwiftUICore/TISwiftUICore.podspec -../TIUIElements/TIUIElements.podspec -../TILogging/TILogging.podspec -../TIAuth/TIAuth.podspec -../TITableKitUtils/TITableKitUtils.podspec -../TINetworking/TINetworking.podspec -../TINetworkingCache/TINetworkingCache.podspec -../TIMoyaNetworking/TIMoyaNetworking.podspec -../TIMapUtils/TIMapUtils.podspec -../TIAppleMapUtils/TIAppleMapUtils.podspec -../TIGoogleMapUtils/TIGoogleMapUtils.podspec -../TIYandexMapUtils/TIYandexMapUtils.podspec -../TIEcommerce/TIEcommerce.podspec -../TIWebView/TIWebView.podspec -../TIDeveloperUtils/TIDeveloperUtils.podspec" - -for podspec_path in ${ORDERED_PODSPECS}; do - bundle exec pod repo push git@github.com:TouchInstinct/Podspecs ${podspec_path} --allow-warnings +for module_name in $(cat ordered_modules_list.txt); do + bundle exec pod repo push git@github.com:TouchInstinct/Podspecs ${module_name}/${module_name}.podspec --allow-warnings done