You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Customization/Configuration.md
+23-22Lines changed: 23 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,12 @@
1
1
# Nodes Configuration
2
2
3
-
While Nodes works out-of-the-box with [UIKit](https://developer.apple.com/documentation/uikit) and [SwiftUI](https://developer.apple.com/xcode/swiftui) (for iOS), the following custom configuration is required to use other UI frameworks, such as [AppKit](https://developer.apple.com/documentation/appkit).
3
+
Nodes is easily customized using a YAML configuration file. The [sample](#sample-config-file) below demonstrates the available options.
4
+
5
+
While Nodes is configured by default for iOS with [UIKit](https://developer.apple.com/documentation/uikit) and [SwiftUI](https://developer.apple.com/xcode/swiftui), UI frameworks for [AppKit](https://developer.apple.com/documentation/appkit) or other platforms may be enabled.
4
6
5
7
## Configure the Xcode Templates Generator
6
8
7
-
Specify a path to a custom config file by providing the `--config` option when executing `nodes-xcode-templates-gen`.
9
+
Specify a path to a custom config file by providing the `--config` option when executing the `nodes-xcode-templates-gen` command.
8
10
9
11
<details>
10
12
@@ -18,7 +20,7 @@ If utilizing the [quick start project setup](https://github.com/Tinder/Nodes#qui
18
20
swift run --skip-build -- nodes-xcode-templates-gen --id "Custom" --config "nodes.yml"
19
21
```
20
22
21
-
> TIP: The provided `id` value is used to uniquely identify different sets of templates within the new file dialog in Xcode.
23
+
> The provided `id` value is used to uniquely identify different sets of templates within the new file dialog in Xcode.
22
24
23
25
The script that creates the presets in the quick start project should use the same config file:
24
26
@@ -28,16 +30,17 @@ swift run --skip-build -- nodes-code-gen --preset "$PRESET" --author "$AUTHOR" -
28
30
29
31
</details>
30
32
31
-
###Sample Config File
33
+
## Sample Config File
32
34
33
-
All values shown in the samples below are the defaults.
35
+
All values shown in the sample are the defaults.
34
36
35
-
> TIP: It is only necessary to include config options that are different from the defaults.
37
+
> [!TIP]
38
+
> It is only necessary to include config options that are different from the defaults.
To control which UI Frameworks are made available within the new file dialog in Xcode, include AppKit, UIKit, or SwiftUI as shown below; or a fully custom UI framework may be configured for unique use cases. More than one UI framework can be included in the configuration. And by default, without providing any UI framework configuration, UIKit and SwiftUI (for iOS) are automatically configured.
89
+
## UI Frameworks
87
90
88
-
> TIP: For use in an iOS app that allows both UIKit and SwiftUI, both may be enabled simultaneously if desired.
91
+
The UI framework presets available to enable in the config file are `AppKit`, `AppKit (SwiftUI)`, `UIKit` and `UIKit (SwiftUI)`. A fully custom UI framework may be configured for unique use cases.
89
92
90
-
#### AppKit
93
+
More than one UI framework may be included in the configuration. Without specifying any UI frameworks, `UIKit` and `UIKit (SwiftUI)` are enabled by default.
91
94
92
95
```yaml
93
96
- framework: AppKit
94
97
```
95
98
96
-
#### UIKit
99
+
```yaml
100
+
- framework: AppKit (SwiftUI)
101
+
```
97
102
98
103
```yaml
99
104
- framework: UIKit
100
105
```
101
106
102
-
#### SwiftUI
103
-
104
-
> IMPORTANT: SwiftUI is only supported in iOS apps currently (SwiftUI support for macOS apps may be added in the future).
105
-
106
107
```yaml
107
-
- framework: SwiftUI
108
+
- framework: UIKit (SwiftUI)
108
109
```
109
110
110
-
#### Custom
111
-
112
-
> IMPORTANT: A non-empty string must be provided for `name`, `import` and `viewControllerType`.
113
-
114
-
> TIP: The `viewControllerSuperParameters` and `viewControllerMethods` keys may be omitted.
115
-
116
111
```yaml
117
112
- framework:
118
113
custom:
@@ -122,3 +117,9 @@ To control which UI Frameworks are made available within the new file dialog in
122
117
viewControllerSuperParameters: ""
123
118
viewControllerMethods: ""
124
119
```
120
+
121
+
> [!IMPORTANT]
122
+
> A non-empty string must be provided for `name`, `import` and `viewControllerType`.
123
+
124
+
> [!TIP]
125
+
> The `viewControllerSuperParameters` and `viewControllerMethods` keys may be omitted.
Copy file name to clipboardExpand all lines: Customization/Perception.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,10 @@
1
-
A store compatible with [Perception](https://github.com/pointfreeco/swift-perception).
1
+
# Using Perception with Nodes
2
+
3
+
While Nodes is compatible with the [Observation](https://developer.apple.com/documentation/observation) framework for newer operating system versions or can be [configured](Configuration.md) to use [`ObservableObject`](https://developer.apple.com/documentation/Combine/ObservableObject) for backward compatibility, other observation libraries such [Perception](https://github.com/pointfreeco/swift-perception) require custom setup.
4
+
5
+
## Add Supporting Types
6
+
7
+
Add the following types to the application:
2
8
3
9
```swift
4
10
//
@@ -149,7 +155,9 @@ private class PerceptibleViewStateStoreBase<
Copy file name to clipboardExpand all lines: Customization/RxSwift.md
+27-7Lines changed: 27 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
# Using RxSwift with Nodes
2
2
3
-
While Nodes works out-of-the-box with [Combine](https://developer.apple.com/documentation/combine), the following custom configuration and setup is required to use other reactive frameworks, such [RxSwift](https://github.com/ReactiveX/RxSwift).
3
+
While Nodes is configured by default for [Combine](https://developer.apple.com/documentation/combine), other reactive frameworks such [RxSwift](https://github.com/ReactiveX/RxSwift) require custom configuration and setup.
4
4
5
5
## Configure the Xcode Templates Generator
6
6
7
-
Specify a path to a custom config file by providing the `--config` option when executing `nodes-xcode-templates-gen`.
7
+
Specify a path to a custom config file by providing the `--config` option when executing the `nodes-xcode-templates-gen` command.
8
8
9
9
<details>
10
10
@@ -18,7 +18,7 @@ If utilizing the [quick start project setup](https://github.com/Tinder/Nodes#qui
18
18
swift run --skip-build -- nodes-xcode-templates-gen --id "RxSwift" --config "nodes.yml"
19
19
```
20
20
21
-
> TIP: The provided `id` value is used to uniquely identify different sets of templates within the new file dialog in Xcode.
21
+
> The provided `id` value is used to uniquely identify different sets of templates within the new file dialog in Xcode.
22
22
23
23
The script that creates the presets in the quick start project should use the same config file:
24
24
@@ -28,13 +28,13 @@ swift run --skip-build -- nodes-code-gen --preset "$PRESET" --author "$AUTHOR" -
Copy file name to clipboardExpand all lines: README.md
+13-6Lines changed: 13 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,11 +56,12 @@ Each node is comprised of a few pre-defined types working in conjunction to powe
56
56
57
57
Nodes' Xcode templates are required to ensure correct use of the Nodes framework and to guarantee that every created node is properly defined.
58
58
59
-
Installation of the templates is performed by the Xcode templates generator (the `nodes-xcode-templates-gen` executable in the Swift package). Without customizing the generator, Xcode templates for UIKit and SwiftUI (for iOS) are installed by default. The generator supports [optional customization](#optional-customization) if needed.
59
+
Installation of the templates is performed by the Xcode templates generator (the `nodes-xcode-templates-gen` executable in the Swift package). Without customizing the generator, Xcode templates for iOS with [UIKit](https://developer.apple.com/documentation/uikit) and [SwiftUI](https://developer.apple.com/xcode/swiftui) are installed by default. The generator supports [optional customization](#optional-customization) if needed.
60
60
61
61
#### Xcode Templates Installation
62
62
63
-
> TIP: After completing the [Quick Start](#quick-start) setup (below), Nodes' Xcode templates will be ***installed automatically***, so these instructions to manually install the Xcode templates ***may be skipped*** and are included here simply as a reference.
63
+
> [!TIP]
64
+
> After completing the [Quick Start](#quick-start) setup (below), Nodes' Xcode templates will be ***installed automatically***, so these instructions to manually install the Xcode templates ***may be skipped*** and are included here simply as a reference.
64
65
65
66
<details>
66
67
@@ -92,7 +93,8 @@ The Xcode templates will be installed to the following location to be made avail
92
93
93
94
Documentation is available online at: [https://Tinder.github.io/Nodes](https://Tinder.github.io/Nodes)
94
95
95
-
> TIP: After completing the [Quick Start](#quick-start) setup (below), documentation is viewable in Xcode by selecting `Build Documentation` from the `Product` menu.
96
+
> [!TIP]
97
+
> After completing the [Quick Start](#quick-start) setup (below), documentation is viewable in Xcode by selecting `Build Documentation` from the `Product` menu.
96
98
97
99
## Quick Start
98
100
@@ -139,7 +141,8 @@ mint run genesis generate <path>/genesis.yml --options "author:$(git config user
139
141
140
142
When prompted, enter the latest Nodes version, a name for the new iOS Xcode project and an organization identifier (which is the bundle ID prefix such as `com.tinder`).
141
143
142
-
**OPTIONAL:** The cloned Nodes repository is no longer needed at this point and may be removed if there is no plan to create additional projects.
144
+
> [!TIP]
145
+
> The cloned Nodes repository is no longer needed at this point and may be removed if there is no plan to create additional projects.
While Nodes works out-of-the-box with [UIKit](https://developer.apple.com/documentation/uikit) and [SwiftUI](https://developer.apple.com/xcode/swiftui) (for iOS), custom [configuration is required](Customization/Configuration.md) to use other UI frameworks, such as [AppKit](https://developer.apple.com/documentation/appkit).
184
+
While Nodes is configured by default for iOS with [UIKit](https://developer.apple.com/documentation/uikit) and [SwiftUI](https://developer.apple.com/xcode/swiftui), UI frameworks for [AppKit](https://developer.apple.com/documentation/appkit) or other platforms may be enabled with [custom configuration](Customization/Configuration.md).
185
+
186
+
### Observation Frameworks
187
+
188
+
While Nodes is compatible with the [Observation](https://developer.apple.com/documentation/observation) framework for newer operating system versions or can be [configured](Customization/Configuration.md) to use [`ObservableObject`](https://developer.apple.com/documentation/Combine/ObservableObject) for backward compatibility, other observation libraries such [Perception](https://github.com/pointfreeco/swift-perception) require [custom setup](Customization/Perception.md).
182
189
183
190
### Reactive Frameworks
184
191
185
-
While Nodes works out-of-the-box with [Combine](https://developer.apple.com/documentation/combine), custom [configuration and setup is required](Customization/RxSwift.md) to use other reactive frameworks, such [RxSwift](https://github.com/ReactiveX/RxSwift).
192
+
While Nodes is configured by default for [Combine](https://developer.apple.com/documentation/combine), other reactive frameworks such [RxSwift](https://github.com/ReactiveX/RxSwift) require [custom configuration and setup](Customization/RxSwift.md).
0 commit comments