├── .DS_Store
├── Images
└── XcodeTemplates.png
├── Makefile
├── README.md
└── Templates
├── .DS_Store
├── Action.xctemplate
├── TemplateIcon.png
├── TemplateIcon@2x.png
├── TemplateIcon@3x.png
├── TemplateInfo.plist
└── ___FILEBASENAME___Action.swift
├── Environment.xctemplate
├── TemplateIcon.png
├── TemplateIcon@2x.png
├── TemplateIcon@3x.png
├── TemplateInfo.plist
└── ___FILEBASENAME___Environment.swift
├── Feature.xctemplate
├── TemplateIcon.png
├── TemplateIcon@2x.png
├── TemplateIcon@3x.png
├── TemplateInfo.plist
├── ___FILEBASENAME___Action.swift
├── ___FILEBASENAME___Environment.swift
├── ___FILEBASENAME___Reducer.swift
├── ___FILEBASENAME___State.swift
└── ___FILEBASENAME___View.swift
├── Reducer.xctemplate
├── TemplateIcon.png
├── TemplateIcon@2x.png
├── TemplateIcon@3x.png
├── TemplateInfo.plist
└── ___FILEBASENAME___Reducer.swift
├── State.xctemplate
├── TemplateIcon.png
├── TemplateIcon@2x.png
├── TemplateIcon@3x.png
├── TemplateInfo.plist
└── ___FILEBASENAME___State.swift
└── View.xctemplate
├── TemplateIcon.png
├── TemplateIcon@2x.png
├── TemplateIcon@3x.png
├── TemplateInfo.plist
└── ___FILEBASENAME___View.swift
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amerexia/ComposableArchitectureXcodeTemplate/fde82d01c219ca0184c9ed7af22dd8edbecb1b44/.DS_Store
--------------------------------------------------------------------------------
/Images/XcodeTemplates.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amerexia/ComposableArchitectureXcodeTemplate/fde82d01c219ca0184c9ed7af22dd8edbecb1b44/Images/XcodeTemplates.png
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | XCODE_USER_TEMPLATES_DIR=~/Library/Developer/Xcode/Templates/File\ Templates
2 | COMPOSABLE_ARCHITECTURE_TEMPLATES_DIR=Templates
3 |
4 | install_templates:
5 | rm -R -f $(XCODE_USER_TEMPLATES_DIR)/$(COMPOSABLE_ARCHITECTURE_TEMPLATES_DIR)
6 | mkdir -p $(XCODE_USER_TEMPLATES_DIR)
7 | cp -R -f $(COMPOSABLE_ARCHITECTURE_TEMPLATES_DIR) $(XCODE_USER_TEMPLATES_DIR)
8 |
9 | uninstall_templates:
10 | rm -R $(XCODE_USER_TEMPLATES_DIR)/$(COMPOSABLE_ARCHITECTURE_TEMPLATES_DIR)
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # The Composable Architecture
2 |
3 | The Composable Architecture (TCA, for short) is a library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind. [Learn more](https://github.com/pointfreeco/swift-composable-architecture).
4 |
5 | # Installation instructions
6 |
7 | To install Composable architecture Xcode templates clone this repo and run the following command from root folder:
8 |
9 | > make install_templates
10 |
11 | To uninstall Xcode template run:
12 |
13 | > make uninstall_templates
14 |
15 | After that, restart your Xcode if it was already opened.
16 |
17 | # Screenshots
18 |
19 | 
20 |
21 | # Contact
22 |
23 | Dounia Belannab
24 |
25 | dbelannab@gmail.com
26 |
--------------------------------------------------------------------------------
/Templates/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amerexia/ComposableArchitectureXcodeTemplate/fde82d01c219ca0184c9ed7af22dd8edbecb1b44/Templates/.DS_Store
--------------------------------------------------------------------------------
/Templates/Action.xctemplate/TemplateIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amerexia/ComposableArchitectureXcodeTemplate/fde82d01c219ca0184c9ed7af22dd8edbecb1b44/Templates/Action.xctemplate/TemplateIcon.png
--------------------------------------------------------------------------------
/Templates/Action.xctemplate/TemplateIcon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amerexia/ComposableArchitectureXcodeTemplate/fde82d01c219ca0184c9ed7af22dd8edbecb1b44/Templates/Action.xctemplate/TemplateIcon@2x.png
--------------------------------------------------------------------------------
/Templates/Action.xctemplate/TemplateIcon@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amerexia/ComposableArchitectureXcodeTemplate/fde82d01c219ca0184c9ed7af22dd8edbecb1b44/Templates/Action.xctemplate/TemplateIcon@3x.png
--------------------------------------------------------------------------------
/Templates/Action.xctemplate/TemplateInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DefaultCompletionName
6 | MyScene
7 | Description
8 | This generates a new Action using point free composable architecture.
9 | Kind
10 | Xcode.IDEKit.TextSubstitutionFileTemplateKind
11 | Options
12 |
13 |
14 | Description
15 | The name of the feature to create
16 | Identifier
17 | featureName
18 | Name
19 | New Feature Name:
20 | NotPersisted
21 |
22 | Required
23 |
24 | Type
25 | text
26 |
27 |
28 | Default
29 | ___VARIABLE_featureName:identifier___
30 | Identifier
31 | productName
32 | Type
33 | static
34 |
35 |
36 | Default
37 | ___VARIABLE_featureName:identifier___Action
38 | Description
39 | The Action name
40 | Identifier
41 | actionName
42 | Name
43 | Action Name:
44 | Required
45 |
46 | Type
47 | static
48 |
49 |
50 | Platforms
51 |
52 | com.apple.platform.iphoneos
53 |
54 | SortOrder
55 | 3
56 | Summary
57 | This generates a new Action using point free composable architecture.
58 |
59 |
--------------------------------------------------------------------------------
/Templates/Action.xctemplate/___FILEBASENAME___Action.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | enum ___VARIABLE_featureName___Action: Equatable {
4 | case onAppear
5 | case onDisappear
6 | }
--------------------------------------------------------------------------------
/Templates/Environment.xctemplate/TemplateIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amerexia/ComposableArchitectureXcodeTemplate/fde82d01c219ca0184c9ed7af22dd8edbecb1b44/Templates/Environment.xctemplate/TemplateIcon.png
--------------------------------------------------------------------------------
/Templates/Environment.xctemplate/TemplateIcon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amerexia/ComposableArchitectureXcodeTemplate/fde82d01c219ca0184c9ed7af22dd8edbecb1b44/Templates/Environment.xctemplate/TemplateIcon@2x.png
--------------------------------------------------------------------------------
/Templates/Environment.xctemplate/TemplateIcon@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amerexia/ComposableArchitectureXcodeTemplate/fde82d01c219ca0184c9ed7af22dd8edbecb1b44/Templates/Environment.xctemplate/TemplateIcon@3x.png
--------------------------------------------------------------------------------
/Templates/Environment.xctemplate/TemplateInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DefaultCompletionName
6 | MyScene
7 | Description
8 | This generates a new environment using point free composable architecture.
9 | Kind
10 | Xcode.IDEKit.TextSubstitutionFileTemplateKind
11 | Options
12 |
13 |
14 | Description
15 | The name of the feature to create
16 | Identifier
17 | featureName
18 | Name
19 | New Feature Name:
20 | NotPersisted
21 |
22 | Required
23 |
24 | Type
25 | text
26 |
27 |
28 | Default
29 | ___VARIABLE_featureName:identifier___
30 | Identifier
31 | productName
32 | Type
33 | static
34 |
35 |
36 | Default
37 | ___VARIABLE_featureName:identifier___Environment
38 | Description
39 | The Environment name
40 | Identifier
41 | environmentName
42 | Name
43 | Environment Name:
44 | Required
45 |
46 | Type
47 | static
48 |
49 |
50 | Platforms
51 |
52 | com.apple.platform.iphoneos
53 |
54 | SortOrder
55 | 3
56 | Summary
57 | This generates a new Environment using point free composable architecture.
58 |
59 |
--------------------------------------------------------------------------------
/Templates/Environment.xctemplate/___FILEBASENAME___Environment.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | struct ___VARIABLE_featureName___Environment {
4 | // Add your services here
5 | }
6 |
7 | #if DEBUG
8 | extension ___VARIABLE_featureName___Environment {
9 | // Add your
10 | static func failing() -> Self {
11 | .init()
12 | }
13 | }
14 | #endif
15 |
--------------------------------------------------------------------------------
/Templates/Feature.xctemplate/TemplateIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amerexia/ComposableArchitectureXcodeTemplate/fde82d01c219ca0184c9ed7af22dd8edbecb1b44/Templates/Feature.xctemplate/TemplateIcon.png
--------------------------------------------------------------------------------
/Templates/Feature.xctemplate/TemplateIcon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amerexia/ComposableArchitectureXcodeTemplate/fde82d01c219ca0184c9ed7af22dd8edbecb1b44/Templates/Feature.xctemplate/TemplateIcon@2x.png
--------------------------------------------------------------------------------
/Templates/Feature.xctemplate/TemplateIcon@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amerexia/ComposableArchitectureXcodeTemplate/fde82d01c219ca0184c9ed7af22dd8edbecb1b44/Templates/Feature.xctemplate/TemplateIcon@3x.png
--------------------------------------------------------------------------------
/Templates/Feature.xctemplate/TemplateInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DefaultCompletionName
6 | Feature
7 | Description
8 | This generates a new feature based on Composable architecture. It consists of the View, Reducer, Action, and Evironment. You can then create individual elements to supplement the feature.
9 | Kind
10 | Xcode.IDEKit.TextSubstitutionFileTemplateKind
11 | Options
12 |
13 |
14 | Description
15 | The name of the feature to create
16 | Identifier
17 | featureName
18 | Name
19 | New feature Name:
20 | NotPersisted
21 |
22 | Required
23 |
24 | Type
25 | text
26 |
27 |
28 | Default
29 | ___VARIABLE_featureName:identifier___View
30 | Description
31 | The view name
32 | Identifier
33 | viewName
34 | Name
35 | View Name:
36 | Required
37 |
38 | Type
39 | static
40 |
41 |
42 | Default
43 | ___VARIABLE_featureName:identifier___State
44 | Description
45 | The State name
46 | Identifier
47 | stateName
48 | Name
49 | State Name:
50 | Required
51 |
52 | Type
53 | static
54 |
55 |
56 | Default
57 | ___VARIABLE_featureName:identifier___Action
58 | Description
59 | The Action name
60 | Identifier
61 | actionName
62 | Name
63 | Action Name:
64 | Required
65 |
66 | Type
67 | static
68 |
69 |
70 | Default
71 | ___VARIABLE_featureName:identifier___Reducer
72 | Description
73 | The Reducer name
74 | Identifier
75 | reducerName
76 | Name
77 | Reducer Name:
78 | Required
79 |
80 | Type
81 | static
82 |
83 |
84 | Default
85 | ___VARIABLE_featureName:identifier___Environment
86 | Description
87 | The Environment name
88 | Identifier
89 | environmentName
90 | Name
91 | Environment Name:
92 | Required
93 |
94 | Type
95 | static
96 |
97 |
98 | Platforms
99 |
100 | com.apple.platform.iphoneos
101 |
102 | SortOrder
103 | 0
104 | Summary
105 | This generates a new scene using Point free's composable architecture.
106 |
107 |
108 |
--------------------------------------------------------------------------------
/Templates/Feature.xctemplate/___FILEBASENAME___Action.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | enum ___VARIABLE_featureName___Action: Equatable {
4 | case onAppear
5 | case onDisappear
6 | }
--------------------------------------------------------------------------------
/Templates/Feature.xctemplate/___FILEBASENAME___Environment.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | struct ___VARIABLE_featureName___Environment {
4 | // Add your services here
5 | }
6 |
7 | #if DEBUG
8 | extension ___VARIABLE_featureName___Environment {
9 | // Add your
10 | static func failing() -> Self {
11 | .init()
12 | }
13 | }
14 | #endif
15 |
--------------------------------------------------------------------------------
/Templates/Feature.xctemplate/___FILEBASENAME___Reducer.swift:
--------------------------------------------------------------------------------
1 | import ComposableArchitecture
2 |
3 | typealias ___VARIABLE_featureName___Reducer = Reducer<___VARIABLE_featureName___State, ___VARIABLE_featureName___Action, ___VARIABLE_featureName___Environment>
4 |
5 | let reducer___VARIABLE_featureName___ = ___VARIABLE_featureName___Reducer { state, action, environment in
6 | switch action {
7 | case .onAppear:
8 | return .none
9 | case .onDisappear:
10 | return .none
11 | default:
12 | break
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Templates/Feature.xctemplate/___FILEBASENAME___State.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | struct ___VARIABLE_featureName___State: Equatable {
4 |
5 | }
6 | #if DEBUG
7 | extension ___VARIABLE_featureName___State {
8 | static func fixture() -> Self {
9 | .init()
10 | }
11 | }
12 | #endif
--------------------------------------------------------------------------------
/Templates/Feature.xctemplate/___FILEBASENAME___View.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 | import ComposableArchitecture
3 |
4 | typealias ___VARIABLE_featureName___Store = Store<___VARIABLE_featureName___State, ___VARIABLE_featureName___Action>
5 |
6 | struct ___VARIABLE_featureName___View: View {
7 |
8 | // MARK: - Private variable
9 |
10 | private let store: ___VARIABLE_featureName___Store
11 |
12 | // MARK: - Object Lifecycle
13 |
14 | init(store: ___VARIABLE_featureName___Store) {
15 | self.store = store
16 | }
17 |
18 | // MARK: - UI
19 |
20 | var body: some View {
21 | EmptyView()
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/Templates/Reducer.xctemplate/TemplateIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amerexia/ComposableArchitectureXcodeTemplate/fde82d01c219ca0184c9ed7af22dd8edbecb1b44/Templates/Reducer.xctemplate/TemplateIcon.png
--------------------------------------------------------------------------------
/Templates/Reducer.xctemplate/TemplateIcon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amerexia/ComposableArchitectureXcodeTemplate/fde82d01c219ca0184c9ed7af22dd8edbecb1b44/Templates/Reducer.xctemplate/TemplateIcon@2x.png
--------------------------------------------------------------------------------
/Templates/Reducer.xctemplate/TemplateIcon@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amerexia/ComposableArchitectureXcodeTemplate/fde82d01c219ca0184c9ed7af22dd8edbecb1b44/Templates/Reducer.xctemplate/TemplateIcon@3x.png
--------------------------------------------------------------------------------
/Templates/Reducer.xctemplate/TemplateInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DefaultCompletionName
6 | MyScene
7 | Description
8 | This generates a new Reducer using point free composable architecture.
9 | Kind
10 | Xcode.IDEKit.TextSubstitutionFileTemplateKind
11 | Options
12 |
13 |
14 | Description
15 | The name of the feature to create
16 | Identifier
17 | featureName
18 | Name
19 | New Feature Name:
20 | NotPersisted
21 |
22 | Required
23 |
24 | Type
25 | text
26 |
27 |
28 | Default
29 | ___VARIABLE_featureName:identifier___
30 | Identifier
31 | productName
32 | Type
33 | static
34 |
35 |
36 | Default
37 | ___VARIABLE_featureName:identifier___Reducer
38 | Description
39 | The Reducer name
40 | Identifier
41 | reducerName
42 | Name
43 | Reducer Name:
44 | Required
45 |
46 | Type
47 | static
48 |
49 |
50 | Platforms
51 |
52 | com.apple.platform.iphoneos
53 |
54 | SortOrder
55 | 3
56 | Summary
57 | This generates a new Reducer using point free composable architecture.
58 |
59 |
--------------------------------------------------------------------------------
/Templates/Reducer.xctemplate/___FILEBASENAME___Reducer.swift:
--------------------------------------------------------------------------------
1 | import ComposableArchitecture
2 |
3 | typealias ___VARIABLE_featureName___Reducer = Reducer<___VARIABLE_featureName___State, ___VARIABLE_featureName___Action, ___VARIABLE_featureName___Environment>
4 |
5 | let reducer___VARIABLE_featureName___ = ___VARIABLE_featureName___Reducer { state, action, environment in
6 | switch action {
7 | case .onAppear:
8 | return .none
9 | case .onDisappear:
10 | return .none
11 | default:
12 | break
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Templates/State.xctemplate/TemplateIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amerexia/ComposableArchitectureXcodeTemplate/fde82d01c219ca0184c9ed7af22dd8edbecb1b44/Templates/State.xctemplate/TemplateIcon.png
--------------------------------------------------------------------------------
/Templates/State.xctemplate/TemplateIcon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amerexia/ComposableArchitectureXcodeTemplate/fde82d01c219ca0184c9ed7af22dd8edbecb1b44/Templates/State.xctemplate/TemplateIcon@2x.png
--------------------------------------------------------------------------------
/Templates/State.xctemplate/TemplateIcon@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amerexia/ComposableArchitectureXcodeTemplate/fde82d01c219ca0184c9ed7af22dd8edbecb1b44/Templates/State.xctemplate/TemplateIcon@3x.png
--------------------------------------------------------------------------------
/Templates/State.xctemplate/TemplateInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DefaultCompletionName
6 | MyScene
7 | Description
8 | This generates a new State using point free composable architecture.
9 | Kind
10 | Xcode.IDEKit.TextSubstitutionFileTemplateKind
11 | Options
12 |
13 |
14 | Description
15 | The name of the feature to create
16 | Identifier
17 | featureName
18 | Name
19 | New Feature Name:
20 | NotPersisted
21 |
22 | Required
23 |
24 | Type
25 | text
26 |
27 |
28 | Default
29 | ___VARIABLE_featureName:identifier___
30 | Identifier
31 | productName
32 | Type
33 | static
34 |
35 |
36 | Default
37 | ___VARIABLE_featureName:identifier___State
38 | Description
39 | The State name
40 | Identifier
41 | stateName
42 | Name
43 | State Name:
44 | Required
45 |
46 | Type
47 | static
48 |
49 |
50 | Platforms
51 |
52 | com.apple.platform.iphoneos
53 |
54 | SortOrder
55 | 3
56 | Summary
57 | This generates a new State using point free composable architecture.
58 |
59 |
--------------------------------------------------------------------------------
/Templates/State.xctemplate/___FILEBASENAME___State.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | struct ___VARIABLE_featureName___State: Equatable {
4 |
5 | }
6 | #if DEBUG
7 | extension ___VARIABLE_featureName___State {
8 | static func fixture() -> Self {
9 | .init()
10 | }
11 | }
12 | #endif
--------------------------------------------------------------------------------
/Templates/View.xctemplate/TemplateIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amerexia/ComposableArchitectureXcodeTemplate/fde82d01c219ca0184c9ed7af22dd8edbecb1b44/Templates/View.xctemplate/TemplateIcon.png
--------------------------------------------------------------------------------
/Templates/View.xctemplate/TemplateIcon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amerexia/ComposableArchitectureXcodeTemplate/fde82d01c219ca0184c9ed7af22dd8edbecb1b44/Templates/View.xctemplate/TemplateIcon@2x.png
--------------------------------------------------------------------------------
/Templates/View.xctemplate/TemplateIcon@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amerexia/ComposableArchitectureXcodeTemplate/fde82d01c219ca0184c9ed7af22dd8edbecb1b44/Templates/View.xctemplate/TemplateIcon@3x.png
--------------------------------------------------------------------------------
/Templates/View.xctemplate/TemplateInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DefaultCompletionName
6 | MyScene
7 | Description
8 | This generates a new View using point free composable architecture.
9 | Kind
10 | Xcode.IDEKit.TextSubstitutionFileTemplateKind
11 | Options
12 |
13 |
14 | Description
15 | The name of the feature to create
16 | Identifier
17 | featureName
18 | Name
19 | New Feature Name:
20 | NotPersisted
21 |
22 | Required
23 |
24 | Type
25 | text
26 |
27 |
28 | Default
29 | ___VARIABLE_featureName:identifier___
30 | Identifier
31 | productName
32 | Type
33 | static
34 |
35 |
36 | Default
37 | ___VARIABLE_featureName:identifier___View
38 | Description
39 | The View name
40 | Identifier
41 | viewName
42 | Name
43 | View Name:
44 | Required
45 |
46 | Type
47 | static
48 |
49 |
50 | Platforms
51 |
52 | com.apple.platform.iphoneos
53 |
54 | SortOrder
55 | 3
56 | Summary
57 | This generates a new View using point free composable architecture.
58 |
59 |
--------------------------------------------------------------------------------
/Templates/View.xctemplate/___FILEBASENAME___View.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 | import ComposableArchitecture
3 |
4 | typealias ___VARIABLE_featureName___Store = Store<___VARIABLE_featureName___State, ___VARIABLE_featureName___Action>
5 |
6 | struct ___VARIABLE_featureName___View: View {
7 |
8 | // MARK: - Private variable
9 |
10 | private let store: ___VARIABLE_featureName___Store
11 |
12 | // MARK: - Object Lifecycle
13 |
14 | init(store: ___VARIABLE_featureName___Store) {
15 | self.store = store
16 | }
17 |
18 | // MARK: - UI
19 |
20 | var body: some View {
21 | EmptyView()
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------