This guide provides a comprehensive overview of the development environment, tools, and workflows for the OpenMind iOS application.
# Clone and setup
git clone https://github.com/openmind/openmind-ios.git
cd openmind-ios
make setup
# Daily development
make dev # Format, lint, and build
make test # Run tests
make run # Run in simulator| Tool | Version | Purpose | Installation |
|---|---|---|---|
| Xcode | 15.0+ | IDE & Compiler | App Store |
| SwiftLint | Latest | Code linting | brew install swiftlint |
| SwiftFormat | Latest | Code formatting | brew install swiftformat |
| Fastlane | Latest | Automation | brew install fastlane |
| XcodeGen | Latest | Project generation | brew install xcodegen |
OpenMind/
├── App/ # Application lifecycle
├── Core/ # Business logic & models
├── Features/ # Feature modules
├── UI/ # Shared UI components
├── Platform/ # Platform-specific code
├── Resources/ # Assets and resources
├── Tests/ # Unit and UI tests
├── Scripts/ # Automation scripts
└── docs/ # Documentation
# Create feature branch
git checkout -b feature/node-grouping
# Make changes and test
make dev
make test
# Commit with conventional commits
git commit -m "feat: add node grouping functionality"# Run all tests
make test
# Specific test types
./Scripts/run-tests.sh --unit-only
./Scripts/run-tests.sh --ui-only
# Performance testing
RUN_PERF=true ./Scripts/run-tests.sh
# Snapshot testing
SNAPSHOT_RECORD=true make test # Record
make test # Verify# Lint code
make lint
# Format code
make format
# Find dead code
make deadcode
# Security scan
./Scripts/security-scan.sh# Profile with Instruments
./Scripts/instruments-profile.sh all
# Monitor memory
./Scripts/memory-monitor.sh 60
# Stress test
STRESS_TEST=true ./Scripts/memory-monitor.shSwiftData models for persistence:
MindMapNode- Node representationMindMapDocument- Document containerMindMapStyle- Visual styling
Layout algorithms:
- Radial layout
- Tree layout (vertical/horizontal)
- Organic/force-directed layout
Dual rendering system:
- Metal renderer for performance
- Core Graphics fallback
- Automatic switching based on node count
Platform-specific implementations:
- iOS: Touch and pencil support
- iPadOS: Multitasking and drag-drop
- macOS: Menu bar and keyboard shortcuts
- Unit Tests - Business logic validation
- UI Tests - User interface testing
- Performance Tests - Speed and memory benchmarks
- Snapshot Tests - Visual regression testing
- Overall: 70% minimum
- Critical paths: 90% minimum
- New code: 80% minimum
- Frame Rate: 60fps with 10,000+ nodes
- Memory: <200MB for typical documents
- Launch Time: <1 second
- Render Time: <16ms per frame
- Culling - Only render visible nodes
- Batching - Group draw calls
- Caching - Store layout calculations
- LOD - Reduce detail for distant nodes
// ❌ Never hardcode secrets
let apiKey = "sk_live_abc123"
// ✅ Use environment variables
let apiKey = ProcessInfo.processInfo.environment["API_KEY"]- Encrypt sensitive data at rest
- Use HTTPS for all network requests
- Implement certificate pinning
- Follow least privilege principle
-
Performance Issues
# Profile the specific area ./Scripts/instruments-profile.sh performance -
Memory Leaks
# Check for leaks ./Scripts/memory-monitor.sh -
Layout Problems
# Enable layout debugging defaults write com.openmind.app ShowLayoutBounds YES
- Xcode Memory Graph
- View Hierarchy Debugger
- Network Link Conditioner
- Console.app for logs
- All tests passing
- No security vulnerabilities
- Performance benchmarks met
- Documentation updated
- Version number incremented
# Beta release
fastlane beta
# Production release
fastlane release- Follow SwiftLint rules
- Use SwiftFormat for consistency
- Write self-documenting code
- Add comments for complex logic
- Create feature branch
- Make changes with tests
- Ensure CI passes
- Request code review
- Merge after approval
- GitHub Issues for bugs
- GitHub Discussions for questions
- Slack #openmind-dev for team chat
- Stack Overflow for general Swift/iOS help
For detailed information on any topic, refer to the specific documentation in the docs/ directory.