Apple Watch app for Woffu time tracking system.
WoffuX/
├── Views/
│ ├── ContentView.swift # Main container with TabView
│ ├── MainView.swift # Dashboard view (Tab 1)
│ ├── SignSlotsListView.swift # Slots list view (Tab 2)
│ └── Components/
│ ├── ClockButton.swift # Clock in/out button
│ ├── WorkingTimeDisplay.swift # Time display widget
│ ├── TotalTimeCard.swift # Total time card
│ └── SignSlotCard.swift # Individual slot card
│
├── Services/
│ └── WoffuAPI.swift # API service layer
│
├── Models/
│ └── Models.swift # Data models (SignSlot, SignEvent, etc.)
│
├── Utils/
│ └── WorkingHoursCalculator.swift # Time calculation utilities
│
└── Config/
├── WoffuConfig.swift # Configuration manager
└── Config.xcconfig.template # Template for credentials
-
Copy the template:
cp Config/Config.xcconfig.template Config.xcconfig
-
Edit
Config.xcconfigwith your credentials:WOFFU_COMPANY = your-company-name WOFFU_JWT_TOKEN = your-jwt-token-here WOFFU_USERNAME = YourName -
Add to Xcode:
- Open your project in Xcode
- Right-click on project → Add Files
- Select
Config.xcconfig - Go to Project Settings → Info → Configurations
- Set
Config.xcconfigfor Debug and Release
-
Update Info.plist: Add these keys to your
Info.plist:<key>WoffuCompany</key> <string>$(WOFFU_COMPANY)</string> <key>WoffuJWTToken</key> <string>$(WOFFU_JWT_TOKEN)</string> <key>WoffuUsername</key> <string>$(WOFFU_USERNAME)</string>
-
The credentials are automatically loaded via
WoffuConfig.swift
- ContentView: Main container managing tab navigation and lifecycle
- MainView: Dashboard with greeting, time display, and clock button
- SignSlotsListView: Scrollable list of all sign slots
- Components: Reusable UI components
- WoffuAPI: Handles all API communication
fetchTodaySlots(): GET slots for todayperformSignAction(): POST clock in/out
- SignSlot: Main data structure for time entries
- SignEvent: Individual sign in/out event
- SignMotive: Reason/category for the slot
- WorkingHoursCalculator: Calculates total working hours from slots
- WoffuConfig: Manages credentials and configuration
- Uses xcconfig for sensitive data
User Action → ContentView → WoffuAPI → Woffu Server
↓ ↓
Updates @Published Response
↓ ↓
View Refresh ← Data Processing
- ✅ Clock in/out with single tap
- ✅ Real-time working hours calculation
- ✅ View all sign slots for today
- ✅ Loading indicators with progress spinner
- ✅ Automatic sync on app activation
- ✅ Time-based greetings (Buenos días/tardes/noches)
- ✅ Secure credential management
- 🔔 Smart Reminders:
- Implementation of local alarms and push notifications to remind the user to clock in/out.
- 📍 Location Awareness:
- Integration of CoreLocation to send the user's current coordinates during sign actions.
- 🤖 Automation:
- Automatic clock-in/out triggered by specific alarms or geofencing (entering/leaving the office).
- ⌚ Quick Access Widgets:
- Develop watchOS Complications and Widgets for the "Smart Stack" to allow signing without opening the full app.
- watchOS 26.0+
- Clone the repository
- Set up your configuration (see Configuration Setup above)
- Open in Xcode
- Build and run on Apple Watch simulator or device
Private project - All rights reserved