Initial commit

This commit is contained in:
Maksim Smirnov
2025-08-04 09:53:13 +02:00
commit 8247ccf65f
15 changed files with 405 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
Derived/*
*.xcodeproj/
*.xcworkspace/
.DS_Store
buildServer.json

8
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,8 @@
{
"files.exclude": {
".jj": true,
"Derived/": true,
"*.xcodeproj": true,
"*.xcworkspace": true
}
}

34
Project.swift Normal file
View File

@@ -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")]
),
]
)

166
README.md Normal file
View File

@@ -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
```

View File

@@ -0,0 +1,9 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
}
}

View File

@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@@ -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
}
}

View File

@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@@ -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()
}
}

View File

@@ -0,0 +1,10 @@
import SwiftUI
@main
struct StandbyCalApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}

View File

@@ -0,0 +1,8 @@
import Foundation
import XCTest
final class StandbyCalTests: XCTestCase {
func test_twoPlusTwo_isFour() {
XCTAssertEqual(2+2, 4)
}
}

3
Tuist.swift Normal file
View File

@@ -0,0 +1,3 @@
import ProjectDescription
let tuist = Tuist(project: .tuist())

22
Tuist/Package.swift Normal file
View File

@@ -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
]
)

2
mise.toml Normal file
View File

@@ -0,0 +1,2 @@
[tools]
tuist = "4.57.0"