commit 8247ccf65fa952b9d220487c7f32083192229da4 Author: Maksim Smirnov Date: Mon Aug 4 09:53:13 2025 +0200 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4ba4b7b --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +Derived/* +*.xcodeproj/ +*.xcworkspace/ +.DS_Store +buildServer.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..86310f4 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "files.exclude": { + ".jj": true, + "Derived/": true, + "*.xcodeproj": true, + "*.xcworkspace": true + } +} \ No newline at end of file diff --git a/Project.swift b/Project.swift new file mode 100644 index 0000000..997a614 --- /dev/null +++ b/Project.swift @@ -0,0 +1,34 @@ +import ProjectDescription + +let project = Project( + name: "StandbyCal", + targets: [ + .target( + name: "StandbyCal", + destinations: .iOS, + product: .app, + bundleId: "dev.xmaxsmi.standbycal", + infoPlist: .extendingDefault( + with: [ + "UILaunchScreen": [ + "UIColorName": "", + "UIImageName": "", + ], + ] + ), + sources: ["StandbyCal/Sources/**"], + resources: ["StandbyCal/Resources/**"], + dependencies: [] + ), + .target( + name: "StandbyCalTests", + destinations: .iOS, + product: .unitTests, + bundleId: "dev.xmaxsmi.standbycal.tests", + infoPlist: .default, + sources: ["StandbyCal/Tests/**"], + resources: [], + dependencies: [.target(name: "StandbyCal")] + ), + ] +) diff --git a/README.md b/README.md new file mode 100644 index 0000000..75d6dc2 --- /dev/null +++ b/README.md @@ -0,0 +1,166 @@ +# StandbyCal + +An iOS app for standby calendar functionality, built with SwiftUI and managed by Tuist. + +## Prerequisites + +Before you can build and run this project, you need to have the following tools installed: + +### 1. Homebrew +If you don't have Homebrew installed, install it first: https://brew.sh/ + +### 2. mise +Install mise (a tool version manager) via Homebrew: +```bash +brew install mise +``` + +### 3. Xcode +Make sure you have Xcode installed from the Mac App Store or Apple Developer portal. + +## Setup + +1. **Clone the repository** (if applicable) or navigate to the project directory: + ```bash + cd StandbyCal + ``` + +2. **Install Tuist using mise**: + ```bash + mise install + ``` + This will automatically install Tuist as specified in the `mise.toml` file. + +3. **Generate the Xcode project**: + ```bash + tuist generate + ``` + +## Building and Running + +### Option 1: Using Xcode + +#### Prerequisites +- Ensure you have completed the [Setup](#setup) steps above +- Verify that `StandbyCal.xcworkspace` exists (run `tuist generate` if missing) + +#### Steps +1. **Open the workspace**: + ```bash + tuist generate # this will create `StandbyCal.xcworkspace` + xed StandbyCal.xcworkspace # open in xcode + ``` + > ⚠️ **Important**: Always open the `.xcworkspace` file, not the `.xcodeproj` file, to ensure all dependencies are properly loaded. + + +### Option 2: Using Command Line +```bash +# Build the project +tuist build + +# Run tests +tuist test +``` + +## Project Structure + +``` +StandbyCal/ +├── README.md +├── mise.toml # Tool version management +├── Project.swift # Tuist project configuration +├── Tuist.swift # Tuist configuration +├── StandbyCal/ # Main app target +│ ├── Sources/ # Swift source files +│ │ ├── StandbyCalApp.swift +│ │ └── ContentView.swift +│ ├── Resources/ # App resources +│ │ └── Assets.xcassets/ +│ └── Tests/ # Unit tests +├── StandbyCal.xcworkspace/ # Generated Xcode workspace +└── StandbyCal.xcodeproj/ # Generated Xcode project +``` + +## Key Configuration Files + +### Project.swift +This is the main configuration file that defines your project structure, targets, and dependencies. It's written in Swift and uses Tuist's `ProjectDescription` framework. + +**Modify this file in order to:** +- Add new targets (frameworks, extensions, etc.) + ```swift + .target( + name: "StandbyCalCore", + destinations: .iOS, + product: .framework, + bundleId: "dev.xmaxsmi.standbycal.core", + sources: ["StandbyCalCore/Sources/**"], + dependencies: [] + ) + ``` +- Update bundle identifiers and app metadata +- Configure build settings and compiler flags +- Add external dependencies (SPM packages, frameworks) + ```swift + dependencies: [ + .external(name: "Alamofire"), + .target(name: "StandbyCalCore") + ] + ``` +- Set up different configurations (Debug, Release, etc.) + +**Project.swift Reference**: https://docs.tuist.io/manifests/project +**Target Configuration**: https://docs.tuist.io/manifests/target +**Dependencies Guide**: https://docs.tuist.io/guides/dependencies + +### Tuist.swift +This file configures Tuist itself and project-wide settings that affect how Tuist generates and manages your project. + +**Modify this file in order to:** +- Enable/disable Tuist features (caching, selective testing) +- Define global settings that apply to all projects +- Configure project generation behavior +- Set up custom plugins and templates +- Define environment-specific configurations + +**Tuist.swift Reference**: https://docs.tuist.io/manifests/tuist + +## Development Workflow + +### Daily Development +1. **Make changes** to your Swift files in the `StandbyCal/Sources/` directory +2. **Build and test** your changes in Xcode or via command line +3. **Commit your changes** (don't commit generated Xcode files) + +### When Modifying Project Structure +1. **Edit `Project.swift`** to add/remove targets, dependencies, or settings +2. **Regenerate project**: + ```bash + tuist generate + # or + tuist build --generate # generate xcodeproj and immediately build it + ``` +3. **Verify changes** in Xcode and test that everything builds correctly + +### Best Practices +- Always regenerate after modifying `Project.swift` or `Tuist.swift` +- Don't commit generated files (`.xcodeproj`, `.xcworkspace`) - they're in `.gitignore` +- Use `tuist clean` before regenerating if you encounter issues +- Keep your `Project.swift` organized and well-commented +- Use consistent naming conventions for targets and bundle IDs + +## Useful Commands + +```bash +# Clean generated files +tuist clean + +# Visualize project dependencies +tuist graph + +# Update Tuist to latest version +mise install tuist@latest + +# Check mise status +mise current +``` diff --git a/StandbyCal.code-workspace b/StandbyCal.code-workspace new file mode 100644 index 0000000..61e510d --- /dev/null +++ b/StandbyCal.code-workspace @@ -0,0 +1,9 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": { + } +} \ No newline at end of file diff --git a/StandbyCal/StandbyCal/Resources/Assets.xcassets/AccentColor.colorset/Contents.json b/StandbyCal/StandbyCal/Resources/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/StandbyCal/StandbyCal/Resources/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/StandbyCal/StandbyCal/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json b/StandbyCal/StandbyCal/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..9221b9b --- /dev/null +++ b/StandbyCal/StandbyCal/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/StandbyCal/StandbyCal/Resources/Assets.xcassets/Contents.json b/StandbyCal/StandbyCal/Resources/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/StandbyCal/StandbyCal/Resources/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/StandbyCal/StandbyCal/Resources/Preview Content/Preview Assets.xcassets/Contents.json b/StandbyCal/StandbyCal/Resources/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/StandbyCal/StandbyCal/Resources/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/StandbyCal/StandbyCal/Sources/ContentView.swift b/StandbyCal/StandbyCal/Sources/ContentView.swift new file mode 100644 index 0000000..fc75cd1 --- /dev/null +++ b/StandbyCal/StandbyCal/Sources/ContentView.swift @@ -0,0 +1,17 @@ +import SwiftUI + +public struct ContentView: View { + public init() {} + + public var body: some View { + Text("Hello, World!") + .padding() + } +} + + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/StandbyCal/StandbyCal/Sources/StandbyCalApp.swift b/StandbyCal/StandbyCal/Sources/StandbyCalApp.swift new file mode 100644 index 0000000..b4a8824 --- /dev/null +++ b/StandbyCal/StandbyCal/Sources/StandbyCalApp.swift @@ -0,0 +1,10 @@ +import SwiftUI + +@main +struct StandbyCalApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/StandbyCal/StandbyCal/Tests/StandbyCalTests.swift b/StandbyCal/StandbyCal/Tests/StandbyCalTests.swift new file mode 100644 index 0000000..b41f95d --- /dev/null +++ b/StandbyCal/StandbyCal/Tests/StandbyCalTests.swift @@ -0,0 +1,8 @@ +import Foundation +import XCTest + +final class StandbyCalTests: XCTestCase { + func test_twoPlusTwo_isFour() { + XCTAssertEqual(2+2, 4) + } +} \ No newline at end of file diff --git a/Tuist.swift b/Tuist.swift new file mode 100644 index 0000000..ebf9894 --- /dev/null +++ b/Tuist.swift @@ -0,0 +1,3 @@ +import ProjectDescription + +let tuist = Tuist(project: .tuist()) \ No newline at end of file diff --git a/Tuist/Package.swift b/Tuist/Package.swift new file mode 100644 index 0000000..13d5e47 --- /dev/null +++ b/Tuist/Package.swift @@ -0,0 +1,22 @@ +// swift-tools-version: 6.0 +import PackageDescription + +#if TUIST + import struct ProjectDescription.PackageSettings + + let packageSettings = PackageSettings( + // Customize the product types for specific package product + // Default is .staticFramework + // productTypes: ["Alamofire": .framework,] + productTypes: [:] + ) +#endif + +let package = Package( + name: "StandbyCal", + dependencies: [ + // Add your own dependencies here: + // .package(url: "https://github.com/Alamofire/Alamofire", from: "5.0.0"), + // You can read more about dependencies here: https://docs.tuist.io/documentation/tuist/dependencies + ] +) diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..d846298 --- /dev/null +++ b/mise.toml @@ -0,0 +1,2 @@ +[tools] +tuist = "4.57.0"