├── .github └── workflows │ └── swift.yml ├── .gitignore ├── AdvanceApp ├── README.md ├── SwiftUI │ ├── README.md │ ├── Todo+Combine+SwiftUI │ │ ├── Shared │ │ │ ├── Assets.xcassets │ │ │ │ ├── AccentColor.colorset │ │ │ │ │ └── Contents.json │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ └── CoreApp │ │ │ │ ├── MacOS+ │ │ │ │ └── NSTextField+.swift │ │ │ │ ├── TodoApp.swift │ │ │ │ └── TodoApp │ │ │ │ ├── AppScreens │ │ │ │ ├── AuthScreen │ │ │ │ │ ├── AuthAction.swift │ │ │ │ │ ├── AuthEnvironment.swift │ │ │ │ │ ├── AuthReducer.swift │ │ │ │ │ ├── AuthState.swift │ │ │ │ │ ├── AuthView.swift │ │ │ │ │ ├── LoginScreen │ │ │ │ │ │ ├── LoginAction.swift │ │ │ │ │ │ ├── LoginEnvironment.swift │ │ │ │ │ │ ├── LoginReducer.swift │ │ │ │ │ │ ├── LoginState.swift │ │ │ │ │ │ └── LoginView.swift │ │ │ │ │ └── RegisterScreen │ │ │ │ │ │ ├── RegisterAction.swift │ │ │ │ │ │ ├── RegisterEnvironment.swift │ │ │ │ │ │ ├── RegisterReducer.swift │ │ │ │ │ │ ├── RegisterState.swift │ │ │ │ │ │ └── RegisterView.swift │ │ │ │ ├── CounterScreen │ │ │ │ │ ├── CounterAction.swift │ │ │ │ │ ├── CounterEnvironment.swift │ │ │ │ │ ├── CounterReducer.swift │ │ │ │ │ ├── CounterState.swift │ │ │ │ │ └── CounterView.swift │ │ │ │ ├── MainScreen │ │ │ │ │ ├── MainAction.swift │ │ │ │ │ ├── MainEnvironment.swift │ │ │ │ │ ├── MainReducer.swift │ │ │ │ │ ├── MainState.swift │ │ │ │ │ └── MainView.swift │ │ │ │ └── RootScreen │ │ │ │ │ ├── RootAction.swift │ │ │ │ │ ├── RootEnvironment.swift │ │ │ │ │ ├── RootReducer.swift │ │ │ │ │ ├── RootState.swift │ │ │ │ │ └── RootView.swift │ │ │ │ ├── Application │ │ │ │ ├── Application+.swift │ │ │ │ └── Application.swift │ │ │ │ ├── Extension+ │ │ │ │ └── String+.swift │ │ │ │ ├── Models │ │ │ │ ├── DatabaseModels │ │ │ │ │ └── RealmTodoModel.swift │ │ │ │ ├── SocketModels │ │ │ │ │ └── SocketModel.swift │ │ │ │ └── ViewModels │ │ │ │ │ └── ViewTodoModel.swift │ │ │ │ ├── Networking+ │ │ │ │ ├── Alamofire+.swift │ │ │ │ └── Socket+.swift │ │ │ │ ├── Realm+ │ │ │ │ └── Realm+.swift │ │ │ │ └── View+ │ │ │ │ └── View+.swift │ │ ├── Todo+Combine+SwiftUI.xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── swiftpm │ │ │ │ └── Package.resolved │ │ └── macOS │ │ │ └── macOS.entitlements │ ├── Todo+ReactiveSwift+SwiftUI │ │ ├── Shared │ │ │ ├── Assets.xcassets │ │ │ │ ├── AccentColor.colorset │ │ │ │ │ └── Contents.json │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ └── CoreApp │ │ │ │ ├── MacOS+ │ │ │ │ └── NSTextField+.swift │ │ │ │ ├── TodoApp.swift │ │ │ │ └── TodoApp │ │ │ │ ├── AppScreens │ │ │ │ ├── AuthScreen │ │ │ │ │ ├── AuthAction.swift │ │ │ │ │ ├── AuthEnvironment.swift │ │ │ │ │ ├── AuthReducer.swift │ │ │ │ │ ├── AuthState.swift │ │ │ │ │ ├── AuthView.swift │ │ │ │ │ ├── LoginScreen │ │ │ │ │ │ ├── LoginAction.swift │ │ │ │ │ │ ├── LoginEnvironment.swift │ │ │ │ │ │ ├── LoginReducer.swift │ │ │ │ │ │ ├── LoginState.swift │ │ │ │ │ │ └── LoginView.swift │ │ │ │ │ └── RegisterScreen │ │ │ │ │ │ ├── RegisterAction.swift │ │ │ │ │ │ ├── RegisterEnvironment.swift │ │ │ │ │ │ ├── RegisterReducer.swift │ │ │ │ │ │ ├── RegisterState.swift │ │ │ │ │ │ └── RegisterView.swift │ │ │ │ ├── CounterScreen │ │ │ │ │ ├── CounterAction.swift │ │ │ │ │ ├── CounterEnvironment.swift │ │ │ │ │ ├── CounterReducer.swift │ │ │ │ │ ├── CounterState.swift │ │ │ │ │ └── CounterView.swift │ │ │ │ ├── MainScreen │ │ │ │ │ ├── MainAction.swift │ │ │ │ │ ├── MainEnvironment.swift │ │ │ │ │ ├── MainReducer.swift │ │ │ │ │ ├── MainState.swift │ │ │ │ │ └── MainView.swift │ │ │ │ └── RootScreen │ │ │ │ │ ├── RootAction.swift │ │ │ │ │ ├── RootEnvironment.swift │ │ │ │ │ ├── RootReducer.swift │ │ │ │ │ ├── RootState.swift │ │ │ │ │ └── RootView.swift │ │ │ │ ├── Application │ │ │ │ ├── Application+.swift │ │ │ │ └── Application.swift │ │ │ │ ├── Extension+ │ │ │ │ └── String+.swift │ │ │ │ ├── Models │ │ │ │ ├── DatabaseModels │ │ │ │ │ └── RealmTodoModel.swift │ │ │ │ ├── SocketModels │ │ │ │ │ └── SocketModel.swift │ │ │ │ └── ViewModels │ │ │ │ │ └── ViewTodoModel.swift │ │ │ │ ├── Networking+ │ │ │ │ ├── Alamofire+.swift │ │ │ │ └── Socket+.swift │ │ │ │ ├── Realm+ │ │ │ │ └── Realm+.swift │ │ │ │ └── View+ │ │ │ │ └── View+.swift │ │ ├── Todo+ReactiveSwift+SwiftUI.xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── swiftpm │ │ │ │ └── Package.resolved │ │ └── macOS │ │ │ └── macOS.entitlements │ └── Todo+RxSwift+SwiftUI │ │ ├── Shared │ │ ├── Assets.xcassets │ │ │ ├── AccentColor.colorset │ │ │ │ └── Contents.json │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ └── CoreApp │ │ │ ├── MacOS+ │ │ │ └── NSTextField+.swift │ │ │ ├── TodoApp.swift │ │ │ └── TodoApp │ │ │ ├── AppScreens │ │ │ ├── AuthScreen │ │ │ │ ├── AuthAction.swift │ │ │ │ ├── AuthEnvironment.swift │ │ │ │ ├── AuthReducer.swift │ │ │ │ ├── AuthState.swift │ │ │ │ ├── AuthView.swift │ │ │ │ ├── LoginScreen │ │ │ │ │ ├── LoginAction.swift │ │ │ │ │ ├── LoginEnvironment.swift │ │ │ │ │ ├── LoginReducer.swift │ │ │ │ │ ├── LoginState.swift │ │ │ │ │ └── LoginView.swift │ │ │ │ └── RegisterScreen │ │ │ │ │ ├── RegisterAction.swift │ │ │ │ │ ├── RegisterEnvironment.swift │ │ │ │ │ ├── RegisterReducer.swift │ │ │ │ │ ├── RegisterState.swift │ │ │ │ │ └── RegisterView.swift │ │ │ ├── CounterScreen │ │ │ │ ├── CounterAction.swift │ │ │ │ ├── CounterEnvironment.swift │ │ │ │ ├── CounterReducer.swift │ │ │ │ ├── CounterState.swift │ │ │ │ └── CounterView.swift │ │ │ ├── MainScreen │ │ │ │ ├── MainAction.swift │ │ │ │ ├── MainEnvironment.swift │ │ │ │ ├── MainReducer.swift │ │ │ │ ├── MainState.swift │ │ │ │ └── MainView.swift │ │ │ └── RootScreen │ │ │ │ ├── RootAction.swift │ │ │ │ ├── RootEnvironment.swift │ │ │ │ ├── RootReducer.swift │ │ │ │ ├── RootState.swift │ │ │ │ └── RootView.swift │ │ │ ├── Application │ │ │ ├── Application+.swift │ │ │ └── Application.swift │ │ │ ├── Extension+ │ │ │ └── String+.swift │ │ │ ├── Models │ │ │ ├── DatabaseModels │ │ │ │ └── RealmTodoModel.swift │ │ │ ├── SocketModels │ │ │ │ └── SocketModel.swift │ │ │ └── ViewModels │ │ │ │ └── ViewTodoModel.swift │ │ │ ├── Networking+ │ │ │ ├── Alamofire+.swift │ │ │ └── Socket+.swift │ │ │ ├── Realm+ │ │ │ └── Realm+.swift │ │ │ └── View+ │ │ │ └── View+.swift │ │ ├── Todo+RxSwift+SwiftUI.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── swiftpm │ │ │ └── Package.resolved │ │ └── macOS │ │ └── macOS.entitlements ├── UIKit11+ │ ├── README.md │ ├── TodoCombineUIKit11 │ │ ├── TodoCombineUIKit11.xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── swiftpm │ │ │ │ └── Package.resolved │ │ └── TodoCombineUIKit11 │ │ │ ├── AppDelegate.swift │ │ │ ├── Assets.xcassets │ │ │ ├── AccentColor.colorset │ │ │ │ └── Contents.json │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ │ ├── Info.plist │ │ │ ├── SceneDelegate.swift │ │ │ └── ViewController.swift │ ├── TodoReactiveSwiftUIKit11 │ │ ├── TodoReactiveSwiftUIKit11.xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── swiftpm │ │ │ │ └── Package.resolved │ │ └── TodoReactiveSwiftUIKit11 │ │ │ ├── AppDelegate.swift │ │ │ ├── Assets.xcassets │ │ │ ├── AccentColor.colorset │ │ │ │ └── Contents.json │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ │ ├── CoreApp │ │ │ └── TodoApp │ │ │ │ ├── AppScreens │ │ │ │ ├── AuthScreen │ │ │ │ │ ├── AuthAction.swift │ │ │ │ │ ├── AuthEnvironment.swift │ │ │ │ │ ├── AuthReducer.swift │ │ │ │ │ ├── AuthState.swift │ │ │ │ │ ├── AuthViewController.swift │ │ │ │ │ ├── LoginScreen │ │ │ │ │ │ ├── LoginAction.swift │ │ │ │ │ │ ├── LoginEnvironment.swift │ │ │ │ │ │ ├── LoginReducer.swift │ │ │ │ │ │ ├── LoginState.swift │ │ │ │ │ │ └── LoginViewController.swift │ │ │ │ │ └── RegisterScreen │ │ │ │ │ │ ├── RegisterAction.swift │ │ │ │ │ │ ├── RegisterEnvironment.swift │ │ │ │ │ │ ├── RegisterReducer.swift │ │ │ │ │ │ ├── RegisterState.swift │ │ │ │ │ │ └── RegisterViewController.swift │ │ │ │ ├── CounterScreen │ │ │ │ │ ├── CounterAction.swift │ │ │ │ │ ├── CounterEnvironment.swift │ │ │ │ │ ├── CounterReducer.swift │ │ │ │ │ ├── CounterState.swift │ │ │ │ │ └── CounterViewController.swift │ │ │ │ ├── MainScreen │ │ │ │ │ ├── MainAction.swift │ │ │ │ │ ├── MainEnvironment.swift │ │ │ │ │ ├── MainReducer.swift │ │ │ │ │ ├── MainState.swift │ │ │ │ │ └── MainViewController.swift │ │ │ │ └── RootScreen │ │ │ │ │ ├── RootAction.swift │ │ │ │ │ ├── RootEnvironment.swift │ │ │ │ │ ├── RootReducer.swift │ │ │ │ │ ├── RootState.swift │ │ │ │ │ └── RootViewController.swift │ │ │ │ ├── Models │ │ │ │ ├── SocketModels │ │ │ │ │ └── SocketModel.swift │ │ │ │ └── ViewModels │ │ │ │ │ └── ViewTodoModel.swift │ │ │ │ ├── Networking+ │ │ │ │ ├── Alamofire+.swift │ │ │ │ └── Socket+.swift │ │ │ │ ├── View+ │ │ │ │ └── View+.swift │ │ │ │ └── Views │ │ │ │ ├── ActivityIndicatorViewController.swift │ │ │ │ ├── ButtonReloadMainTableViewCell.swift │ │ │ │ ├── CreateTitleMainTableViewCell.swift │ │ │ │ └── MainTableViewCell.swift │ │ │ ├── Info.plist │ │ │ ├── Launch Screen.storyboard │ │ │ └── SceneDelegate.swift │ └── TodoRxSwiftUIKit11 │ │ ├── TodoRxSwiftUIKit11.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── swiftpm │ │ │ └── Package.resolved │ │ └── TodoRxSwiftUIKit11 │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ │ ├── CoreApp │ │ └── TodoApp │ │ │ ├── AppScreens │ │ │ ├── AuthScreen │ │ │ │ ├── AuthAction.swift │ │ │ │ ├── AuthEnvironment.swift │ │ │ │ ├── AuthReducer.swift │ │ │ │ ├── AuthState.swift │ │ │ │ ├── AuthViewController.swift │ │ │ │ ├── LoginScreen │ │ │ │ │ ├── LoginAction.swift │ │ │ │ │ ├── LoginEnvironment.swift │ │ │ │ │ ├── LoginReducer.swift │ │ │ │ │ ├── LoginState.swift │ │ │ │ │ └── LoginViewController.swift │ │ │ │ └── RegisterScreen │ │ │ │ │ ├── RegisterAction.swift │ │ │ │ │ ├── RegisterEnvironment.swift │ │ │ │ │ ├── RegisterReducer.swift │ │ │ │ │ ├── RegisterState.swift │ │ │ │ │ └── RegisterViewController.swift │ │ │ ├── CounterScreen │ │ │ │ ├── CounterAction.swift │ │ │ │ ├── CounterEnvironment.swift │ │ │ │ ├── CounterReducer.swift │ │ │ │ ├── CounterState.swift │ │ │ │ └── CounterViewController.swift │ │ │ ├── MainScreen │ │ │ │ ├── MainAction.swift │ │ │ │ ├── MainEnvironment.swift │ │ │ │ ├── MainReducer.swift │ │ │ │ ├── MainState.swift │ │ │ │ └── MainViewController.swift │ │ │ └── RootScreen │ │ │ │ ├── RootAction.swift │ │ │ │ ├── RootEnvironment.swift │ │ │ │ ├── RootReducer.swift │ │ │ │ ├── RootState.swift │ │ │ │ └── RootViewController.swift │ │ │ ├── Models │ │ │ ├── SocketModels │ │ │ │ └── SocketModel.swift │ │ │ └── ViewModels │ │ │ │ └── ViewTodoModel.swift │ │ │ ├── Networking+ │ │ │ ├── Alamofire+.swift │ │ │ └── Socket+.swift │ │ │ ├── View+ │ │ │ └── View+.swift │ │ │ └── Views │ │ │ ├── ActivityIndicatorViewController.swift │ │ │ ├── ButtonReloadMainTableViewCell.swift │ │ │ ├── CreateTitleMainTableViewCell.swift │ │ │ └── MainTableViewCell.swift │ │ ├── Info.plist │ │ ├── Launch Screen.storyboard │ │ └── SceneDelegate.swift └── UIKit13+ │ ├── README.md │ ├── TodoCombineUIKit13 │ ├── TodoCombineUIKit13.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── swiftpm │ │ │ └── Package.resolved │ └── TodoCombineUIKit13 │ │ ├── Assets.xcassets │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ │ ├── CoreApp │ │ ├── TodoApp.swift │ │ └── TodoApp │ │ │ ├── AppScreens │ │ │ ├── AuthScreen │ │ │ │ ├── AuthAction.swift │ │ │ │ ├── AuthEnvironment.swift │ │ │ │ ├── AuthReducer.swift │ │ │ │ ├── AuthState.swift │ │ │ │ ├── AuthViewController.swift │ │ │ │ ├── LoginScreen │ │ │ │ │ ├── LoginAction.swift │ │ │ │ │ ├── LoginEnvironment.swift │ │ │ │ │ ├── LoginReducer.swift │ │ │ │ │ ├── LoginState.swift │ │ │ │ │ └── LoginViewController.swift │ │ │ │ └── RegisterScreen │ │ │ │ │ ├── RegisterAction.swift │ │ │ │ │ ├── RegisterEnvironment.swift │ │ │ │ │ ├── RegisterReducer.swift │ │ │ │ │ ├── RegisterState.swift │ │ │ │ │ └── RegisterViewController.swift │ │ │ ├── CounterScreen │ │ │ │ ├── CounterAction.swift │ │ │ │ ├── CounterEnvironment.swift │ │ │ │ ├── CounterReducer.swift │ │ │ │ ├── CounterState.swift │ │ │ │ └── CounterViewController.swift │ │ │ ├── MainScreen │ │ │ │ ├── MainAction.swift │ │ │ │ ├── MainEnvironment.swift │ │ │ │ ├── MainReducer.swift │ │ │ │ ├── MainState.swift │ │ │ │ └── MainViewController.swift │ │ │ └── RootScreen │ │ │ │ ├── RootAction.swift │ │ │ │ ├── RootEnvironment.swift │ │ │ │ ├── RootReducer.swift │ │ │ │ ├── RootState.swift │ │ │ │ └── RootViewController.swift │ │ │ ├── Models │ │ │ ├── DatabaseModels │ │ │ │ └── RealmTodoModel.swift │ │ │ ├── SocketModels │ │ │ │ └── SocketModel.swift │ │ │ └── ViewModels │ │ │ │ └── ViewTodoModel.swift │ │ │ ├── Networking+ │ │ │ ├── Alamofire+.swift │ │ │ └── Socket+.swift │ │ │ ├── Realm+ │ │ │ └── Realm+.swift │ │ │ ├── View+ │ │ │ └── View+.swift │ │ │ └── Views │ │ │ ├── ActivityIndicatorViewController.swift │ │ │ ├── ButtonReloadMainTableViewCell.swift │ │ │ ├── CreateTitleMainTableViewCell.swift │ │ │ └── MainTableViewCell.swift │ │ └── Preview Content │ │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── TodoReactiveSwiftUIKit13 │ ├── TodoReactiveSwiftUIKit13.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── swiftpm │ │ │ └── Package.resolved │ └── TodoReactiveSwiftUIKit13 │ │ ├── Assets.xcassets │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ │ ├── CoreApp │ │ ├── TodoApp.swift │ │ └── TodoApp │ │ │ ├── AppScreens │ │ │ ├── AuthScreen │ │ │ │ ├── AuthAction.swift │ │ │ │ ├── AuthEnvironment.swift │ │ │ │ ├── AuthReducer.swift │ │ │ │ ├── AuthState.swift │ │ │ │ ├── AuthViewController.swift │ │ │ │ ├── LoginScreen │ │ │ │ │ ├── LoginAction.swift │ │ │ │ │ ├── LoginEnvironment.swift │ │ │ │ │ ├── LoginReducer.swift │ │ │ │ │ ├── LoginState.swift │ │ │ │ │ └── LoginViewController.swift │ │ │ │ └── RegisterScreen │ │ │ │ │ ├── RegisterAction.swift │ │ │ │ │ ├── RegisterEnvironment.swift │ │ │ │ │ ├── RegisterReducer.swift │ │ │ │ │ ├── RegisterState.swift │ │ │ │ │ └── RegisterViewController.swift │ │ │ ├── CounterScreen │ │ │ │ ├── CounterAction.swift │ │ │ │ ├── CounterEnvironment.swift │ │ │ │ ├── CounterReducer.swift │ │ │ │ ├── CounterState.swift │ │ │ │ └── CounterViewController.swift │ │ │ ├── MainScreen │ │ │ │ ├── MainAction.swift │ │ │ │ ├── MainEnvironment.swift │ │ │ │ ├── MainReducer.swift │ │ │ │ ├── MainState.swift │ │ │ │ └── MainViewController.swift │ │ │ └── RootScreen │ │ │ │ ├── RootAction.swift │ │ │ │ ├── RootEnvironment.swift │ │ │ │ ├── RootReducer.swift │ │ │ │ ├── RootState.swift │ │ │ │ └── RootViewController.swift │ │ │ ├── Models │ │ │ ├── DatabaseModels │ │ │ │ └── RealmTodoModel.swift │ │ │ ├── SocketModels │ │ │ │ └── SocketModel.swift │ │ │ └── ViewModels │ │ │ │ └── ViewTodoModel.swift │ │ │ ├── Networking+ │ │ │ ├── Alamofire+.swift │ │ │ └── Socket+.swift │ │ │ ├── Realm+ │ │ │ └── Realm+.swift │ │ │ ├── View+ │ │ │ └── View+.swift │ │ │ └── Views │ │ │ ├── ActivityIndicatorViewController.swift │ │ │ ├── ButtonReloadMainTableViewCell.swift │ │ │ ├── CreateTitleMainTableViewCell.swift │ │ │ └── MainTableViewCell.swift │ │ └── Preview Content │ │ └── Preview Assets.xcassets │ │ └── Contents.json │ └── TodoRxSwiftUIKit13 │ ├── TodoRxSwiftUIKit13.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── swiftpm │ │ └── Package.resolved │ └── TodoRxSwiftUIKit13 │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── CoreApp │ ├── TodoApp.swift │ └── TodoApp │ │ ├── AppScreens │ │ ├── AuthScreen │ │ │ ├── AuthAction.swift │ │ │ ├── AuthEnvironment.swift │ │ │ ├── AuthReducer.swift │ │ │ ├── AuthState.swift │ │ │ ├── AuthViewController.swift │ │ │ ├── LoginScreen │ │ │ │ ├── LoginAction.swift │ │ │ │ ├── LoginEnvironment.swift │ │ │ │ ├── LoginReducer.swift │ │ │ │ ├── LoginState.swift │ │ │ │ └── LoginViewController.swift │ │ │ └── RegisterScreen │ │ │ │ ├── RegisterAction.swift │ │ │ │ ├── RegisterEnvironment.swift │ │ │ │ ├── RegisterReducer.swift │ │ │ │ ├── RegisterState.swift │ │ │ │ └── RegisterViewController.swift │ │ ├── CounterScreen │ │ │ ├── CounterAction.swift │ │ │ ├── CounterEnvironment.swift │ │ │ ├── CounterReducer.swift │ │ │ ├── CounterState.swift │ │ │ └── CounterViewController.swift │ │ ├── MainScreen │ │ │ ├── MainAction.swift │ │ │ ├── MainEnvironment.swift │ │ │ ├── MainReducer.swift │ │ │ ├── MainState.swift │ │ │ └── MainViewController.swift │ │ └── RootScreen │ │ │ ├── RootAction.swift │ │ │ ├── RootEnvironment.swift │ │ │ ├── RootReducer.swift │ │ │ ├── RootState.swift │ │ │ └── RootViewController.swift │ │ ├── Models │ │ ├── DatabaseModels │ │ │ └── RealmTodoModel.swift │ │ ├── SocketModels │ │ │ └── SocketModel.swift │ │ └── ViewModels │ │ │ ├── BaseModel.swift │ │ │ └── TodoModel.swift │ │ ├── Networking+ │ │ ├── Alamofire+.swift │ │ └── Socket+.swift │ │ ├── Realm+ │ │ └── Realm+.swift │ │ ├── View+ │ │ └── View+.swift │ │ └── Views │ │ ├── ActivityIndicatorViewController.swift │ │ ├── ButtonReloadMainTableViewCell.swift │ │ ├── CreateTitleMainTableViewCell.swift │ │ └── MainTableViewCell.swift │ └── Preview Content │ └── Preview Assets.xcassets │ └── Contents.json ├── BasicApp ├── README.md ├── SwiftUI │ ├── README.md │ ├── Todo+Combine+SwiftUI │ │ ├── Shared │ │ │ ├── Assets.xcassets │ │ │ │ ├── AccentColor.colorset │ │ │ │ │ └── Contents.json │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ └── CoreApp │ │ │ │ ├── Exports.swift │ │ │ │ ├── TodoApp.swift │ │ │ │ └── TodoApp │ │ │ │ ├── Models │ │ │ │ └── TodoModel.swift │ │ │ │ └── Views │ │ │ │ ├── AuthView.swift │ │ │ │ ├── CounterView.swift │ │ │ │ ├── MainView.swift │ │ │ │ └── RootView.swift │ │ ├── Todo+Combine+SwiftUI.xcodeproj │ │ │ ├── project.pbxproj │ │ │ ├── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ │ └── swiftpm │ │ │ │ │ └── Package.resolved │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── Todo+Combine+SwiftUI (iOS).xcscheme │ │ └── macOS │ │ │ └── macOS.entitlements │ ├── Todo+ReactiveSwift+SwiftUI │ │ ├── Shared │ │ │ ├── Assets.xcassets │ │ │ │ ├── AccentColor.colorset │ │ │ │ │ └── Contents.json │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ └── CoreApp │ │ │ │ ├── Exports.swift │ │ │ │ ├── TodoApp.swift │ │ │ │ └── TodoApp │ │ │ │ ├── AuthView.swift │ │ │ │ ├── CounterView.swift │ │ │ │ ├── MainView.swift │ │ │ │ ├── Models │ │ │ │ └── TodoModel.swift │ │ │ │ └── RootView.swift │ │ ├── Todo+ReactiveSwift+SwiftUI.xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── swiftpm │ │ │ │ └── Package.resolved │ │ └── macOS │ │ │ └── macOS.entitlements │ └── Todo+RxSwift+SwiftUI │ │ ├── Shared │ │ ├── Assets.xcassets │ │ │ ├── AccentColor.colorset │ │ │ │ └── Contents.json │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ └── CoreApp │ │ │ ├── Exports.swift │ │ │ ├── TodoApp.swift │ │ │ └── TodoApp │ │ │ ├── Models │ │ │ └── TodoModel.swift │ │ │ └── Views │ │ │ ├── AuthView.swift │ │ │ ├── CounterView.swift │ │ │ ├── MainView.swift │ │ │ └── RootView.swift │ │ ├── Todo+RxSwift+SwiftUI.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── swiftpm │ │ │ └── Package.resolved │ │ └── macOS │ │ └── macOS.entitlements ├── UIKit11+ │ ├── README.md │ ├── Todo+Combine+UIKit(iOS11) │ │ ├── Todo+Combine+UIKit(iOS11).xcodeproj │ │ │ ├── project.pbxproj │ │ │ ├── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ │ └── swiftpm │ │ │ │ │ └── Package.resolved │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── Todo+Combine+UIKit(iOS11).xcscheme │ │ └── Todo+Combine+UIKit(iOS11) │ │ │ ├── AppDelegate.swift │ │ │ ├── Assets.xcassets │ │ │ ├── AccentColor.colorset │ │ │ │ └── Contents.json │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ ├── check.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── outline_check_circle_black_48pt_1x.png │ │ │ │ ├── outline_check_circle_black_48pt_2x.png │ │ │ │ └── outline_check_circle_black_48pt_3x.png │ │ │ └── uncheck.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── outline_radio_button_unchecked_black_48pt_1x.png │ │ │ │ ├── outline_radio_button_unchecked_black_48pt_2x.png │ │ │ │ └── outline_radio_button_unchecked_black_48pt_3x.png │ │ │ ├── Base.lproj │ │ │ └── LaunchScreen.storyboard │ │ │ ├── Info.plist │ │ │ ├── SceneDelegate.swift │ │ │ └── TodoApp │ │ │ ├── AppScreens │ │ │ ├── AuthScreen │ │ │ │ ├── AuthAction.swift │ │ │ │ ├── AuthEnvironment.swift │ │ │ │ ├── AuthReducer.swift │ │ │ │ ├── AuthState.swift │ │ │ │ └── AuthViewController.swift │ │ │ ├── MainScreen │ │ │ │ ├── MainAction.swift │ │ │ │ ├── MainEnvironment.swift │ │ │ │ ├── MainReducer.swift │ │ │ │ ├── MainState.swift │ │ │ │ └── MainViewController.swift │ │ │ └── RootScreen │ │ │ │ ├── RootAction.swift │ │ │ │ ├── RootEnvironment.swift │ │ │ │ ├── RootReducer.swift │ │ │ │ ├── RootState.swift │ │ │ │ └── RootViewController.swift │ │ │ ├── Extensions │ │ │ ├── Alamofire+.swift │ │ │ ├── BuildRequest │ │ │ │ ├── Core │ │ │ │ │ ├── ArrayRequestBuilder.swift │ │ │ │ │ ├── MergeRequestBuilder.swift │ │ │ │ │ ├── RequestBuilder.swift │ │ │ │ │ └── RequestBuilderProtocol.swift │ │ │ │ ├── Request.swift │ │ │ │ └── RequestBuilds │ │ │ │ │ ├── RBaseURL.swift │ │ │ │ │ ├── REncoding.swift │ │ │ │ │ ├── RHeaders.swift │ │ │ │ │ ├── RMethod.swift │ │ │ │ │ ├── RPath.swift │ │ │ │ │ ├── RUrl.swift │ │ │ │ │ └── Rbody.swift │ │ │ ├── UIButton+OpenCombine.swift │ │ │ ├── UITapGestureRecognizer+OpenCombine.swift │ │ │ ├── UITextField+OpenCombine.swift │ │ │ └── View+.swift │ │ │ ├── Models │ │ │ └── TodoModel.swift │ │ │ └── Views │ │ │ ├── BaseMainTableViewCell.swift │ │ │ ├── BaseViewController.swift │ │ │ ├── ButtonReloadMainTableViewCell.swift │ │ │ ├── CreateTitleMainTableViewCell.swift │ │ │ └── MainTableViewCell.swift │ ├── Todo+ReactiveSwift+UIKit(iOS11) │ │ ├── Todo+ReactiveSwift+UIKit(iOS11).xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── swiftpm │ │ │ │ └── Package.resolved │ │ └── Todo+ReactiveSwift+UIKit(iOS11) │ │ │ ├── AppDelegate.swift │ │ │ ├── Assets.xcassets │ │ │ ├── AccentColor.colorset │ │ │ │ └── Contents.json │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ ├── check.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── outline_check_circle_black_48pt_1x.png │ │ │ │ ├── outline_check_circle_black_48pt_2x.png │ │ │ │ └── outline_check_circle_black_48pt_3x.png │ │ │ └── uncheck.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── outline_radio_button_unchecked_black_48pt_1x.png │ │ │ │ ├── outline_radio_button_unchecked_black_48pt_2x.png │ │ │ │ └── outline_radio_button_unchecked_black_48pt_3x.png │ │ │ ├── Base.lproj │ │ │ └── LaunchScreen.storyboard │ │ │ ├── Info.plist │ │ │ ├── SceneDelegate.swift │ │ │ └── TodoApp │ │ │ ├── AppScreens │ │ │ ├── AuthScreen │ │ │ │ ├── AuthAction.swift │ │ │ │ ├── AuthEnvironment.swift │ │ │ │ ├── AuthReducer.swift │ │ │ │ ├── AuthState.swift │ │ │ │ └── AuthViewController.swift │ │ │ ├── MainScreen │ │ │ │ ├── MainAction.swift │ │ │ │ ├── MainEnvironment.swift │ │ │ │ ├── MainReducer.swift │ │ │ │ ├── MainState.swift │ │ │ │ └── MainViewController.swift │ │ │ └── RootScreen │ │ │ │ ├── RootAction.swift │ │ │ │ ├── RootEnvironment.swift │ │ │ │ ├── RootReducer.swift │ │ │ │ ├── RootState.swift │ │ │ │ └── RootViewController.swift │ │ │ ├── Extensions │ │ │ └── View+.swift │ │ │ ├── Models │ │ │ └── TodoModel.swift │ │ │ └── Views │ │ │ ├── BaseMainTableViewCell.swift │ │ │ ├── BaseViewController.swift │ │ │ ├── ButtonReloadMainTableViewCell.swift │ │ │ ├── CreateTitleMainTableViewCell.swift │ │ │ └── MainTableViewCell.swift │ └── Todo+RxSwift+UIKit(iOS11) │ │ ├── Todo+RxSwift+UIKit(iOS11).xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── swiftpm │ │ │ └── Package.resolved │ │ └── Todo+RxSwift+UIKit(iOS11) │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── check.imageset │ │ │ ├── Contents.json │ │ │ ├── outline_check_circle_black_48pt_1x.png │ │ │ ├── outline_check_circle_black_48pt_2x.png │ │ │ └── outline_check_circle_black_48pt_3x.png │ │ └── uncheck.imageset │ │ │ ├── Contents.json │ │ │ ├── outline_radio_button_unchecked_black_48pt_1x.png │ │ │ ├── outline_radio_button_unchecked_black_48pt_2x.png │ │ │ └── outline_radio_button_unchecked_black_48pt_3x.png │ │ ├── Base.lproj │ │ └── LaunchScreen.storyboard │ │ ├── Info.plist │ │ ├── SceneDelegate.swift │ │ └── TodoApp │ │ ├── AppScreens │ │ ├── AuthScreen │ │ │ ├── AuthAction.swift │ │ │ ├── AuthEnvironment.swift │ │ │ ├── AuthReducer.swift │ │ │ ├── AuthState.swift │ │ │ └── AuthViewController.swift │ │ ├── MainScreen │ │ │ ├── MainAction.swift │ │ │ ├── MainEnvironment.swift │ │ │ ├── MainReducer.swift │ │ │ ├── MainState.swift │ │ │ └── MainViewController.swift │ │ └── RootScreen │ │ │ ├── RootAction.swift │ │ │ ├── RootEnvironment.swift │ │ │ ├── RootReducer.swift │ │ │ ├── RootState.swift │ │ │ └── RootViewController.swift │ │ ├── Extensions │ │ └── View+.swift │ │ ├── Models │ │ └── TodoModel.swift │ │ └── Views │ │ ├── BaseMainTableViewCell.swift │ │ ├── BaseViewController.swift │ │ ├── ButtonReloadMainTableViewCell.swift │ │ ├── CreateTitleMainTableViewCell.swift │ │ └── MainTableViewCell.swift └── UIKit13+ │ ├── README.md │ ├── Todo+Combine+UIKit(iOS13) │ ├── Todo+Combine+UIKit(iOS13).xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── swiftpm │ │ │ └── Package.resolved │ └── Todo+Combine+UIKit(iOS13) │ │ ├── Assets.xcassets │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ │ ├── CoreApp │ │ ├── TodoApp.swift │ │ └── TodoApp │ │ │ ├── Bases │ │ │ ├── BaseTableViewCell.swift │ │ │ └── BaseViewController.swift │ │ │ ├── Models │ │ │ └── TodoModel.swift │ │ │ ├── ViewControllers │ │ │ ├── AuthViewController.swift │ │ │ ├── MainViewController.swift │ │ │ └── RootViewController.swift │ │ │ ├── ViewExt │ │ │ └── View+.swift │ │ │ └── Views │ │ │ ├── ButtonReloadMainTableViewCell.swift │ │ │ ├── CreateTitleMainTableViewCell.swift │ │ │ └── MainTableViewCell.swift │ │ └── Preview Content │ │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── Todo+ReactiveSwift+UIKit(iOS13) │ ├── Todo+ReactiveSwift+UIKit(iOS13).xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── swiftpm │ │ │ └── Package.resolved │ └── Todo+ReactiveSwift+UIKit(iOS13) │ │ ├── Assets.xcassets │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ │ ├── CoreApp │ │ ├── TodoApp.swift │ │ └── TodoApp │ │ │ ├── Bases │ │ │ ├── BaseTableViewCell.swift │ │ │ └── BaseViewController.swift │ │ │ ├── Models │ │ │ └── TodoModel.swift │ │ │ ├── ViewControllers │ │ │ ├── AuthViewController.swift │ │ │ ├── MainViewController.swift │ │ │ └── RootViewController.swift │ │ │ ├── ViewExt │ │ │ └── View+.swift │ │ │ └── Views │ │ │ ├── ButtonReloadMainTableViewCell.swift │ │ │ ├── CreateTitleMainTableViewCell.swift │ │ │ └── MainTableViewCell.swift │ │ └── Preview Content │ │ └── Preview Assets.xcassets │ │ └── Contents.json │ └── Todo+RxSwift+UIKit(iOS13) │ ├── Todo+RxSwift+UIKit(iOS13).xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── swiftpm │ │ └── Package.resolved │ └── Todo+RxSwift+UIKit(iOS13) │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── CoreApp │ ├── TodoApp.swift │ └── TodoApp │ │ ├── Bases │ │ ├── BaseTableViewCell.swift │ │ └── BaseViewController.swift │ │ ├── Models │ │ └── TodoModel.swift │ │ ├── ViewControllers │ │ ├── AuthViewController.swift │ │ ├── MainViewController.swift │ │ └── RootViewController.swift │ │ ├── ViewExt │ │ └── View+.swift │ │ └── Views │ │ ├── ButtonReloadMainTableViewCell.swift │ │ ├── CreateTitleMainTableViewCell.swift │ │ └── MainTableViewCell.swift │ └── Preview Content │ └── Preview Assets.xcassets │ └── Contents.json ├── README.md ├── Screenshots ├── Screenshot 2022-01-27 at 3.08.25 PM.png ├── Simulator Screen Shot - iPhone 13 Pro Max - 2022-01-27 at 14.50.24.png └── Simulator Screen Shot - iPhone 13 Pro Max - 2022-02-05 at 19.04.34.png └── TodoListServer ├── .dockerignore ├── .swiftpm └── xcode │ ├── package.xcworkspace │ └── contents.xcworkspacedata │ └── xcshareddata │ └── xcschemes │ └── TodoListServer.xcscheme ├── Dockerfile ├── Package.resolved ├── Package.swift ├── Public └── .gitkeep ├── Sources └── App │ ├── Controllers │ ├── .gitkeep │ └── TodoController.swift │ ├── Migrations │ └── CreateTodo.swift │ ├── Models │ └── Todo.swift │ ├── configure.swift │ ├── entrypoint.swift │ └── routes.swift ├── Tests └── AppTests │ └── AppTests.swift ├── db.sqlite └── docker-compose.yml /.github/workflows/swift.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a Swift project 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift 3 | 4 | name: Swift 5 | -------------------------------------------------------------------------------- /AdvanceApp/README.md: -------------------------------------------------------------------------------- 1 | # TodoList 2 | 3 | Examples App TodoList for Composable Architecture 4 | 5 | Technologies 6 | 7 | Architecture + Request + Websocket + Realm Database 8 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/README.md: -------------------------------------------------------------------------------- 1 | 2 | # SwiftUI with ComposableArchitecture (iOS13+) 3 | 4 | 5 | ## Todo Combine SwiftUI 6 | 7 | SPM: 8 | 9 | - swift-composable-architecture 10 | https://github.com/FullStack-Swift/swift-composable-architecture 11 | - CombineRequest 12 | https://github.com/FullStack-Swift/Networking 13 | - ConvertSwift 14 | https://github.com/FullStack-Swift/SwiftExtension 15 | 16 | ## Todo ReactiveSwift SwiftUI 17 | 18 | SPM: 19 | 20 | - reactiveswift-composable-architecture 21 | https://github.com/FullStack-Swift/reactiveswift-composable-architecture 22 | - ReactiveSwiftRequest 23 | https://github.com/FullStack-Swift/Networking 24 | - ConvertSwift 25 | https://github.com/FullStack-Swift/SwiftExtension 26 | 27 | ## Todo RxSwift SwiftUI 28 | 29 | SPM: 30 | 31 | - rxswift-composable-architecture 32 | https://github.com/FullStack-Swift/rxswift-composable-architecture 33 | - RxSwiftRequest 34 | https://github.com/FullStack-Swift/Networking 35 | - ConvertSwift 36 | https://github.com/FullStack-Swift/SwiftExtension 37 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/MacOS+/NSTextField+.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | extension NSTextField { 4 | open override var focusRingType: NSFocusRingType { 5 | get { .none } 6 | set { } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | @main 4 | struct TodoApp: App { 5 | var body: some Scene { 6 | WindowGroup { 7 | RootView() 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/AuthAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum AuthAction: Equatable { 5 | case registerAction(RegisterAction) 6 | case loginAction(LoginAction) 7 | case viewOnAppear 8 | case viewOnDisappear 9 | case none 10 | case changeRootScreen(RootScreen) 11 | case changeAuthScreen(AuthScreen) 12 | } 13 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/AuthEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/AuthState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthState: Equatable { 5 | var registerState = RegisterState() 6 | var loginState = LoginState() 7 | var authScreen: AuthScreen = .login 8 | } 9 | 10 | enum AuthScreen: Equatable { 11 | case login 12 | case register 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum LoginAction: Equatable { 5 | case viewOnAppear 6 | case viewOnDisappear 7 | case none 8 | case loginSuccess 9 | } 10 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct LoginEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let LoginReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewOnAppear: 8 | break 9 | case .viewOnDisappear: 10 | break 11 | case .loginSuccess: 12 | break 13 | default: 14 | break 15 | } 16 | return .none 17 | } 18 | ) 19 | .debug() 20 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct LoginState: Equatable { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum RegisterAction: Equatable { 5 | case viewOnAppear 6 | case viewOnDisappear 7 | case none 8 | case registerSuccess 9 | } 10 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RegisterEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let RegisterReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewOnAppear: 8 | break 9 | case .viewOnDisappear: 10 | break 11 | case .registerSuccess: 12 | break 13 | default: 14 | break 15 | } 16 | return .none 17 | } 18 | ) 19 | .debug() 20 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RegisterState: Equatable { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/CounterScreen/CounterAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum CounterAction: Equatable { 5 | case viewOnAppear 6 | case viewOnDisappear 7 | case none 8 | case increment 9 | case decrement 10 | } 11 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/CounterScreen/CounterEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct CounterEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/CounterScreen/CounterReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let CounterReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewOnAppear: 8 | break 9 | case .viewOnDisappear: 10 | break 11 | case .increment: 12 | state.count += 1 13 | case .decrement: 14 | state.count -= 1 15 | default: 16 | break 17 | } 18 | return .none 19 | } 20 | ) 21 | .debug() 22 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/CounterScreen/CounterState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct CounterState: Equatable { 5 | var count: Int = 0 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/MainScreen/MainEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | import CombineRequest 4 | import CombineWebSocket 5 | 6 | struct MainEnvironment { 7 | let urlString: String = "https://todolistappproj.herokuapp.com/todos" 8 | let status: NetworkReachabilityManager = NetworkReachabilityManager.default! 9 | init() { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/MainScreen/MainState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | import RealmSwift 4 | 5 | struct MainState: Equatable { 6 | var counterState = CounterState() 7 | @BindableState var title: String = "" 8 | var todos: IdentifiedArrayOf = [] 9 | var isLoading: Bool = false 10 | var networkStatus: NetworkStatus = .none 11 | var results: Results? 12 | var socketStringsOffline = [String?]() 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/RootScreen/RootAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum RootAction: Equatable { 5 | case authAction(AuthAction) 6 | case mainAction(MainAction) 7 | case viewOnAppear 8 | case viewOnDisappear 9 | case none 10 | case changeRootScreen(RootScreen) 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/RootScreen/RootEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/RootScreen/RootReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let RootReducer = Reducer.combine( 5 | MainReducer.pullback(state: \.mainState, action: /RootAction.mainAction, environment: { _ in 6 | .init() 7 | }), 8 | AuthReducer.pullback(state: \.authState, action: /RootAction.authAction, environment: { _ in 9 | .init() 10 | }), 11 | Reducer { state, action, environment in 12 | switch action { 13 | case .authAction(.changeRootScreen(let screen)): 14 | return Effect(value: RootAction.changeRootScreen(screen)) 15 | case .mainAction(.changeRootScreen(let screen)): 16 | return Effect(value: RootAction.changeRootScreen(screen)) 17 | case .viewOnAppear: 18 | break 19 | case .viewOnDisappear: 20 | break 21 | case .changeRootScreen(let screen): 22 | state.rootScreen = screen 23 | default: 24 | break 25 | } 26 | return .none 27 | } 28 | ) 29 | .debug() 30 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/RootScreen/RootState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootState: Equatable { 5 | var authState = AuthState() 6 | var mainState = MainState() 7 | var rootScreen: RootScreen = .main 8 | } 9 | 10 | enum RootScreen: Equatable { 11 | case main 12 | case auth 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/Application/Application+.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension Application { 4 | /// AppEnvironment 5 | enum AppEnvironment { 6 | case develop 7 | case stagging 8 | case production 9 | } 10 | } 11 | 12 | extension Application { 13 | struct AppEnvironmentStorageKey: StorageKey { 14 | typealias Value = AppEnvironment 15 | } 16 | 17 | var appEnvironment: AppEnvironment? { 18 | get { 19 | storage.get(AppEnvironmentStorageKey.self) 20 | } 21 | set { 22 | storage.set(AppEnvironmentStorageKey.self, to: newValue) 23 | } 24 | } 25 | } 26 | 27 | extension Application { 28 | struct BaseURL: StorageKey { 29 | typealias Value = String 30 | } 31 | 32 | var url: String? { 33 | get { 34 | storage.get(BaseURL.self) 35 | } 36 | set { 37 | storage.set(BaseURL.self, to: newValue) 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/Extension+/String+.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension String: Identifiable { 4 | public var id: String { 5 | self 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/Models/SocketModels/SocketModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct SocketModel: Codable, Equatable where T: Codable, T: Equatable { 4 | var socketEvent : SocketEvent 5 | var value: T 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/Models/ViewModels/ViewTodoModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct TodoModel: Codable, Identifiable, Equatable { 4 | var id: UUID 5 | var title: String 6 | var isCompleted: Bool 7 | } 8 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/View+/View+.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | public extension View { 4 | /// embed view in NavigationView 5 | /// - Returns: some View 6 | func embedNavigationView() -> some View { 7 | NavigationView { 8 | self 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Todo+Combine+SwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/Todo+Combine+SwiftUI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+Combine+SwiftUI/macOS/macOS.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | com.apple.security.network.client 10 | 11 | com.apple.security.network.server 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/MacOS+/NSTextField+.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | extension NSTextField { 4 | open override var focusRingType: NSFocusRingType { 5 | get { .none } 6 | set { } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | @main 4 | struct TodoApp: App { 5 | var body: some Scene { 6 | WindowGroup { 7 | RootView() 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/AuthAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum AuthAction: Equatable { 5 | case registerAction(RegisterAction) 6 | case loginAction(LoginAction) 7 | case viewOnAppear 8 | case viewOnDisappear 9 | case none 10 | case changeRootScreen(RootScreen) 11 | case changeAuthScreen(AuthScreen) 12 | } 13 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/AuthEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/AuthState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthState: Equatable { 5 | var registerState = RegisterState() 6 | var loginState = LoginState() 7 | var authScreen: AuthScreen = .login 8 | } 9 | 10 | enum AuthScreen: Equatable { 11 | case login 12 | case register 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum LoginAction: Equatable { 5 | case viewOnAppear 6 | case viewOnDisappear 7 | case none 8 | case loginSuccess 9 | } 10 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct LoginEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let LoginReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewOnAppear: 8 | break 9 | case .viewOnDisappear: 10 | break 11 | case .loginSuccess: 12 | break 13 | default: 14 | break 15 | } 16 | return .none 17 | } 18 | ) 19 | .debug() 20 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct LoginState: Equatable { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum RegisterAction: Equatable { 5 | case viewOnAppear 6 | case viewOnDisappear 7 | case none 8 | case registerSuccess 9 | } 10 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RegisterEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let RegisterReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewOnAppear: 8 | break 9 | case .viewOnDisappear: 10 | break 11 | case .registerSuccess: 12 | break 13 | default: 14 | break 15 | } 16 | return .none 17 | } 18 | ) 19 | .debug() 20 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RegisterState: Equatable { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/CounterScreen/CounterAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum CounterAction: Equatable { 5 | case viewOnAppear 6 | case viewOnDisappear 7 | case none 8 | case increment 9 | case decrement 10 | } 11 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/CounterScreen/CounterEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct CounterEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/CounterScreen/CounterReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let CounterReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewOnAppear: 8 | break 9 | case .viewOnDisappear: 10 | break 11 | case .increment: 12 | state.count += 1 13 | case .decrement: 14 | state.count -= 1 15 | default: 16 | break 17 | } 18 | return .none 19 | } 20 | ) 21 | .debug() 22 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/CounterScreen/CounterState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct CounterState: Equatable { 5 | var count: Int = 0 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/MainScreen/MainEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | import ReactiveSwiftRequest 4 | import ReactiveSwiftWebSocket 5 | 6 | struct MainEnvironment { 7 | let urlString: String = "https://todolistappproj.herokuapp.com/todos" 8 | let status: NetworkReachabilityManager = NetworkReachabilityManager.default! 9 | init() { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/MainScreen/MainState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | import RealmSwift 4 | 5 | struct MainState: Equatable { 6 | var counterState = CounterState() 7 | @BindableState var title: String = "" 8 | var todos: IdentifiedArrayOf = [] 9 | var isLoading: Bool = false 10 | var networkStatus: NetworkStatus = .none 11 | var results: Results? 12 | var socketStringsOffline = [String?]() 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/RootScreen/RootAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum RootAction: Equatable { 5 | case authAction(AuthAction) 6 | case mainAction(MainAction) 7 | case viewOnAppear 8 | case viewOnDisappear 9 | case none 10 | case changeRootScreen(RootScreen) 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/RootScreen/RootEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/RootScreen/RootReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let RootReducer = Reducer.combine( 5 | MainReducer.pullback(state: \.mainState, action: /RootAction.mainAction, environment: { _ in 6 | .init() 7 | }), 8 | AuthReducer.pullback(state: \.authState, action: /RootAction.authAction, environment: { _ in 9 | .init() 10 | }), 11 | Reducer { state, action, environment in 12 | switch action { 13 | case .authAction(.changeRootScreen(let screen)): 14 | return Effect(value: RootAction.changeRootScreen(screen)) 15 | case .mainAction(.changeRootScreen(let screen)): 16 | return Effect(value: RootAction.changeRootScreen(screen)) 17 | case .viewOnAppear: 18 | break 19 | case .viewOnDisappear: 20 | break 21 | case .changeRootScreen(let screen): 22 | state.rootScreen = screen 23 | default: 24 | break 25 | } 26 | return .none 27 | } 28 | ) 29 | .debug() 30 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/RootScreen/RootState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootState: Equatable { 5 | var authState = AuthState() 6 | var mainState = MainState() 7 | var rootScreen: RootScreen = .main 8 | } 9 | 10 | enum RootScreen: Equatable { 11 | case main 12 | case auth 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/Application/Application+.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension Application { 4 | /// AppEnvironment 5 | enum AppEnvironment { 6 | case develop 7 | case stagging 8 | case production 9 | } 10 | } 11 | 12 | extension Application { 13 | struct AppEnvironmentStorageKey: StorageKey { 14 | typealias Value = AppEnvironment 15 | } 16 | 17 | var appEnvironment: AppEnvironment? { 18 | get { 19 | storage.get(AppEnvironmentStorageKey.self) 20 | } 21 | set { 22 | storage.set(AppEnvironmentStorageKey.self, to: newValue) 23 | } 24 | } 25 | } 26 | 27 | extension Application { 28 | struct BaseURL: StorageKey { 29 | typealias Value = String 30 | } 31 | 32 | var url: String? { 33 | get { 34 | storage.get(BaseURL.self) 35 | } 36 | set { 37 | storage.set(BaseURL.self, to: newValue) 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/Extension+/String+.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension String: Identifiable { 4 | public var id: String { 5 | self 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/Models/SocketModels/SocketModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct SocketModel: Codable, Equatable where T: Codable, T: Equatable { 4 | var socketEvent : SocketEvent 5 | var value: T 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/Models/ViewModels/ViewTodoModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct TodoModel: Codable, Identifiable, Equatable { 4 | var id: UUID 5 | var title: String 6 | var isCompleted: Bool 7 | } 8 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/View+/View+.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | public extension View { 4 | /// embed view in NavigationView 5 | /// - Returns: some View 6 | func embedNavigationView() -> some View { 7 | NavigationView { 8 | self 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Todo+ReactiveSwift+SwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Todo+ReactiveSwift+SwiftUI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/macOS/macOS.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | com.apple.security.network.client 10 | 11 | com.apple.security.network.server 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/MacOS+/NSTextField+.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | extension NSTextField { 4 | open override var focusRingType: NSFocusRingType { 5 | get { .none } 6 | set { } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | @main 4 | struct TodoApp: App { 5 | var body: some Scene { 6 | WindowGroup { 7 | RootView() 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/AuthAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum AuthAction: Equatable { 5 | case registerAction(RegisterAction) 6 | case loginAction(LoginAction) 7 | case viewOnAppear 8 | case viewOnDisappear 9 | case none 10 | case changeRootScreen(RootScreen) 11 | case changeAuthScreen(AuthScreen) 12 | } 13 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/AuthEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/AuthState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthState: Equatable { 5 | var registerState = RegisterState() 6 | var loginState = LoginState() 7 | var authScreen: AuthScreen = .login 8 | } 9 | 10 | enum AuthScreen: Equatable { 11 | case login 12 | case register 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum LoginAction: Equatable { 5 | case viewOnAppear 6 | case viewOnDisappear 7 | case none 8 | case loginSuccess 9 | } 10 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct LoginEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let LoginReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewOnAppear: 8 | break 9 | case .viewOnDisappear: 10 | break 11 | case .loginSuccess: 12 | break 13 | default: 14 | break 15 | } 16 | return .none 17 | } 18 | ) 19 | .debug() 20 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct LoginState: Equatable { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum RegisterAction: Equatable { 5 | case viewOnAppear 6 | case viewOnDisappear 7 | case none 8 | case registerSuccess 9 | } 10 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RegisterEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let RegisterReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewOnAppear: 8 | break 9 | case .viewOnDisappear: 10 | break 11 | case .registerSuccess: 12 | break 13 | default: 14 | break 15 | } 16 | return .none 17 | } 18 | ) 19 | .debug() 20 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RegisterState: Equatable { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/CounterScreen/CounterAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum CounterAction: Equatable { 5 | case viewOnAppear 6 | case viewOnDisappear 7 | case none 8 | case increment 9 | case decrement 10 | } 11 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/CounterScreen/CounterEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct CounterEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/CounterScreen/CounterReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let CounterReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewOnAppear: 8 | break 9 | case .viewOnDisappear: 10 | break 11 | case .increment: 12 | state.count += 1 13 | case .decrement: 14 | state.count -= 1 15 | default: 16 | break 17 | } 18 | return .none 19 | } 20 | ) 21 | .debug() 22 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/CounterScreen/CounterState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct CounterState: Equatable { 5 | var count: Int = 0 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/MainScreen/MainEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | import RxSwiftRequest 4 | import RxSwiftWebSocket 5 | 6 | struct MainEnvironment { 7 | let urlString: String = "https://todolistappproj.herokuapp.com/todos" 8 | let status: NetworkReachabilityManager = NetworkReachabilityManager.default! 9 | init() { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/MainScreen/MainState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | import RealmSwift 4 | 5 | struct MainState: Equatable { 6 | var counterState = CounterState() 7 | @BindableState var title: String = "" 8 | var todos: IdentifiedArrayOf = [] 9 | var isLoading: Bool = false 10 | var networkStatus: NetworkStatus = .none 11 | var results: Results? 12 | var socketStringsOffline = [String?]() 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/RootScreen/RootAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum RootAction: Equatable { 5 | case authAction(AuthAction) 6 | case mainAction(MainAction) 7 | case viewOnAppear 8 | case viewOnDisappear 9 | case none 10 | case changeRootScreen(RootScreen) 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/RootScreen/RootEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/RootScreen/RootReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let RootReducer = Reducer.combine( 5 | MainReducer.pullback(state: \.mainState, action: /RootAction.mainAction, environment: { _ in 6 | .init() 7 | }), 8 | AuthReducer.pullback(state: \.authState, action: /RootAction.authAction, environment: { _ in 9 | .init() 10 | }), 11 | Reducer { state, action, environment in 12 | switch action { 13 | case .authAction(.changeRootScreen(let screen)): 14 | return Effect(value: RootAction.changeRootScreen(screen)) 15 | case .mainAction(.changeRootScreen(let screen)): 16 | return Effect(value: RootAction.changeRootScreen(screen)) 17 | case .viewOnAppear: 18 | break 19 | case .viewOnDisappear: 20 | break 21 | case .changeRootScreen(let screen): 22 | state.rootScreen = screen 23 | default: 24 | break 25 | } 26 | return .none 27 | } 28 | ) 29 | .debug() 30 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/AppScreens/RootScreen/RootState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootState: Equatable { 5 | var authState = AuthState() 6 | var mainState = MainState() 7 | var rootScreen: RootScreen = .main 8 | } 9 | 10 | enum RootScreen: Equatable { 11 | case main 12 | case auth 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/Application/Application+.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension Application { 4 | /// AppEnvironment 5 | enum AppEnvironment { 6 | case develop 7 | case stagging 8 | case production 9 | } 10 | } 11 | 12 | extension Application { 13 | struct AppEnvironmentStorageKey: StorageKey { 14 | typealias Value = AppEnvironment 15 | } 16 | 17 | var appEnvironment: AppEnvironment? { 18 | get { 19 | storage.get(AppEnvironmentStorageKey.self) 20 | } 21 | set { 22 | storage.set(AppEnvironmentStorageKey.self, to: newValue) 23 | } 24 | } 25 | } 26 | 27 | extension Application { 28 | struct BaseURL: StorageKey { 29 | typealias Value = String 30 | } 31 | 32 | var url: String? { 33 | get { 34 | storage.get(BaseURL.self) 35 | } 36 | set { 37 | storage.set(BaseURL.self, to: newValue) 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/Extension+/String+.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension String: Identifiable { 4 | public var id: String { 5 | self 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/Models/SocketModels/SocketModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct SocketModel: Codable, Equatable where T: Codable, T: Equatable { 4 | var socketEvent : SocketEvent 5 | var value: T 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/Models/ViewModels/ViewTodoModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct TodoModel: Codable, Identifiable, Equatable { 4 | var id: UUID 5 | var title: String 6 | var isCompleted: Bool 7 | } 8 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/View+/View+.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | public extension View { 4 | /// embed view in NavigationView 5 | /// - Returns: some View 6 | func embedNavigationView() -> some View { 7 | NavigationView { 8 | self 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Todo+RxSwift+SwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/Todo+RxSwift+SwiftUI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AdvanceApp/SwiftUI/Todo+RxSwift+SwiftUI/macOS/macOS.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | com.apple.security.network.client 10 | 11 | com.apple.security.network.server 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoCombineUIKit11/TodoCombineUIKit11.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoCombineUIKit11/TodoCombineUIKit11.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoCombineUIKit11/TodoCombineUIKit11/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoCombineUIKit11/TodoCombineUIKit11/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoCombineUIKit11/TodoCombineUIKit11/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIApplicationSceneManifest 6 | 7 | UIApplicationSupportsMultipleScenes 8 | 9 | UISceneConfigurations 10 | 11 | UIWindowSceneSessionRoleApplication 12 | 13 | 14 | UISceneConfigurationName 15 | Default Configuration 16 | UISceneDelegateClassName 17 | $(PRODUCT_MODULE_NAME).SceneDelegate 18 | UISceneStoryboardFile 19 | Main 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoCombineUIKit11/TodoCombineUIKit11/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // TodoCombineUIKit11 4 | // 5 | // Created by Nguyen Phong on 1/29/22. 6 | // 7 | 8 | import UIKit 9 | 10 | class ViewController: UIViewController { 11 | 12 | override func viewDidLoad() { 13 | super.viewDidLoad() 14 | // Do any additional setup after loading the view. 15 | } 16 | 17 | 18 | } 19 | 20 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/AuthAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum AuthAction: Equatable { 5 | case loginAction(LoginAction) 6 | case registerAction(RegisterAction) 7 | case viewDidLoad 8 | case viewWillAppear 9 | case viewWillDisappear 10 | case none 11 | case changeRootScreen(RootScreen) 12 | case setNavigation(isActive: Bool, screen: AuthScreen) 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/AuthEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/AuthState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthState: Equatable { 5 | var loginState: LoginState? 6 | var registerState: RegisterState? 7 | } 8 | 9 | enum AuthScreen: Equatable { 10 | case login 11 | case register 12 | case root 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum LoginAction: Equatable { 5 | case viewDidLoad 6 | case viewWillAppear 7 | case viewWillDisappear 8 | case none 9 | case loginSuccess 10 | } 11 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct LoginEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let LoginReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewDidLoad: 8 | break 9 | case .viewWillAppear: 10 | break 11 | case .viewWillDisappear: 12 | break 13 | default: 14 | break 15 | } 16 | return .none 17 | } 18 | ) 19 | .debug() 20 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct LoginState: Equatable { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum RegisterAction: Equatable { 5 | case viewDidLoad 6 | case viewWillAppear 7 | case viewWillDisappear 8 | case none 9 | case registerSuccess 10 | } 11 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RegisterEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let RegisterReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewDidLoad: 8 | break 9 | case .viewWillAppear: 10 | break 11 | case .viewWillDisappear: 12 | break 13 | default: 14 | break 15 | } 16 | return .none 17 | } 18 | ) 19 | .debug() 20 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RegisterState: Equatable { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/AppScreens/CounterScreen/CounterAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum CounterAction: Equatable { 5 | case viewDidLoad 6 | case viewWillAppear 7 | case viewWillDisappear 8 | case none 9 | case decrement 10 | case increment 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/AppScreens/CounterScreen/CounterEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct CounterEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/AppScreens/CounterScreen/CounterReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let CounterReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewDidLoad: 8 | break 9 | case .viewWillAppear: 10 | break 11 | case .viewWillDisappear: 12 | break 13 | case .decrement: 14 | state.count -= 1 15 | case .increment: 16 | state.count += 1 17 | default: 18 | break 19 | } 20 | return .none 21 | } 22 | ) 23 | .debug() 24 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/AppScreens/CounterScreen/CounterState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct CounterState: Equatable { 5 | var count = 0 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/AppScreens/MainScreen/MainEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | import ReactiveSwiftRequest 4 | import ReactiveSwiftWebSocket 5 | 6 | struct MainEnvironment { 7 | let urlString: String = "https://todolistappproj.herokuapp.com/todos" 8 | let status: NetworkReachabilityManager = NetworkReachabilityManager.default! 9 | init() { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/AppScreens/MainScreen/MainState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct MainState: Equatable { 5 | var optionalCounterState: CounterState? 6 | var title: String = "" 7 | var todos: [TodoModel] = [] 8 | var isLoading: Bool = false 9 | var networkStatus: NetworkStatus = .none 10 | var socketStringsOffline = [String?]() 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/AppScreens/RootScreen/RootAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum RootAction: Equatable { 5 | case authAction(AuthAction) 6 | case mainAction(MainAction) 7 | case viewDidLoad 8 | case viewWillAppear 9 | case viewWillDisappear 10 | case none 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/AppScreens/RootScreen/RootEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/AppScreens/RootScreen/RootReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let RootReducer = Reducer.combine( 5 | AuthReducer.pullback(state: \.authState, action: /RootAction.authAction, environment: { _ in 6 | .init() 7 | }), 8 | MainReducer.pullback(state: \.mainState, action: /RootAction.mainAction, environment: { _ in 9 | .init() 10 | }), 11 | Reducer { state, action, environment in 12 | switch action { 13 | case .authAction(.changeRootScreen(let screen)): 14 | state.rootScreen = screen 15 | case .mainAction(.changeRootScreen(let screen)): 16 | state = RootState() 17 | state.rootScreen = screen 18 | case .viewDidLoad: 19 | break 20 | case .viewWillAppear: 21 | break 22 | case .viewWillDisappear: 23 | break 24 | default: 25 | break 26 | } 27 | return .none 28 | } 29 | ) 30 | .debug() 31 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/AppScreens/RootScreen/RootState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootState: Equatable { 5 | var authState = AuthState() 6 | var mainState = MainState() 7 | var rootScreen: RootScreen = .main 8 | } 9 | 10 | enum RootScreen: Equatable { 11 | case main 12 | case auth 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/Models/SocketModels/SocketModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct SocketModel: Codable, Equatable where T: Codable, T: Equatable { 4 | var socketEvent : SocketEvent 5 | var value: T 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/Models/ViewModels/ViewTodoModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct TodoModel: Codable, Identifiable, Equatable { 4 | var id: UUID 5 | var title: String 6 | var isCompleted: Bool 7 | } 8 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/CoreApp/TodoApp/Views/ActivityIndicatorViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | final class ActivityIndicatorViewController: UIViewController { 4 | override func viewDidLoad() { 5 | super.viewDidLoad() 6 | // setupview 7 | if #available(iOS 13.0, *) { 8 | self.view.backgroundColor = .systemBackground 9 | } else { 10 | // Fallback on earlier versions 11 | } 12 | // activityIndicator 13 | let activityIndicator = UIActivityIndicatorView() 14 | activityIndicator.startAnimating() 15 | activityIndicator.translatesAutoresizingMaskIntoConstraints = false 16 | self.view.addSubview(activityIndicator) 17 | NSLayoutConstraint.activate([ 18 | activityIndicator.centerXAnchor.constraint( 19 | equalTo: self.view.safeAreaLayoutGuide.centerXAnchor), 20 | activityIndicator.centerYAnchor.constraint( 21 | equalTo: self.view.safeAreaLayoutGuide.centerYAnchor), 22 | ]) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIApplicationSceneManifest 6 | 7 | UIApplicationSupportsMultipleScenes 8 | 9 | UISceneConfigurations 10 | 11 | UIWindowSceneSessionRoleApplication 12 | 13 | 14 | UISceneConfigurationName 15 | Default Configuration 16 | UISceneDelegateClassName 17 | $(PRODUCT_MODULE_NAME).SceneDelegate 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoReactiveSwiftUIKit11/TodoReactiveSwiftUIKit11/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | @available(iOS 13.0, *) 4 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 5 | 6 | var window: UIWindow? 7 | 8 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 9 | guard let _ = (scene as? UIWindowScene) else { return } 10 | guard let windowScene = (scene as? UIWindowScene) else { return } 11 | window = UIWindow(windowScene: windowScene) 12 | window?.rootViewController = RootViewController() 13 | window?.makeKeyAndVisible() 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | @main 4 | class AppDelegate: UIResponder, UIApplicationDelegate { 5 | 6 | var window: UIWindow? 7 | 8 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 9 | window = UIWindow(frame: UIScreen.main.bounds) 10 | self.window?.rootViewController = RootViewController() 11 | self.window?.makeKeyAndVisible() 12 | return true 13 | } 14 | 15 | // MARK: UISceneSession Lifecycle 16 | @available(iOS 13.0, *) 17 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 18 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 19 | } 20 | @available(iOS 13.0, *) 21 | 22 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/AuthAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum AuthAction: Equatable { 5 | case loginAction(LoginAction) 6 | case registerAction(RegisterAction) 7 | case viewDidLoad 8 | case viewWillAppear 9 | case viewWillDisappear 10 | case none 11 | case changeRootScreen(RootScreen) 12 | case setNavigation(isActive: Bool, screen: AuthScreen) 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/AuthEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/AuthState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthState: Equatable { 5 | var loginState: LoginState? 6 | var registerState: RegisterState? 7 | } 8 | 9 | enum AuthScreen: Equatable { 10 | case login 11 | case register 12 | case root 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum LoginAction: Equatable { 5 | case viewDidLoad 6 | case viewWillAppear 7 | case viewWillDisappear 8 | case none 9 | case loginSuccess 10 | } 11 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct LoginEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let LoginReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewDidLoad: 8 | break 9 | case .viewWillAppear: 10 | break 11 | case .viewWillDisappear: 12 | break 13 | default: 14 | break 15 | } 16 | return .none 17 | } 18 | ) 19 | .debug() 20 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct LoginState: Equatable { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum RegisterAction: Equatable { 5 | case viewDidLoad 6 | case viewWillAppear 7 | case viewWillDisappear 8 | case none 9 | case registerSuccess 10 | } 11 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RegisterEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let RegisterReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewDidLoad: 8 | break 9 | case .viewWillAppear: 10 | break 11 | case .viewWillDisappear: 12 | break 13 | default: 14 | break 15 | } 16 | return .none 17 | } 18 | ) 19 | .debug() 20 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RegisterState: Equatable { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/AppScreens/CounterScreen/CounterAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum CounterAction: Equatable { 5 | case viewDidLoad 6 | case viewWillAppear 7 | case viewWillDisappear 8 | case none 9 | case decrement 10 | case increment 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/AppScreens/CounterScreen/CounterEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct CounterEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/AppScreens/CounterScreen/CounterReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let CounterReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewDidLoad: 8 | break 9 | case .viewWillAppear: 10 | break 11 | case .viewWillDisappear: 12 | break 13 | case .decrement: 14 | state.count -= 1 15 | case .increment: 16 | state.count += 1 17 | default: 18 | break 19 | } 20 | return .none 21 | } 22 | ) 23 | .debug() 24 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/AppScreens/CounterScreen/CounterState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct CounterState: Equatable { 5 | var count = 0 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/AppScreens/MainScreen/MainEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | import RxSwiftRequest 4 | import RxSwiftWebSocket 5 | 6 | struct MainEnvironment { 7 | let urlString: String = "https://todolistappproj.herokuapp.com/todos" 8 | let status: NetworkReachabilityManager = NetworkReachabilityManager.default! 9 | init() { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/AppScreens/MainScreen/MainState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct MainState: Equatable { 5 | var optionalCounterState: CounterState? 6 | var title: String = "" 7 | var todos: [TodoModel] = [] 8 | var isLoading: Bool = false 9 | var networkStatus: NetworkStatus = .none 10 | var socketStringsOffline = [String?]() 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/AppScreens/RootScreen/RootAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum RootAction: Equatable { 5 | case authAction(AuthAction) 6 | case mainAction(MainAction) 7 | case viewDidLoad 8 | case viewWillAppear 9 | case viewWillDisappear 10 | case none 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/AppScreens/RootScreen/RootEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/AppScreens/RootScreen/RootReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let RootReducer = Reducer.combine( 5 | AuthReducer.pullback(state: \.authState, action: /RootAction.authAction, environment: { _ in 6 | .init() 7 | }), 8 | MainReducer.pullback(state: \.mainState, action: /RootAction.mainAction, environment: { _ in 9 | .init() 10 | }), 11 | Reducer { state, action, environment in 12 | switch action { 13 | case .authAction(.changeRootScreen(let screen)): 14 | state.rootScreen = screen 15 | case .mainAction(.changeRootScreen(let screen)): 16 | state = RootState() 17 | state.rootScreen = screen 18 | case .viewDidLoad: 19 | break 20 | case .viewWillAppear: 21 | break 22 | case .viewWillDisappear: 23 | break 24 | default: 25 | break 26 | } 27 | return .none 28 | } 29 | ) 30 | .debug() 31 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/AppScreens/RootScreen/RootState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootState: Equatable { 5 | var authState = AuthState() 6 | var mainState = MainState() 7 | var rootScreen: RootScreen = .main 8 | } 9 | 10 | enum RootScreen: Equatable { 11 | case main 12 | case auth 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/Models/SocketModels/SocketModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct SocketModel: Codable, Equatable where T: Codable, T: Equatable { 4 | var socketEvent : SocketEvent 5 | var value: T 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/Models/ViewModels/ViewTodoModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct TodoModel: Codable, Identifiable, Equatable { 4 | var id: UUID 5 | var title: String 6 | var isCompleted: Bool 7 | } 8 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/CoreApp/TodoApp/Views/ActivityIndicatorViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | final class ActivityIndicatorViewController: UIViewController { 4 | override func viewDidLoad() { 5 | super.viewDidLoad() 6 | // setupview 7 | if #available(iOS 13.0, *) { 8 | self.view.backgroundColor = .systemBackground 9 | } else { 10 | // Fallback on earlier versions 11 | } 12 | // activityIndicator 13 | let activityIndicator = UIActivityIndicatorView() 14 | activityIndicator.startAnimating() 15 | activityIndicator.translatesAutoresizingMaskIntoConstraints = false 16 | self.view.addSubview(activityIndicator) 17 | NSLayoutConstraint.activate([ 18 | activityIndicator.centerXAnchor.constraint( 19 | equalTo: self.view.safeAreaLayoutGuide.centerXAnchor), 20 | activityIndicator.centerYAnchor.constraint( 21 | equalTo: self.view.safeAreaLayoutGuide.centerYAnchor), 22 | ]) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIApplicationSceneManifest 6 | 7 | UIApplicationSupportsMultipleScenes 8 | 9 | UISceneConfigurations 10 | 11 | UIWindowSceneSessionRoleApplication 12 | 13 | 14 | UISceneConfigurationName 15 | Default Configuration 16 | UISceneDelegateClassName 17 | $(PRODUCT_MODULE_NAME).SceneDelegate 18 | UISceneStoryboardFile 19 | Main 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit11+/TodoRxSwiftUIKit11/TodoRxSwiftUIKit11/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | @available(iOS 13.0, *) 4 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 5 | 6 | var window: UIWindow? 7 | 8 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 9 | guard let _ = (scene as? UIWindowScene) else { return } 10 | guard let windowScene = (scene as? UIWindowScene) else { return } 11 | window = UIWindow(windowScene: windowScene) 12 | window?.rootViewController = RootViewController() 13 | window?.makeKeyAndVisible() 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | import ComposableArchitecture 3 | 4 | @main 5 | struct TodoApp: App { 6 | var body: some Scene { 7 | WindowGroup { 8 | let vc = RootViewController() 9 | UIViewRepresented(makeUIView: { _ in vc.view }) } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/AuthAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum AuthAction: Equatable { 5 | case loginAction(LoginAction) 6 | case registerAction(RegisterAction) 7 | case viewDidLoad 8 | case viewWillAppear 9 | case viewWillDisappear 10 | case none 11 | case changeRootScreen(RootScreen) 12 | case setNavigation(isActive: Bool, screen: AuthScreen) 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/AuthEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/AuthState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthState: Equatable { 5 | var loginState: LoginState? 6 | var registerState: RegisterState? 7 | } 8 | 9 | enum AuthScreen: Equatable { 10 | case login 11 | case register 12 | case root 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum LoginAction: Equatable { 5 | case viewDidLoad 6 | case viewWillAppear 7 | case viewWillDisappear 8 | case none 9 | case loginSuccess 10 | } 11 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct LoginEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let LoginReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewDidLoad: 8 | break 9 | case .viewWillAppear: 10 | break 11 | case .viewWillDisappear: 12 | break 13 | default: 14 | break 15 | } 16 | return .none 17 | } 18 | ) 19 | .debug() 20 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct LoginState: Equatable { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum RegisterAction: Equatable { 5 | case viewDidLoad 6 | case viewWillAppear 7 | case viewWillDisappear 8 | case none 9 | case registerSuccess 10 | } 11 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RegisterEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let RegisterReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewDidLoad: 8 | break 9 | case .viewWillAppear: 10 | break 11 | case .viewWillDisappear: 12 | break 13 | default: 14 | break 15 | } 16 | return .none 17 | } 18 | ) 19 | .debug() 20 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RegisterState: Equatable { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/AppScreens/CounterScreen/CounterAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum CounterAction: Equatable { 5 | case viewDidLoad 6 | case viewWillAppear 7 | case viewWillDisappear 8 | case none 9 | case decrement 10 | case increment 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/AppScreens/CounterScreen/CounterEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct CounterEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/AppScreens/CounterScreen/CounterReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let CounterReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewDidLoad: 8 | break 9 | case .viewWillAppear: 10 | break 11 | case .viewWillDisappear: 12 | break 13 | case .decrement: 14 | state.count -= 1 15 | case .increment: 16 | state.count += 1 17 | default: 18 | break 19 | } 20 | return .none 21 | } 22 | ) 23 | .debug() 24 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/AppScreens/CounterScreen/CounterState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct CounterState: Equatable { 5 | var count = 0 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/AppScreens/MainScreen/MainEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | import CombineRequest 4 | import CombineWebSocket 5 | 6 | struct MainEnvironment { 7 | let urlString: String = "https://todolistappproj.herokuapp.com/todos" 8 | let status: NetworkReachabilityManager = NetworkReachabilityManager.default! 9 | init() { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/AppScreens/MainScreen/MainState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | import RealmSwift 4 | 5 | struct MainState: Equatable { 6 | var optionalCounterState: CounterState? 7 | var title: String = "" 8 | var todos: IdentifiedArrayOf = [] 9 | var isLoading: Bool = false 10 | var networkStatus: NetworkStatus = .none 11 | var results: Results? 12 | var socketStringsOffline = [String?]() 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/AppScreens/RootScreen/RootAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum RootAction: Equatable { 5 | case authAction(AuthAction) 6 | case mainAction(MainAction) 7 | case viewDidLoad 8 | case viewWillAppear 9 | case viewWillDisappear 10 | case none 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/AppScreens/RootScreen/RootEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/AppScreens/RootScreen/RootReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let RootReducer = Reducer.combine( 5 | AuthReducer.pullback(state: \.authState, action: /RootAction.authAction, environment: { _ in 6 | .init() 7 | }), 8 | MainReducer.pullback(state: \.mainState, action: /RootAction.mainAction, environment: { _ in 9 | .init() 10 | }), 11 | Reducer { state, action, environment in 12 | switch action { 13 | case .authAction(.changeRootScreen(let screen)): 14 | state.rootScreen = screen 15 | case .mainAction(.changeRootScreen(let screen)): 16 | state = RootState() 17 | state.rootScreen = screen 18 | case .viewDidLoad: 19 | break 20 | case .viewWillAppear: 21 | break 22 | case .viewWillDisappear: 23 | break 24 | default: 25 | break 26 | } 27 | return .none 28 | } 29 | ) 30 | .debug() 31 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/AppScreens/RootScreen/RootState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootState: Equatable { 5 | var authState = AuthState() 6 | var mainState = MainState() 7 | var rootScreen: RootScreen = .main 8 | } 9 | 10 | enum RootScreen: Equatable { 11 | case main 12 | case auth 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/Models/SocketModels/SocketModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct SocketModel: Codable, Equatable where T: Codable, T: Equatable { 4 | var socketEvent : SocketEvent 5 | var value: T 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/Models/ViewModels/ViewTodoModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct TodoModel: Codable, Identifiable, Equatable { 4 | var id: UUID 5 | var title: String 6 | var isCompleted: Bool 7 | } 8 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/CoreApp/TodoApp/Views/ActivityIndicatorViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | final class ActivityIndicatorViewController: UIViewController { 4 | override func viewDidLoad() { 5 | super.viewDidLoad() 6 | // setupview 7 | self.view.backgroundColor = .systemBackground 8 | // activityIndicator 9 | let activityIndicator = UIActivityIndicatorView() 10 | activityIndicator.startAnimating() 11 | activityIndicator.translatesAutoresizingMaskIntoConstraints = false 12 | self.view.addSubview(activityIndicator) 13 | NSLayoutConstraint.activate([ 14 | activityIndicator.centerXAnchor.constraint( 15 | equalTo: self.view.safeAreaLayoutGuide.centerXAnchor), 16 | activityIndicator.centerYAnchor.constraint( 17 | equalTo: self.view.safeAreaLayoutGuide.centerYAnchor), 18 | ]) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoCombineUIKit13/TodoCombineUIKit13/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | import ComposableArchitecture 3 | 4 | @main 5 | struct TodoApp: App { 6 | var body: some Scene { 7 | WindowGroup { 8 | let vc = RootViewController() 9 | UIViewRepresented(makeUIView: { _ in vc.view }) } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/AuthAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum AuthAction: Equatable { 5 | case loginAction(LoginAction) 6 | case registerAction(RegisterAction) 7 | case viewDidLoad 8 | case viewWillAppear 9 | case viewWillDisappear 10 | case none 11 | case changeRootScreen(RootScreen) 12 | case setNavigation(isActive: Bool, screen: AuthScreen) 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/AuthEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/AuthState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthState: Equatable { 5 | var loginState: LoginState? 6 | var registerState: RegisterState? 7 | } 8 | 9 | enum AuthScreen: Equatable { 10 | case login 11 | case register 12 | case root 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum LoginAction: Equatable { 5 | case viewDidLoad 6 | case viewWillAppear 7 | case viewWillDisappear 8 | case none 9 | case loginSuccess 10 | } 11 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct LoginEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let LoginReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewDidLoad: 8 | break 9 | case .viewWillAppear: 10 | break 11 | case .viewWillDisappear: 12 | break 13 | default: 14 | break 15 | } 16 | return .none 17 | } 18 | ) 19 | .debug() 20 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct LoginState: Equatable { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum RegisterAction: Equatable { 5 | case viewDidLoad 6 | case viewWillAppear 7 | case viewWillDisappear 8 | case none 9 | case registerSuccess 10 | } 11 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RegisterEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let RegisterReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewDidLoad: 8 | break 9 | case .viewWillAppear: 10 | break 11 | case .viewWillDisappear: 12 | break 13 | default: 14 | break 15 | } 16 | return .none 17 | } 18 | ) 19 | .debug() 20 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RegisterState: Equatable { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/AppScreens/CounterScreen/CounterAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum CounterAction: Equatable { 5 | case viewDidLoad 6 | case viewWillAppear 7 | case viewWillDisappear 8 | case none 9 | case decrement 10 | case increment 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/AppScreens/CounterScreen/CounterEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct CounterEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/AppScreens/CounterScreen/CounterReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let CounterReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewDidLoad: 8 | break 9 | case .viewWillAppear: 10 | break 11 | case .viewWillDisappear: 12 | break 13 | case .decrement: 14 | state.count -= 1 15 | case .increment: 16 | state.count += 1 17 | default: 18 | break 19 | } 20 | return .none 21 | } 22 | ) 23 | .debug() 24 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/AppScreens/CounterScreen/CounterState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct CounterState: Equatable { 5 | var count = 0 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/AppScreens/MainScreen/MainEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | import ReactiveSwiftRequest 4 | import ReactiveSwiftWebSocket 5 | 6 | struct MainEnvironment { 7 | let urlString: String = "https://todolistappproj.herokuapp.com/todos" 8 | let status: NetworkReachabilityManager = NetworkReachabilityManager.default! 9 | init() { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/AppScreens/MainScreen/MainState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | import RealmSwift 4 | 5 | struct MainState: Equatable { 6 | var optionalCounterState: CounterState? 7 | var title: String = "" 8 | var todos: IdentifiedArrayOf = [] 9 | var isLoading: Bool = false 10 | var networkStatus: NetworkStatus = .none 11 | var results: Results? 12 | var socketStringsOffline = [String?]() 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/AppScreens/RootScreen/RootAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum RootAction: Equatable { 5 | case authAction(AuthAction) 6 | case mainAction(MainAction) 7 | case viewDidLoad 8 | case viewWillAppear 9 | case viewWillDisappear 10 | case none 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/AppScreens/RootScreen/RootEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/AppScreens/RootScreen/RootReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let RootReducer = Reducer.combine( 5 | AuthReducer.pullback(state: \.authState, action: /RootAction.authAction, environment: { _ in 6 | .init() 7 | }), 8 | MainReducer.pullback(state: \.mainState, action: /RootAction.mainAction, environment: { _ in 9 | .init() 10 | }), 11 | Reducer { state, action, environment in 12 | switch action { 13 | case .authAction(.changeRootScreen(let screen)): 14 | state.rootScreen = screen 15 | case .mainAction(.changeRootScreen(let screen)): 16 | state = RootState() 17 | state.rootScreen = screen 18 | case .viewDidLoad: 19 | break 20 | case .viewWillAppear: 21 | break 22 | case .viewWillDisappear: 23 | break 24 | default: 25 | break 26 | } 27 | return .none 28 | } 29 | ) 30 | .debug() 31 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/AppScreens/RootScreen/RootState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootState: Equatable { 5 | var authState = AuthState() 6 | var mainState = MainState() 7 | var rootScreen: RootScreen = .main 8 | } 9 | 10 | enum RootScreen: Equatable { 11 | case main 12 | case auth 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/Models/SocketModels/SocketModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct SocketModel: Codable, Equatable where T: Codable, T: Equatable { 4 | var socketEvent : SocketEvent 5 | var value: T 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/Models/ViewModels/ViewTodoModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct TodoModel: Codable, Identifiable, Equatable { 4 | var id: UUID 5 | var title: String 6 | var isCompleted: Bool 7 | } 8 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/CoreApp/TodoApp/Views/ActivityIndicatorViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | final class ActivityIndicatorViewController: UIViewController { 4 | override func viewDidLoad() { 5 | super.viewDidLoad() 6 | // setupview 7 | self.view.backgroundColor = .systemBackground 8 | // activityIndicator 9 | let activityIndicator = UIActivityIndicatorView() 10 | activityIndicator.startAnimating() 11 | activityIndicator.translatesAutoresizingMaskIntoConstraints = false 12 | self.view.addSubview(activityIndicator) 13 | NSLayoutConstraint.activate([ 14 | activityIndicator.centerXAnchor.constraint( 15 | equalTo: self.view.safeAreaLayoutGuide.centerXAnchor), 16 | activityIndicator.centerYAnchor.constraint( 17 | equalTo: self.view.safeAreaLayoutGuide.centerYAnchor), 18 | ]) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoReactiveSwiftUIKit13/TodoReactiveSwiftUIKit13/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | import UIKit 3 | import ComposableArchitecture 4 | 5 | @main 6 | struct TodoApp: App { 7 | var body: some Scene { 8 | WindowGroup { 9 | let vc = RootViewController() 10 | vc.toSwifUIView() 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/AuthAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum AuthAction: Equatable { 5 | case loginAction(LoginAction) 6 | case registerAction(RegisterAction) 7 | case viewDidLoad 8 | case viewWillAppear 9 | case viewWillDisappear 10 | case none 11 | case changeRootScreen(RootScreen) 12 | case setNavigation(isActive: Bool, screen: AuthScreen) 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/AuthEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/AuthState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthState: Equatable { 5 | var loginState: LoginState? 6 | var registerState: RegisterState? 7 | } 8 | 9 | enum AuthScreen: Equatable { 10 | case login 11 | case register 12 | case root 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum LoginAction: Equatable { 5 | case viewDidLoad 6 | case viewWillAppear 7 | case viewWillDisappear 8 | case none 9 | case loginSuccess 10 | } 11 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct LoginEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let LoginReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewDidLoad: 8 | break 9 | case .viewWillAppear: 10 | break 11 | case .viewWillDisappear: 12 | break 13 | default: 14 | break 15 | } 16 | return .none 17 | } 18 | ) 19 | .debug() 20 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/LoginScreen/LoginState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct LoginState: Equatable { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum RegisterAction: Equatable { 5 | case viewDidLoad 6 | case viewWillAppear 7 | case viewWillDisappear 8 | case none 9 | case registerSuccess 10 | } 11 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RegisterEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let RegisterReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewDidLoad: 8 | break 9 | case .viewWillAppear: 10 | break 11 | case .viewWillDisappear: 12 | break 13 | default: 14 | break 15 | } 16 | return .none 17 | } 18 | ) 19 | .debug() 20 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/AppScreens/AuthScreen/RegisterScreen/RegisterState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RegisterState: Equatable { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/AppScreens/CounterScreen/CounterAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum CounterAction: Equatable { 5 | case viewDidLoad 6 | case viewWillAppear 7 | case viewWillDisappear 8 | case none 9 | case decrement 10 | case increment 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/AppScreens/CounterScreen/CounterEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct CounterEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/AppScreens/CounterScreen/CounterReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let CounterReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewDidLoad: 8 | break 9 | case .viewWillAppear: 10 | break 11 | case .viewWillDisappear: 12 | break 13 | case .decrement: 14 | state.count -= 1 15 | case .increment: 16 | state.count += 1 17 | default: 18 | break 19 | } 20 | return .none 21 | } 22 | ) 23 | .debug() 24 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/AppScreens/CounterScreen/CounterState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct CounterState: Equatable { 5 | var count = 0 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/AppScreens/MainScreen/MainEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | import RxSwiftRequest 4 | import RxSwiftWebSocket 5 | 6 | struct MainEnvironment { 7 | let urlString: String = "https://todolistappproj.herokuapp.com/todos" 8 | let status: NetworkReachabilityManager = NetworkReachabilityManager.default! 9 | init() { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/AppScreens/MainScreen/MainState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | import RealmSwift 4 | 5 | struct MainState: Equatable { 6 | var optionalCounterState: CounterState? 7 | var title: String = "" 8 | var todos: IdentifiedArrayOf = [] 9 | var isLoading: Bool = false 10 | var networkStatus: NetworkStatus = .none 11 | var results: Results? 12 | var socketStringsOffline = [String?]() 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/AppScreens/RootScreen/RootAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum RootAction: Equatable { 5 | case authAction(AuthAction) 6 | case mainAction(MainAction) 7 | case viewDidLoad 8 | case viewWillAppear 9 | case viewWillDisappear 10 | case none 11 | } 12 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/AppScreens/RootScreen/RootEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/AppScreens/RootScreen/RootReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let RootReducer = Reducer.combine( 5 | AuthReducer.pullback(state: \.authState, action: /RootAction.authAction, environment: { _ in 6 | .init() 7 | }), 8 | MainReducer.pullback(state: \.mainState, action: /RootAction.mainAction, environment: { _ in 9 | .init() 10 | }), 11 | Reducer { state, action, environment in 12 | switch action { 13 | case .authAction(.changeRootScreen(let screen)): 14 | state.rootScreen = screen 15 | case .mainAction(.changeRootScreen(let screen)): 16 | state = RootState() 17 | state.rootScreen = screen 18 | case .viewDidLoad: 19 | break 20 | case .viewWillAppear: 21 | break 22 | case .viewWillDisappear: 23 | break 24 | default: 25 | break 26 | } 27 | return .none 28 | } 29 | ) 30 | .debug() 31 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/AppScreens/RootScreen/RootState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootState: Equatable { 5 | var authState = AuthState() 6 | var mainState = MainState() 7 | var rootScreen: RootScreen = .main 8 | } 9 | 10 | enum RootScreen: Equatable { 11 | case main 12 | case auth 13 | } 14 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/Models/SocketModels/SocketModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct SocketModel: Codable, Equatable where T: Codable, T: Equatable { 4 | var socketEvent : SocketEvent 5 | var value: T 6 | } 7 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/Models/ViewModels/BaseModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public protocol BaseModel: Codable, Identifiable, Equatable { 4 | 5 | associatedtype ID 6 | 7 | var id: ID { get set } 8 | } 9 | 10 | public extension BaseModel { 11 | func with(_ block: (inout Self) -> Void) -> Self { 12 | var clone = self 13 | block(&clone) 14 | return clone 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/Models/ViewModels/TodoModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct TodoModel: BaseModel { 4 | var id: UUID 5 | var title: String 6 | var isCompleted: Bool 7 | } 8 | 9 | import RxDataSources 10 | 11 | extension TodoModel: IdentifiableType { 12 | var identity: String { 13 | id.toString() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/CoreApp/TodoApp/Views/ActivityIndicatorViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | final class ActivityIndicatorViewController: UIViewController { 4 | override func viewDidLoad() { 5 | super.viewDidLoad() 6 | // setupview 7 | self.view.backgroundColor = .systemBackground 8 | // activityIndicator 9 | let activityIndicator = UIActivityIndicatorView() 10 | activityIndicator.startAnimating() 11 | activityIndicator.translatesAutoresizingMaskIntoConstraints = false 12 | self.view.addSubview(activityIndicator) 13 | NSLayoutConstraint.activate([ 14 | activityIndicator.centerXAnchor.constraint( 15 | equalTo: self.view.safeAreaLayoutGuide.centerXAnchor), 16 | activityIndicator.centerYAnchor.constraint( 17 | equalTo: self.view.safeAreaLayoutGuide.centerYAnchor), 18 | ]) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /AdvanceApp/UIKit13+/TodoRxSwiftUIKit13/TodoRxSwiftUIKit13/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /BasicApp/README.md: -------------------------------------------------------------------------------- 1 | # TodoList 2 | 3 | Examples App TodoList for Composable Architecture 4 | 5 | Technologies 6 | 7 | Architecture + Request 8 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/README.md: -------------------------------------------------------------------------------- 1 | 2 | # SwiftUI with ComposableArchitecture (iOS13+) 3 | 4 | 5 | ## Todo Combine SwiftUI 6 | 7 | SPM: 8 | 9 | - swift-composable-architecture 10 | https://github.com/FullStack-Swift/swift-composable-architecture 11 | - CombineRequest 12 | https://github.com/FullStack-Swift/Networking 13 | - ConvertSwift 14 | https://github.com/FullStack-Swift/SwiftExtension 15 | 16 | ## Todo ReactiveSwift SwiftUI 17 | 18 | SPM: 19 | 20 | - reactiveswift-composable-architecture 21 | https://github.com/FullStack-Swift/reactiveswift-composable-architecture 22 | - ReactiveSwiftRequest 23 | https://github.com/FullStack-Swift/Networking 24 | - ConvertSwift 25 | https://github.com/FullStack-Swift/SwiftExtension 26 | 27 | ## Todo RxSwift SwiftUI 28 | 29 | SPM: 30 | 31 | - rxswift-composable-architecture 32 | https://github.com/FullStack-Swift/rxswift-composable-architecture 33 | - RxSwiftRequest 34 | https://github.com/FullStack-Swift/Networking 35 | - ConvertSwift 36 | https://github.com/FullStack-Swift/SwiftExtension 37 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+Combine+SwiftUI/Shared/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+Combine+SwiftUI/Shared/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/Exports.swift: -------------------------------------------------------------------------------- 1 | @_exported import Transform 2 | @_exported import MCombineRequest 3 | @_exported import ComposableArchitecture 4 | @_exported import Json 5 | @_exported import SwiftLogger 6 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | @main 4 | struct TodoApp: App { 5 | var body: some Scene { 6 | WindowGroup { 7 | RootView() 8 | } 9 | } 10 | } 11 | 12 | public extension DependencyValues { 13 | var urlString: String { 14 | "http://127.0.0.1:8080/todos" 15 | } 16 | } 17 | 18 | public var isUsingPublisher: Bool = true 19 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+Combine+SwiftUI/Shared/CoreApp/TodoApp/Models/TodoModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct TodoModel: Codable, Identifiable, Equatable { 4 | var id: UUID 5 | var text: String 6 | var isCompleted: Bool 7 | } 8 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+Combine+SwiftUI/Todo+Combine+SwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+Combine+SwiftUI/Todo+Combine+SwiftUI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+Combine+SwiftUI/macOS/macOS.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | com.apple.security.network.client 10 | 11 | com.apple.security.network.server 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/Exports.swift: -------------------------------------------------------------------------------- 1 | @_exported import Transform 2 | @_exported import MReactiveSwiftRequest 3 | @_exported import ComposableArchitecture 4 | @_exported import Json 5 | @_exported import SwiftLogger 6 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | @main 4 | struct TodoApp: App { 5 | var body: some Scene { 6 | WindowGroup { 7 | RootView() 8 | } 9 | } 10 | } 11 | 12 | public extension DependencyValues { 13 | var urlString: String { 14 | "http://127.0.0.1:8080/todos" 15 | } 16 | } 17 | 18 | public var isUsingPublisher: Bool = true 19 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Shared/CoreApp/TodoApp/Models/TodoModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct TodoModel: Codable, Identifiable, Equatable { 4 | var id: UUID 5 | var text: String 6 | var isCompleted: Bool 7 | } 8 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Todo+ReactiveSwift+SwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/Todo+ReactiveSwift+SwiftUI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+ReactiveSwift+SwiftUI/macOS/macOS.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | com.apple.security.network.client 10 | 11 | com.apple.security.network.server 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/Exports.swift: -------------------------------------------------------------------------------- 1 | @_exported import Transform 2 | @_exported import MRxSwiftRequest 3 | @_exported import ComposableArchitecture 4 | @_exported import Json 5 | @_exported import SwiftLogger 6 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | 4 | @main 5 | struct TodoApp: App { 6 | var body: some Scene { 7 | WindowGroup { 8 | RootView() 9 | } 10 | } 11 | } 12 | 13 | public extension DependencyValues { 14 | var urlString: String { 15 | "http://127.0.0.1:8080/todos" 16 | } 17 | } 18 | 19 | public var isUsingPublisher: Bool = true 20 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+RxSwift+SwiftUI/Shared/CoreApp/TodoApp/Models/TodoModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct TodoModel: Codable, Identifiable, Equatable { 4 | var id: UUID 5 | var text: String 6 | var isCompleted: Bool 7 | } 8 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+RxSwift+SwiftUI/Todo+RxSwift+SwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+RxSwift+SwiftUI/Todo+RxSwift+SwiftUI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /BasicApp/SwiftUI/Todo+RxSwift+SwiftUI/macOS/macOS.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | com.apple.security.network.client 10 | 11 | com.apple.security.network.server 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11).xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11).xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | @main 4 | class AppDelegate: UIResponder, UIApplicationDelegate { 5 | 6 | var window: UIWindow? 7 | 8 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 9 | window = UIWindow(frame: UIScreen.main.bounds) 10 | self.window?.rootViewController = RootViewController() 11 | self.window?.makeKeyAndVisible() 12 | return true 13 | } 14 | 15 | // MARK: UISceneSession Lifecycle 16 | @available(iOS 13, *) 17 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 18 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 19 | } 20 | @available(iOS 13, *) 21 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/Assets.xcassets/check.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "outline_check_circle_black_48pt_1x.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "outline_check_circle_black_48pt_2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "outline_check_circle_black_48pt_3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | }, 23 | "properties" : { 24 | "template-rendering-intent" : "template" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/Assets.xcassets/check.imageset/outline_check_circle_black_48pt_1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/Assets.xcassets/check.imageset/outline_check_circle_black_48pt_1x.png -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/Assets.xcassets/check.imageset/outline_check_circle_black_48pt_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/Assets.xcassets/check.imageset/outline_check_circle_black_48pt_2x.png -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/Assets.xcassets/check.imageset/outline_check_circle_black_48pt_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/Assets.xcassets/check.imageset/outline_check_circle_black_48pt_3x.png -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/Assets.xcassets/uncheck.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "outline_radio_button_unchecked_black_48pt_1x.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "outline_radio_button_unchecked_black_48pt_2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "outline_radio_button_unchecked_black_48pt_3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | }, 23 | "properties" : { 24 | "template-rendering-intent" : "template" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/Assets.xcassets/uncheck.imageset/outline_radio_button_unchecked_black_48pt_1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/Assets.xcassets/uncheck.imageset/outline_radio_button_unchecked_black_48pt_1x.png -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/Assets.xcassets/uncheck.imageset/outline_radio_button_unchecked_black_48pt_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/Assets.xcassets/uncheck.imageset/outline_radio_button_unchecked_black_48pt_2x.png -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/Assets.xcassets/uncheck.imageset/outline_radio_button_unchecked_black_48pt_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/Assets.xcassets/uncheck.imageset/outline_radio_button_unchecked_black_48pt_3x.png -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIApplicationSceneManifest 6 | 7 | UIApplicationSupportsMultipleScenes 8 | 9 | UISceneConfigurations 10 | 11 | UIWindowSceneSessionRoleApplication 12 | 13 | 14 | UISceneConfigurationName 15 | Default Configuration 16 | UISceneDelegateClassName 17 | $(PRODUCT_MODULE_NAME).SceneDelegate 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | @available(iOS 13, *) 4 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 5 | 6 | var window: UIWindow? 7 | 8 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 9 | guard let _ = (scene as? UIWindowScene) else { return } 10 | self.window = (scene as? UIWindowScene).map(UIWindow.init(windowScene:)) 11 | self.window?.rootViewController = RootViewController() 12 | self.window?.makeKeyAndVisible() 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/AppScreens/AuthScreen/AuthAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum AuthAction: Equatable { 5 | case viewDidLoad 6 | case viewWillAppear 7 | case viewWillDisappear 8 | case none 9 | case login 10 | case changeRootScreen(RootScreen) 11 | } 12 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/AppScreens/AuthScreen/AuthEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/AppScreens/AuthScreen/AuthReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let AuthReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewDidLoad: 8 | break 9 | case .viewWillAppear: 10 | break 11 | case .viewWillDisappear: 12 | break 13 | case .login: 14 | return Effect(value: AuthAction.changeRootScreen(.main)) 15 | default: 16 | break 17 | } 18 | return .none 19 | } 20 | ) 21 | .debug() 22 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/AppScreens/AuthScreen/AuthState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthState: Equatable { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/AppScreens/MainScreen/MainAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum MainAction: Equatable { 5 | // MARK: - View Action 6 | /// lifecycle action 7 | case viewDidLoad 8 | case viewWillAppear 9 | case viewWillDisappear 10 | case viewDeinit 11 | /// navigation view 12 | case logout 13 | case changeRootScreen(RootScreen) 14 | 15 | /// binding 16 | case changeText(String) 17 | /// event network 18 | case viewCreateTodo 19 | case viewReloadTodo 20 | case viewToggleTodo(TodoModel) 21 | case viewDeleteTodo(TodoModel) 22 | // MARK: - Store Action 23 | case resetText 24 | /// network Action 25 | case getTodo 26 | case responseGetTodo(Data) 27 | case createOrUpdateTodo(TodoModel) 28 | case responseCreateOrUpdateTodo(Data) 29 | case updateTodo(TodoModel) 30 | case responseUpdateTodo(Data) 31 | case deleteTodo(TodoModel) 32 | case reponseDeleteTodo(Data) 33 | // MARK: - none 34 | case none 35 | } 36 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/AppScreens/MainScreen/MainEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct MainEnvironment { 5 | let urlString: String = "https://todolistappproj.herokuapp.com/todos" 6 | init() { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/AppScreens/MainScreen/MainState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct MainState: Equatable { 5 | var title: String = "" 6 | var todos: [TodoModel] = [] 7 | var isLoading: Bool = false 8 | } 9 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/AppScreens/RootScreen/RootAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum RootAction: Equatable { 5 | case authAction(AuthAction) 6 | case mainAction(MainAction) 7 | case viewDidLoad 8 | case viewWillAppear 9 | case viewWillDisappear 10 | case none 11 | } 12 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/AppScreens/RootScreen/RootEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/AppScreens/RootScreen/RootReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let RootReducer = Reducer.combine( 5 | AuthReducer.pullback(state: \.authState, action: /RootAction.authAction, environment: { _ in 6 | .init() 7 | }), 8 | MainReducer.pullback(state: \.mainState, action: /RootAction.mainAction, environment: { _ in 9 | .init() 10 | }), 11 | Reducer { state, action, environment in 12 | switch action { 13 | case .authAction(.changeRootScreen(let screen)): 14 | state.rootScreen = screen 15 | case .mainAction(.changeRootScreen(let screen)): 16 | state = RootState() 17 | state.rootScreen = screen 18 | case .viewDidLoad: 19 | break 20 | case .viewWillAppear: 21 | break 22 | case .viewWillDisappear: 23 | break 24 | default: 25 | break 26 | } 27 | return .none 28 | } 29 | ) 30 | .debug() 31 | 32 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/AppScreens/RootScreen/RootState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootState: Equatable { 5 | var authState = AuthState() 6 | var mainState = MainState() 7 | var rootScreen: RootScreen = .main 8 | } 9 | 10 | enum RootScreen: Equatable { 11 | case main 12 | case auth 13 | } 14 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/Extensions/BuildRequest/Core/ArrayRequestBuilder.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | @resultBuilder 4 | public enum ArrayRequestBuilder { 5 | public static func buildBlock(_ components: Element...) -> [Element] { 6 | components 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/Extensions/BuildRequest/Core/RequestBuilderProtocol.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public protocol RequestBuilderProtocol { 4 | func build(request: inout URLRequest) 5 | } 6 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/Extensions/BuildRequest/Request.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | final public class CreateRequest { 4 | private var parameter: RequestBuilderProtocol 5 | private var urlRequest: URLRequest 6 | 7 | public init( 8 | urlRequest: URLRequest? = nil, 9 | @RequestBuilder builder: () -> RequestBuilderProtocol 10 | ) { 11 | self.urlRequest = urlRequest ?? URLRequest(url: URL(string: "https://")!) 12 | self.parameter = builder() 13 | parameter.build(request: &self.urlRequest) 14 | } 15 | 16 | public var value: URLRequest { 17 | urlRequest 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/Extensions/BuildRequest/RequestBuilds/RBaseURL.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public struct RBaseUrl: RequestBuilderProtocol { 4 | let urlString: String 5 | 6 | public init(urlString: String) { 7 | self.urlString = urlString 8 | } 9 | 10 | public func build(request: inout URLRequest) { 11 | request.url = URL(string: urlString) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/Extensions/BuildRequest/RequestBuilds/REncoding.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Alamofire 3 | 4 | public struct REncoding: RequestBuilderProtocol { 5 | let encoding: ParameterEncoding 6 | 7 | public init(_ type: RTypeEncoding = .url) { 8 | switch type { 9 | case .json: 10 | encoding = JSONEncoding.default 11 | case .url: 12 | encoding = URLEncoding.default 13 | } 14 | } 15 | 16 | public func build(request: inout URLRequest) { 17 | let parameter = request.httpBody?.toDictionary() 18 | if let newRequest = try? encoding.encode(request, with: parameter) { 19 | request = newRequest 20 | } 21 | } 22 | } 23 | 24 | public enum RTypeEncoding { 25 | case json 26 | case url 27 | } 28 | 29 | extension Data { 30 | func toDictionary() -> [String: Any]? { 31 | do { 32 | let json = try JSONSerialization.jsonObject(with: self) 33 | return json as? [String: Any] 34 | } catch { 35 | return nil 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/Extensions/BuildRequest/RequestBuilds/RHeaders.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Alamofire 3 | 4 | public struct RHeaders: RequestBuilderProtocol { 5 | let headers: HTTPHeaders 6 | 7 | public init(headers: HTTPHeaders) { 8 | self.headers = headers 9 | } 10 | 11 | public func build(request: inout URLRequest) { 12 | request.allHTTPHeaderFields = headers.dictionary 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/Extensions/BuildRequest/RequestBuilds/RMethod.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Alamofire 3 | 4 | public struct RMethod: RequestBuilderProtocol { 5 | let httpMethod: HTTPMethod? 6 | 7 | public init(_ httpMethod: HTTPMethod) { 8 | self.httpMethod = httpMethod 9 | } 10 | 11 | public func build(request: inout URLRequest) { 12 | request.method = self.httpMethod 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/Extensions/BuildRequest/RequestBuilds/RPath.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public struct RPath: RequestBuilderProtocol { 4 | let path: String? 5 | 6 | public init(path: String?) { 7 | self.path = path 8 | } 9 | 10 | public func build(request: inout URLRequest) { 11 | guard let urlString = request.url?.absoluteString else { 12 | return 13 | } 14 | guard let path = path else { 15 | return 16 | } 17 | request.url = URL(string: (urlString + "/" + path)) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/Extensions/BuildRequest/RequestBuilds/RUrl.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public struct RUrl: RequestBuilderProtocol { 4 | let urlString: String 5 | 6 | public init(urlString: String) { 7 | self.urlString = urlString 8 | } 9 | 10 | public func build(request: inout URLRequest) { 11 | request.url = URL(string: urlString) 12 | } 13 | } 14 | 15 | public extension RUrl { 16 | func withPath(_ path: String?) -> RUrl { 17 | if let path = path { 18 | return .init(urlString: (urlString + "/" + path)) 19 | } else { 20 | return self 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/Extensions/BuildRequest/RequestBuilds/Rbody.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public struct Rbody: RequestBuilderProtocol { 4 | var data: Data? 5 | 6 | public init(_ data: Data?) { 7 | self.data = data 8 | } 9 | 10 | public func build(request: inout URLRequest) { 11 | request.httpBody = data 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/Extensions/View+.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | extension UITableViewCell { 4 | static var withIdentifier: String { 5 | return String(describing: Self.self) 6 | } 7 | } 8 | 9 | extension UITableView { 10 | func dequeueReusableCell(_ type: T.Type, for indexPath: IndexPath) -> T { 11 | dequeueReusableCell(withIdentifier: type.withIdentifier, for: indexPath) as! T 12 | } 13 | 14 | func register(_ type: T.Type) { 15 | register(type, forCellReuseIdentifier: type.withIdentifier) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/Models/TodoModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct TodoModel: Codable, Identifiable, Equatable { 4 | var id: UUID 5 | var title: String 6 | var isCompleted: Bool 7 | } 8 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/Views/BaseMainTableViewCell.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import OpenCombine 3 | 4 | class BaseMainTableViewCell: UITableViewCell { 5 | 6 | var cancellables: Set = [] 7 | 8 | override func prepareForReuse() { 9 | super.prepareForReuse() 10 | cancellables = [] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+Combine+UIKit(iOS11)/Todo+Combine+UIKit(iOS11)/TodoApp/Views/BaseViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import OpenCombine 3 | 4 | class BaseViewController: UIViewController { 5 | 6 | var cancellables: Set = [] 7 | 8 | } 9 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11).xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11).xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/Assets.xcassets/check.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "outline_check_circle_black_48pt_1x.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "outline_check_circle_black_48pt_2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "outline_check_circle_black_48pt_3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | }, 23 | "properties" : { 24 | "template-rendering-intent" : "template" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/Assets.xcassets/check.imageset/outline_check_circle_black_48pt_1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/Assets.xcassets/check.imageset/outline_check_circle_black_48pt_1x.png -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/Assets.xcassets/check.imageset/outline_check_circle_black_48pt_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/Assets.xcassets/check.imageset/outline_check_circle_black_48pt_2x.png -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/Assets.xcassets/check.imageset/outline_check_circle_black_48pt_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/Assets.xcassets/check.imageset/outline_check_circle_black_48pt_3x.png -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/Assets.xcassets/uncheck.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "outline_radio_button_unchecked_black_48pt_1x.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "outline_radio_button_unchecked_black_48pt_2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "outline_radio_button_unchecked_black_48pt_3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | }, 23 | "properties" : { 24 | "template-rendering-intent" : "template" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/Assets.xcassets/uncheck.imageset/outline_radio_button_unchecked_black_48pt_1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/Assets.xcassets/uncheck.imageset/outline_radio_button_unchecked_black_48pt_1x.png -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/Assets.xcassets/uncheck.imageset/outline_radio_button_unchecked_black_48pt_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/Assets.xcassets/uncheck.imageset/outline_radio_button_unchecked_black_48pt_2x.png -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/Assets.xcassets/uncheck.imageset/outline_radio_button_unchecked_black_48pt_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/Assets.xcassets/uncheck.imageset/outline_radio_button_unchecked_black_48pt_3x.png -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIApplicationSceneManifest 6 | 7 | UIApplicationSupportsMultipleScenes 8 | 9 | UISceneConfigurations 10 | 11 | UIWindowSceneSessionRoleApplication 12 | 13 | 14 | UISceneConfigurationName 15 | Default Configuration 16 | UISceneDelegateClassName 17 | $(PRODUCT_MODULE_NAME).SceneDelegate 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | @available(iOS 13, *) 4 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 5 | 6 | var window: UIWindow? 7 | 8 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 9 | guard let _ = (scene as? UIWindowScene) else { return } 10 | self.window = (scene as? UIWindowScene).map(UIWindow.init(windowScene:)) 11 | self.window?.rootViewController = RootViewController() 12 | self.window?.makeKeyAndVisible() 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/TodoApp/AppScreens/AuthScreen/AuthAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum AuthAction: Equatable { 5 | case viewDidLoad 6 | case viewWillAppear 7 | case viewWillDisappear 8 | case none 9 | case login 10 | case changeRootScreen(RootScreen) 11 | } 12 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/TodoApp/AppScreens/AuthScreen/AuthEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/TodoApp/AppScreens/AuthScreen/AuthReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let AuthReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewDidLoad: 8 | break 9 | case .viewWillAppear: 10 | break 11 | case .viewWillDisappear: 12 | break 13 | case .login: 14 | return Effect(value: AuthAction.changeRootScreen(.main)) 15 | default: 16 | break 17 | } 18 | return .none 19 | } 20 | ) 21 | .debug() 22 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/TodoApp/AppScreens/AuthScreen/AuthState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthState: Equatable { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/TodoApp/AppScreens/MainScreen/MainAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum MainAction: Equatable { 5 | // MARK: - View Action 6 | /// lifecycle action 7 | case viewDidLoad 8 | case viewWillAppear 9 | case viewWillDisappear 10 | case viewDeinit 11 | /// navigation view 12 | case logout 13 | case changeRootScreen(RootScreen) 14 | 15 | /// binding 16 | case changeText(String) 17 | /// event network 18 | case viewCreateTodo 19 | case viewReloadTodo 20 | case viewToggleTodo(TodoModel) 21 | case viewDeleteTodo(TodoModel) 22 | // MARK: - Store Action 23 | case resetText 24 | /// network Action 25 | case getTodo 26 | case responseGetTodo(Data) 27 | case createOrUpdateTodo(TodoModel) 28 | case responseCreateOrUpdateTodo(Data) 29 | case updateTodo(TodoModel) 30 | case responseUpdateTodo(Data) 31 | case deleteTodo(TodoModel) 32 | case reponseDeleteTodo(Data) 33 | // MARK: - none 34 | case none 35 | } 36 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/TodoApp/AppScreens/MainScreen/MainEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct MainEnvironment { 5 | let urlString: String = "https://todolistappproj.herokuapp.com/todos" 6 | init() { 7 | } 8 | } 9 | 10 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/TodoApp/AppScreens/MainScreen/MainState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct MainState: Equatable { 5 | var title: String = "" 6 | var todos: [TodoModel] = [] 7 | var isLoading: Bool = false 8 | } 9 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/TodoApp/AppScreens/RootScreen/RootAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum RootAction: Equatable { 5 | case authAction(AuthAction) 6 | case mainAction(MainAction) 7 | case viewDidLoad 8 | case viewWillAppear 9 | case viewWillDisappear 10 | case none 11 | } 12 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/TodoApp/AppScreens/RootScreen/RootEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/TodoApp/AppScreens/RootScreen/RootReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let RootReducer = Reducer.combine( 5 | AuthReducer.pullback(state: \.authState, action: /RootAction.authAction, environment: { _ in 6 | .init() 7 | }), 8 | MainReducer.pullback(state: \.mainState, action: /RootAction.mainAction, environment: { _ in 9 | .init() 10 | }), 11 | Reducer { state, action, environment in 12 | switch action { 13 | case .authAction(.changeRootScreen(let screen)): 14 | state.rootScreen = screen 15 | case .mainAction(.changeRootScreen(let screen)): 16 | state = RootState() 17 | state.rootScreen = screen 18 | case .viewDidLoad: 19 | break 20 | case .viewWillAppear: 21 | break 22 | case .viewWillDisappear: 23 | break 24 | default: 25 | break 26 | } 27 | return .none 28 | } 29 | ) 30 | .debug() 31 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/TodoApp/AppScreens/RootScreen/RootState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootState: Equatable { 5 | var authState = AuthState() 6 | var mainState = MainState() 7 | var rootScreen: RootScreen = .main 8 | } 9 | 10 | enum RootScreen: Equatable { 11 | case main 12 | case auth 13 | } 14 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/TodoApp/Extensions/View+.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | extension UITableViewCell { 4 | static var withIdentifier: String { 5 | return String(describing: Self.self) 6 | } 7 | } 8 | 9 | extension UITableView { 10 | func dequeueReusableCell(_ type: T.Type, for indexPath: IndexPath) -> T { 11 | dequeueReusableCell(withIdentifier: type.withIdentifier, for: indexPath) as! T 12 | } 13 | 14 | func register(_ type: T.Type) { 15 | register(type, forCellReuseIdentifier: type.withIdentifier) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/TodoApp/Models/TodoModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct TodoModel: Codable, Identifiable, Equatable { 4 | var id: UUID 5 | var title: String 6 | var isCompleted: Bool 7 | } 8 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/TodoApp/Views/BaseMainTableViewCell.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import ReactiveSwift 3 | 4 | class BaseMainTableViewCell: UITableViewCell { 5 | 6 | private(set) var disposables = CompositeDisposable() 7 | 8 | override func prepareForReuse() { 9 | super.prepareForReuse() 10 | disposables.dispose() 11 | disposables = CompositeDisposable() 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+ReactiveSwift+UIKit(iOS11)/Todo+ReactiveSwift+UIKit(iOS11)/TodoApp/Views/BaseViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import ReactiveSwift 3 | 4 | class BaseViewController: UIViewController { 5 | 6 | var disposables = CompositeDisposable() 7 | 8 | } 9 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11).xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11).xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | @main 4 | class AppDelegate: UIResponder, UIApplicationDelegate { 5 | 6 | var window: UIWindow? 7 | 8 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 9 | window = UIWindow(frame: UIScreen.main.bounds) 10 | self.window?.rootViewController = RootViewController() 11 | self.window?.makeKeyAndVisible() 12 | return true 13 | } 14 | 15 | // MARK: UISceneSession Lifecycle 16 | @available(iOS 13, *) 17 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 18 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 19 | } 20 | @available(iOS 13, *) 21 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/Assets.xcassets/check.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "outline_check_circle_black_48pt_1x.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "outline_check_circle_black_48pt_2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "outline_check_circle_black_48pt_3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | }, 23 | "properties" : { 24 | "template-rendering-intent" : "template" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/Assets.xcassets/check.imageset/outline_check_circle_black_48pt_1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/Assets.xcassets/check.imageset/outline_check_circle_black_48pt_1x.png -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/Assets.xcassets/check.imageset/outline_check_circle_black_48pt_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/Assets.xcassets/check.imageset/outline_check_circle_black_48pt_2x.png -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/Assets.xcassets/check.imageset/outline_check_circle_black_48pt_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/Assets.xcassets/check.imageset/outline_check_circle_black_48pt_3x.png -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/Assets.xcassets/uncheck.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "outline_radio_button_unchecked_black_48pt_1x.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "outline_radio_button_unchecked_black_48pt_2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "outline_radio_button_unchecked_black_48pt_3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | }, 23 | "properties" : { 24 | "template-rendering-intent" : "template" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/Assets.xcassets/uncheck.imageset/outline_radio_button_unchecked_black_48pt_1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/Assets.xcassets/uncheck.imageset/outline_radio_button_unchecked_black_48pt_1x.png -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/Assets.xcassets/uncheck.imageset/outline_radio_button_unchecked_black_48pt_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/Assets.xcassets/uncheck.imageset/outline_radio_button_unchecked_black_48pt_2x.png -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/Assets.xcassets/uncheck.imageset/outline_radio_button_unchecked_black_48pt_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/Assets.xcassets/uncheck.imageset/outline_radio_button_unchecked_black_48pt_3x.png -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIApplicationSceneManifest 6 | 7 | UIApplicationSupportsMultipleScenes 8 | 9 | UISceneConfigurations 10 | 11 | UIWindowSceneSessionRoleApplication 12 | 13 | 14 | UISceneConfigurationName 15 | Default Configuration 16 | UISceneDelegateClassName 17 | $(PRODUCT_MODULE_NAME).SceneDelegate 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | @available(iOS 13, *) 4 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 5 | 6 | var window: UIWindow? 7 | 8 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 9 | guard let _ = (scene as? UIWindowScene) else { return } 10 | self.window = (scene as? UIWindowScene).map(UIWindow.init(windowScene:)) 11 | self.window?.rootViewController = RootViewController() 12 | self.window?.makeKeyAndVisible() 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/TodoApp/AppScreens/AuthScreen/AuthAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum AuthAction: Equatable { 5 | case viewDidLoad 6 | case viewWillAppear 7 | case viewWillDisappear 8 | case none 9 | case login 10 | case changeRootScreen(RootScreen) 11 | } 12 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/TodoApp/AppScreens/AuthScreen/AuthEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/TodoApp/AppScreens/AuthScreen/AuthReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let AuthReducer = Reducer.combine( 5 | Reducer { state, action, environment in 6 | switch action { 7 | case .viewDidLoad: 8 | break 9 | case .viewWillAppear: 10 | break 11 | case .viewWillDisappear: 12 | break 13 | case .login: 14 | return Effect(value: AuthAction.changeRootScreen(.main)) 15 | default: 16 | break 17 | } 18 | return .none 19 | } 20 | ) 21 | .debug() 22 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/TodoApp/AppScreens/AuthScreen/AuthState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct AuthState: Equatable { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/TodoApp/AppScreens/MainScreen/MainAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum MainAction: Equatable { 5 | // MARK: - View Action 6 | /// lifecycle action 7 | case viewDidLoad 8 | case viewWillAppear 9 | case viewWillDisappear 10 | case viewDeinit 11 | /// navigation view 12 | case logout 13 | case changeRootScreen(RootScreen) 14 | 15 | /// binding 16 | case changeText(String) 17 | /// event network 18 | case viewCreateTodo 19 | case viewReloadTodo 20 | case viewToggleTodo(TodoModel) 21 | case viewDeleteTodo(TodoModel) 22 | // MARK: - Store Action 23 | case resetText 24 | /// network Action 25 | case getTodo 26 | case responseGetTodo(Data) 27 | case createOrUpdateTodo(TodoModel) 28 | case responseCreateOrUpdateTodo(Data) 29 | case updateTodo(TodoModel) 30 | case responseUpdateTodo(Data) 31 | case deleteTodo(TodoModel) 32 | case reponseDeleteTodo(Data) 33 | // MARK: - none 34 | case none 35 | } 36 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/TodoApp/AppScreens/MainScreen/MainEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct MainEnvironment { 5 | let urlString: String = "https://todolistappproj.herokuapp.com/todos" 6 | init() { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/TodoApp/AppScreens/MainScreen/MainState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct MainState: Equatable { 5 | var title: String = "" 6 | var todos: [TodoModel] = [] 7 | var isLoading: Bool = false 8 | } 9 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/TodoApp/AppScreens/RootScreen/RootAction.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | enum RootAction: Equatable { 5 | case authAction(AuthAction) 6 | case mainAction(MainAction) 7 | case viewDidLoad 8 | case viewWillAppear 9 | case viewWillDisappear 10 | case none 11 | } 12 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/TodoApp/AppScreens/RootScreen/RootEnvironment.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootEnvironment { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/TodoApp/AppScreens/RootScreen/RootReducer.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | let RootReducer = Reducer.combine( 5 | AuthReducer.pullback(state: \.authState, action: /RootAction.authAction, environment: { _ in 6 | .init() 7 | }), 8 | MainReducer.pullback(state: \.mainState, action: /RootAction.mainAction, environment: { _ in 9 | .init() 10 | }), 11 | Reducer { state, action, environment in 12 | switch action { 13 | case .authAction(.changeRootScreen(let screen)): 14 | state.rootScreen = screen 15 | case .mainAction(.changeRootScreen(let screen)): 16 | state = RootState() 17 | state.rootScreen = screen 18 | case .viewDidLoad: 19 | break 20 | case .viewWillAppear: 21 | break 22 | case .viewWillDisappear: 23 | break 24 | default: 25 | break 26 | } 27 | return .none 28 | } 29 | ) 30 | .debug() 31 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/TodoApp/AppScreens/RootScreen/RootState.swift: -------------------------------------------------------------------------------- 1 | import ComposableArchitecture 2 | import Foundation 3 | 4 | struct RootState: Equatable { 5 | var authState = AuthState() 6 | var mainState = MainState() 7 | var rootScreen: RootScreen = .main 8 | } 9 | 10 | enum RootScreen: Equatable { 11 | case main 12 | case auth 13 | } 14 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/TodoApp/Extensions/View+.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | extension UITableViewCell { 4 | static var withIdentifier: String { 5 | return String(describing: Self.self) 6 | } 7 | } 8 | 9 | extension UITableView { 10 | func dequeueReusableCell(_ type: T.Type, for indexPath: IndexPath) -> T { 11 | dequeueReusableCell(withIdentifier: type.withIdentifier, for: indexPath) as! T 12 | } 13 | 14 | func register(_ type: T.Type) { 15 | register(type, forCellReuseIdentifier: type.withIdentifier) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/TodoApp/Models/TodoModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct TodoModel: Codable, Identifiable, Equatable { 4 | var id: UUID 5 | var title: String 6 | var isCompleted: Bool 7 | } 8 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/TodoApp/Views/BaseMainTableViewCell.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import RxSwift 3 | 4 | class BaseMainTableViewCell: UITableViewCell { 5 | 6 | var disposeBag = DisposeBag() 7 | 8 | override func prepareForReuse() { 9 | super.prepareForReuse() 10 | disposeBag = DisposeBag() 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /BasicApp/UIKit11+/Todo+RxSwift+UIKit(iOS11)/Todo+RxSwift+UIKit(iOS11)/TodoApp/Views/BaseViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import RxSwift 3 | 4 | class BaseViewController: UIViewController { 5 | 6 | var disposeBag = DisposeBag() 7 | 8 | } 9 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+Combine+UIKit(iOS13)/Todo+Combine+UIKit(iOS13).xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+Combine+UIKit(iOS13)/Todo+Combine+UIKit(iOS13).xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+Combine+UIKit(iOS13)/Todo+Combine+UIKit(iOS13)/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+Combine+UIKit(iOS13)/Todo+Combine+UIKit(iOS13)/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+Combine+UIKit(iOS13)/Todo+Combine+UIKit(iOS13)/CoreApp/TodoApp.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | @_exported import ComposableArchitecture 3 | @_exported import MCombineRequest 4 | @_exported import Combine 5 | @_exported import CombineCocoa 6 | @_exported import Transform 7 | 8 | @main 9 | struct TodoApp: App { 10 | var body: some Scene { 11 | WindowGroup { 12 | RootViewController().toSwiftUI() 13 | } 14 | } 15 | } 16 | 17 | public extension DependencyValues { 18 | var urlString: String { 19 | "http://127.0.0.1:8080/todos" 20 | } 21 | } 22 | 23 | public var isUsingPublisher: Bool = true 24 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+Combine+UIKit(iOS13)/Todo+Combine+UIKit(iOS13)/CoreApp/TodoApp/Bases/BaseTableViewCell.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Combine 3 | 4 | class BaseTableViewCell: UITableViewCell { 5 | 6 | var cancellables: Set = [] 7 | 8 | override func prepareForReuse() { 9 | super.prepareForReuse() 10 | cancellables = [] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+Combine+UIKit(iOS13)/Todo+Combine+UIKit(iOS13)/CoreApp/TodoApp/Bases/BaseViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Combine 3 | 4 | open class BaseViewController: UIViewController { 5 | 6 | var cancellables: Set = [] 7 | 8 | } 9 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+Combine+UIKit(iOS13)/Todo+Combine+UIKit(iOS13)/CoreApp/TodoApp/Models/TodoModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct TodoModel: Codable, Identifiable, Equatable { 4 | var id: UUID 5 | var text: String 6 | var isCompleted: Bool 7 | } 8 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+Combine+UIKit(iOS13)/Todo+Combine+UIKit(iOS13)/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+ReactiveSwift+UIKit(iOS13)/Todo+ReactiveSwift+UIKit(iOS13).xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+ReactiveSwift+UIKit(iOS13)/Todo+ReactiveSwift+UIKit(iOS13).xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+ReactiveSwift+UIKit(iOS13)/Todo+ReactiveSwift+UIKit(iOS13)/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+ReactiveSwift+UIKit(iOS13)/Todo+ReactiveSwift+UIKit(iOS13)/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+ReactiveSwift+UIKit(iOS13)/Todo+ReactiveSwift+UIKit(iOS13)/CoreApp/TodoApp.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | @_exported import ComposableArchitecture 3 | @_exported import MReactiveSwiftRequest 4 | @_exported import ReactiveSwift 5 | @_exported import ReactiveCocoa 6 | @_exported import Transform 7 | 8 | @main 9 | struct TodoApp: App { 10 | var body: some Scene { 11 | WindowGroup { 12 | RootViewController().toSwiftUI() 13 | } 14 | } 15 | } 16 | 17 | public extension DependencyValues { 18 | var urlString: String { 19 | "http://127.0.0.1:8080/todos" 20 | } 21 | } 22 | 23 | public var isUsingPublisher: Bool = true 24 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+ReactiveSwift+UIKit(iOS13)/Todo+ReactiveSwift+UIKit(iOS13)/CoreApp/TodoApp/Bases/BaseTableViewCell.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import ReactiveSwift 3 | 4 | class BaseTableViewCell: UITableViewCell { 5 | 6 | private(set) var disposables = CompositeDisposable() 7 | 8 | override func prepareForReuse() { 9 | super.prepareForReuse() 10 | disposables.dispose() 11 | disposables = CompositeDisposable() 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+ReactiveSwift+UIKit(iOS13)/Todo+ReactiveSwift+UIKit(iOS13)/CoreApp/TodoApp/Bases/BaseViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import ReactiveSwift 3 | 4 | class BaseViewController: UIViewController { 5 | 6 | var disposables = CompositeDisposable() 7 | 8 | } 9 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+ReactiveSwift+UIKit(iOS13)/Todo+ReactiveSwift+UIKit(iOS13)/CoreApp/TodoApp/Models/TodoModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct TodoModel: Codable, Identifiable, Equatable { 4 | var id: UUID 5 | var text: String 6 | var isCompleted: Bool 7 | } 8 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+ReactiveSwift+UIKit(iOS13)/Todo+ReactiveSwift+UIKit(iOS13)/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+RxSwift+UIKit(iOS13)/Todo+RxSwift+UIKit(iOS13).xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+RxSwift+UIKit(iOS13)/Todo+RxSwift+UIKit(iOS13).xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+RxSwift+UIKit(iOS13)/Todo+RxSwift+UIKit(iOS13)/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+RxSwift+UIKit(iOS13)/Todo+RxSwift+UIKit(iOS13)/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+RxSwift+UIKit(iOS13)/Todo+RxSwift+UIKit(iOS13)/CoreApp/TodoApp.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | @_exported import ComposableArchitecture 3 | @_exported import MRxSwiftRequest 4 | @_exported import RxCocoa 5 | @_exported import RxSwift 6 | @_exported import Transform 7 | 8 | @main 9 | struct TodoApp: App { 10 | var body: some Scene { 11 | WindowGroup { 12 | RootViewController().toSwiftUI() 13 | } 14 | } 15 | } 16 | 17 | public extension DependencyValues { 18 | var urlString: String { 19 | "http://127.0.0.1:8080/todos" 20 | } 21 | } 22 | 23 | public var isUsingPublisher: Bool = true 24 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+RxSwift+UIKit(iOS13)/Todo+RxSwift+UIKit(iOS13)/CoreApp/TodoApp/Bases/BaseTableViewCell.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import RxSwift 3 | 4 | class BaseTableViewCell: UITableViewCell { 5 | 6 | var disposeBag = DisposeBag() 7 | 8 | override func prepareForReuse() { 9 | super.prepareForReuse() 10 | disposeBag = DisposeBag() 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+RxSwift+UIKit(iOS13)/Todo+RxSwift+UIKit(iOS13)/CoreApp/TodoApp/Bases/BaseViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import RxSwift 3 | 4 | class BaseViewController: UIViewController { 5 | 6 | var disposeBag = DisposeBag() 7 | 8 | } 9 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+RxSwift+UIKit(iOS13)/Todo+RxSwift+UIKit(iOS13)/CoreApp/TodoApp/Models/TodoModel.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct TodoModel: Codable, Identifiable, Equatable { 4 | var id: UUID 5 | var text: String 6 | var isCompleted: Bool 7 | } 8 | -------------------------------------------------------------------------------- /BasicApp/UIKit13+/Todo+RxSwift+UIKit(iOS13)/Todo+RxSwift+UIKit(iOS13)/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Screenshots/Screenshot 2022-01-27 at 3.08.25 PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/Screenshots/Screenshot 2022-01-27 at 3.08.25 PM.png -------------------------------------------------------------------------------- /Screenshots/Simulator Screen Shot - iPhone 13 Pro Max - 2022-01-27 at 14.50.24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/Screenshots/Simulator Screen Shot - iPhone 13 Pro Max - 2022-01-27 at 14.50.24.png -------------------------------------------------------------------------------- /Screenshots/Simulator Screen Shot - iPhone 13 Pro Max - 2022-02-05 at 19.04.34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/Screenshots/Simulator Screen Shot - iPhone 13 Pro Max - 2022-02-05 at 19.04.34.png -------------------------------------------------------------------------------- /TodoListServer/.dockerignore: -------------------------------------------------------------------------------- 1 | .build/ 2 | .swiftpm/ 3 | -------------------------------------------------------------------------------- /TodoListServer/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TodoListServer/Public/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/TodoListServer/Public/.gitkeep -------------------------------------------------------------------------------- /TodoListServer/Sources/App/Controllers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/TodoListServer/Sources/App/Controllers/.gitkeep -------------------------------------------------------------------------------- /TodoListServer/Sources/App/Migrations/CreateTodo.swift: -------------------------------------------------------------------------------- 1 | import Fluent 2 | 3 | struct CreateTodo: AsyncMigration { 4 | func prepare(on database: Database) async throws { 5 | try await database.schema("todos") 6 | .id() 7 | .field("text", .string, .required) 8 | .field("isCompleted", .bool, .required) 9 | .create() 10 | } 11 | 12 | func revert(on database: Database) async throws { 13 | try await database.schema("todos").delete() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /TodoListServer/Sources/App/Models/Todo.swift: -------------------------------------------------------------------------------- 1 | import Fluent 2 | import Vapor 3 | 4 | final class Todo: Model, Content { 5 | static let schema = "todos" 6 | 7 | @ID(key: .id) 8 | var id: UUID? 9 | 10 | @Field(key: "text") 11 | var text: String 12 | 13 | @Field(key: "isCompleted") 14 | var isCompleted: Bool 15 | 16 | init() { } 17 | 18 | init(id: UUID? = nil, text: String, isCompleted: Bool) { 19 | self.id = id 20 | self.text = text 21 | self.isCompleted = isCompleted 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /TodoListServer/Sources/App/configure.swift: -------------------------------------------------------------------------------- 1 | import NIOSSL 2 | import Fluent 3 | import FluentSQLiteDriver 4 | import Vapor 5 | 6 | // configures your application 7 | public func configure(_ app: Application) async throws { 8 | // uncomment to serve files from /Public folder 9 | // app.middleware.use(FileMiddleware(publicDirectory: app.directory.publicDirectory)) 10 | 11 | app.databases.use(.sqlite(.file("db.sqlite")), as: .sqlite) 12 | 13 | app.migrations.add(CreateTodo()) 14 | try await app.autoMigrate() 15 | 16 | // register routes 17 | try routes(app) 18 | } 19 | -------------------------------------------------------------------------------- /TodoListServer/Sources/App/routes.swift: -------------------------------------------------------------------------------- 1 | import Fluent 2 | import Vapor 3 | 4 | func routes(_ app: Application) throws { 5 | app.get { req async in 6 | "It works!" 7 | } 8 | 9 | app.get("hello") { req async -> String in 10 | "Hello, world!" 11 | } 12 | 13 | try app.register(collection: TodoController()) 14 | } 15 | -------------------------------------------------------------------------------- /TodoListServer/Tests/AppTests/AppTests.swift: -------------------------------------------------------------------------------- 1 | @testable import App 2 | import XCTVapor 3 | 4 | final class AppTests: XCTestCase { 5 | func testHelloWorld() async throws { 6 | let app = Application(.testing) 7 | defer { app.shutdown() } 8 | try await configure(app) 9 | 10 | try app.test(.GET, "hello", afterResponse: { res in 11 | XCTAssertEqual(res.status, .ok) 12 | XCTAssertEqual(res.body.string, "Hello, world!") 13 | }) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /TodoListServer/db.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FullStack-Swift/TodoList/3453e5376790d9c45970b80074fb3ba74716b906/TodoListServer/db.sqlite --------------------------------------------------------------------------------