Skip to content

Commit

Permalink
Merge pull request #8 from trafi/spm
Browse files Browse the repository at this point in the history
Spm 📦
  • Loading branch information
ignasvalotka authored Apr 24, 2020
2 parents 6830331 + 331a301 commit d32d442
Show file tree
Hide file tree
Showing 23 changed files with 59 additions and 5 deletions.
26 changes: 26 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// swift-tools-version:5.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription

let package = Package(
name: "StoryFlow",
platforms: [
.iOS(.v10),
], products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "StoryFlow",
targets: ["StoryFlow"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "StoryFlow",
dependencies: []),
]
)
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# StoryFlow

[![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/trafi/StoryFlow/blob/master/LICENSE)
[![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)

Functional view controllers automatic flow coordination ✨<br>
Expand Down Expand Up @@ -351,7 +352,13 @@ extension OutputTransform {

# Installation

[Using Carthage](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application) - just add the following line to your `Cartfile`:
### [Swift Package Manager](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app)
Open your project in Xcode and select File > Swift Packages > Add Package Dependency. There enter `https://github.com/trafi/StoryFlow/` as the repository URL.


### [Carthage](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application)

Add the following line to your `Cartfile`:
```
github "Trafi/StoryFlow"
```
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import UIKit

func oneOf(_ types: Any.Type, contains type: Any.Type) -> Bool {
guard let oneOfType = types as? OneOfNType.Type else { return types == type }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import UIKit

typealias ValueAndType = (value: Any, type: Any.Type)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
import UIKit

public typealias IO = InputRequiring & OutputProducing
public typealias IOU = InputRequiring & OutputProducing & UpdateHandling
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import UIKit

extension NSObject {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import UIKit

#if TESTING
func fatalError(_ message: @autoclosure () -> String = "", file: StaticString = #file, line: UInt = #line) -> Never {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import UIKit

extension Thread {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import UIKit

public indirect enum OneOf2<T1, T2> {
case t1(T1), t2(T2)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import UIKit

public protocol UpdateHandling: _AnyUpdateHandling {
associatedtype UpdateType
Expand Down
File renamed without changes.
20 changes: 16 additions & 4 deletions StoryFlow.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
D3E0951320AC6AAD007E5715 /* Combinations.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3E0951220AC6AAD007E5715 /* Combinations.swift */; };
D3E0951620AC6B68007E5715 /* BaseIntrefaces.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3E0951520AC6B68007E5715 /* BaseIntrefaces.swift */; };
D3E0951820ACCC8E007E5715 /* ExplicitFlow.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3E0951720ACCC8E007E5715 /* ExplicitFlow.swift */; };
DD75FCA62452DB0B0008F5DE /* Package.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD75FCA52452DB0B0008F5DE /* Package.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -77,6 +78,7 @@
D3E0951220AC6AAD007E5715 /* Combinations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Combinations.swift; sourceTree = "<group>"; };
D3E0951520AC6B68007E5715 /* BaseIntrefaces.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseIntrefaces.swift; sourceTree = "<group>"; };
D3E0951720ACCC8E007E5715 /* ExplicitFlow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExplicitFlow.swift; sourceTree = "<group>"; };
DD75FCA52452DB0B0008F5DE /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -178,7 +180,8 @@
D3E094E020AC3284007E5715 = {
isa = PBXGroup;
children = (
D3E094EC20AC3284007E5715 /* StoryFlow */,
DD75FCA52452DB0B0008F5DE /* Package.swift */,
DD75FCA42452DAF80008F5DE /* Sources */,
D381D0E720D4805200B6C416 /* StoryFlowTests */,
D3E094EB20AC3284007E5715 /* Products */,
D3DE87A320D46A8D0078645E /* Frameworks */,
Expand Down Expand Up @@ -246,6 +249,14 @@
path = Helpers;
sourceTree = "<group>";
};
DD75FCA42452DAF80008F5DE /* Sources */ = {
isa = PBXGroup;
children = (
D3E094EC20AC3284007E5715 /* StoryFlow */,
);
path = Sources;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
Expand Down Expand Up @@ -411,6 +422,7 @@
D3E0951820ACCC8E007E5715 /* ExplicitFlow.swift in Sources */,
D374ECDC20B4BD3E00481F05 /* OneOf.swift in Sources */,
D39DC65221BA8D7000E43FA9 /* ImplicitFlow+CustomTransition.swift in Sources */,
DD75FCA62452DB0B0008F5DE /* Package.swift in Sources */,
D3C4779B20AE12E2004B8460 /* Testing.swift in Sources */,
D3E0951320AC6AAD007E5715 /* Combinations.swift in Sources */,
D374ECDF20B4C0CE00481F05 /* ExplicitFlow+OneOf.swift in Sources */,
Expand Down Expand Up @@ -644,7 +656,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = StoryFlow/Info.plist;
INFOPLIST_FILE = Sources/StoryFlow/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -668,7 +680,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = StoryFlow/Info.plist;
INFOPLIST_FILE = Sources/StoryFlow/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -756,7 +768,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = StoryFlow/Info.plist;
INFOPLIST_FILE = Sources/StoryFlow/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down

0 comments on commit d32d442

Please sign in to comment.