A SwiftUI-based iOS application for managing and splitting expenses.
- Requirements
- Tech Stack
- Project Setup
- Project Structure
- Running the App
- Architecture
- Contributing
- License
- macOS: macOS 14.0 (Sonoma) or later
- Xcode: Version 15.0 or later
- iOS Deployment Target: iOS 17.0 or later
- Swift: Swift 5.9 or later
- SwiftUI - Modern declarative UI framework
- SwiftData - Persistent data storage (iOS 17.0+)
- iCloud (CloudKit) - Automatic sync across devices
- Native iOS Colors - System colors with automatic light/dark mode
- MVVM Architecture - Clean separation of concerns
git clone https://github.com/Swift-Mumbai/SplitKar.git
cd SplitKarNote: The project uses two main branches:
main- Stable production-ready codedevelop- Active development branch
To work on the latest features, switch to the develop branch:
git checkout developOpen the project in Xcode:
open SplitKar.xcodeprojAlternatively, you can:
- Launch Xcode
- Select File → Open
- Navigate to the
SplitKar.xcodeprojfile and open it
In Xcode:
- Click on the device selector in the toolbar (next to the scheme selector)
- Choose either:
- A physical iOS device (iPhone/iPad running iOS 17.0+)
- A simulator (iPhone 15, iPhone 14, etc.)
For all devices (simulator and physical):
- Select the SplitKar project in the Project Navigator
- Select the SplitKar target
- Go to the Signing & Capabilities tab
- Check Automatically manage signing
- Select your Team from the dropdown
- If you don't see a team, you'll need to add your Apple ID in Xcode:
- Xcode → Settings → Accounts → + → Apple ID
- If you don't see a team, you'll need to add your Apple ID in Xcode:
Enable iCloud Sync:
- In the same Signing & Capabilities tab, click + Capability
- Add iCloud
- Check CloudKit
- The CloudKit container should be auto-configured
Note: iCloud sync requires you to be signed in with an Apple ID on your device/simulator.
SplitKar/
├── SplitKar/
│ ├── SplitKarApp.swift # App entry point
│ ├── ContentView.swift # Main view
│ ├── Item.swift # SwiftData model
│ └── Assets.xcassets/ # App assets and icons
├── SplitKar.xcodeproj/ # Xcode project file
├── README.md # This file
└── LICENSE # MIT License
- Build the project:
⌘ + B - Run the app:
⌘ + R - The app will launch on your selected simulator or device
# Build the project
xcodebuild -project SplitKar.xcodeproj -scheme SplitKar -configuration Debug build
# Run on a specific simulator
xcodebuild -project SplitKar.xcodeproj -scheme SplitKar -destination 'platform=iOS Simulator,name=iPhone 15,OS=latest' testThe project follows MVVM (Model-View-ViewModel) architecture:
- Model: SwiftData models (
Item.swift) - View: SwiftUI views (
ContentView.swift) - ViewModel: Business logic layer (to be implemented)
- SwiftData: Used for persistent data storage with a declarative API
- iCloud Sync: Automatic CloudKit sync across all user devices
- NavigationSplitView: Adaptive navigation for iPhone and iPad
- ModelContext: Environment object for managing SwiftData operations
- Native iOS Colors: System colors that automatically adapt to light/dark mode
- Dynamic Type: Full support for iOS accessibility features
- Minimum deployment target: iOS 17.0
- Use native iOS system colors (Color.purple, Color.blue, etc.) for automatic light/dark mode
- Follow Swift's official style guidelines
- Use value types (structs) over reference types when possible
- Avoid force unwrapping - use safe unwrapping (
if let,guard let) - Support Dynamic Type for accessibility
- Write unit tests for ViewModels and business logic
Build Failed - "Could not create ModelContainer"
- Ensure you're running on iOS 17.0+ simulator/device (SwiftData requirement)
- Check that your deployment target is set to iOS 17.0 or later
Code Signing Error
- Make sure you've selected a development team in Signing & Capabilities
- Ensure your Apple ID is added in Xcode Settings → Accounts
Simulator Not Launching
- Restart Xcode
- Reset the simulator: Device → Erase All Content and Settings
- Check that you have sufficient disk space
iCloud Sync Not Working
- Ensure you're signed in with an Apple ID on the device/simulator
- Check that iCloud capability is enabled in Signing & Capabilities
- Verify CloudKit container is configured correctly
- Go to Settings → Apple ID → iCloud and ensure iCloud Drive is enabled
- For simulators, you may need to sign in through Settings app first
If you encounter issues:
- Check the Issues page
- Create a new issue with detailed information about your problem
- Include Xcode version, iOS version, and error messages
Contributions are welcome! Please follow these steps:
- Fork the repository
- Clone your fork and checkout the
developbranch:git checkout develop
- Create a branch from
develop:- For new features:
git checkout -b feature/amazing-feature
- For bug fixes:
git checkout -b bugfix/fix-issue-description
- For new features:
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request against the
developbranch (notmain)
Branch Strategy:
main- Production-ready releases onlydevelop- Integration branch for features (base all PRs on this branch)feature/*- New features and enhancementsbugfix/*- Bug fixes for issues found in development
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by Swift Mumbai