-
Open in Xcode
open OpenMind.xcodeproj # or xed .
-
Select Development Team
- Open project settings (click on "OpenMind" in navigator)
- Select "OpenMind" target
- Go to "Signing & Capabilities"
- Select your development team
The project is configured with optimized build settings:
- Swift 5.9 with strict concurrency checking
- iOS 17.0 minimum deployment target
- Universal app (iPhone, iPad, Mac Catalyst)
- Optimized build times with incremental compilation
OpenMind - Main app scheme
- Debug configuration for development
- Release configuration for App Store
- Test action includes unit and UI tests
- Profile action for Instruments
- Dependencies - Swift Package Manager
- Sources - Compile Swift files
- Resources - Copy bundle resources
- SwiftLint - Code style checking
- Embed Frameworks - Include dependencies
Enabled capabilities:
- ☁️ CloudKit
- 📍 Background Modes
- 🔐 Keychain Sharing
- 📱 Associated Domains
- 🎯 Push Notifications
Simulator:
- Select target device from scheme selector
- Press
Cmd+Bto build - Press
Cmd+Rto run
Device:
- Connect iOS device
- Select device from scheme selector
- Ensure provisioning profile is valid
- Press
Cmd+Rto run
Run all tests:
Cmd+U
Run specific test:
- Click on diamond next to test method
- Or use Test Navigator (
Cmd+6)
View coverage:
- Enable coverage in scheme
- View in Report Navigator after test run
Breakpoints:
- Click line number to add breakpoint
- Right-click for conditional breakpoints
- Use breakpoint navigator (
Cmd+8)
LLDB Commands:
# Print object
po variable
# Print view hierarchy
pviews
# Measure execution time
measure { expensive_operation() }
View Debugging:
- Debug menu → View Debugging → Capture View Hierarchy
- Inspect 3D view hierarchy
- Check constraint issues
Instruments:
- Product → Profile (
Cmd+I) - Select template:
- Time Profiler for CPU
- Allocations for memory
- Core Animation for UI
Memory Graph:
- Debug menu → Capture Memory Graph
- Find retain cycles
- Analyze object relationships
| Action | Shortcut |
|---|---|
| Build | Cmd+B |
| Run | Cmd+R |
| Test | Cmd+U |
| Clean | Cmd+Shift+K |
| Find in Project | Cmd+Shift+F |
| Quick Open | Cmd+Shift+O |
| Jump to Definition | Cmd+Click |
| Refactor | Cmd+Click → Refactor |
| Documentation | Option+Click |
-
Navigator (
Cmd+1-9):- Project (
Cmd+1) - Source Control (
Cmd+2) - Symbol (
Cmd+3) - Find (
Cmd+4) - Issue (
Cmd+5) - Test (
Cmd+6) - Debug (
Cmd+7) - Breakpoint (
Cmd+8) - Report (
Cmd+9)
- Project (
-
Editor Options:
- Assistant Editor (
Cmd+Option+Return) - Version Editor (
Cmd+Option+Shift+Return) - Authors View (blame)
- Comparison View
- Assistant Editor (
- Basic: Start typing and press
Escape - Fuzzy: Type capitals of method (e.g.,
vDLforviewDidLoad) - Snippets: Type shortcut and press
Return
Create reusable code snippets:
- Select code
- Editor → Create Code Snippet
- Set title and shortcut
- Use
<#placeholder#>for variables
"No such module" error:
# Clean build folder
Cmd+Shift+K
# Reset packages
File → Packages → Reset Package CachesProvisioning profile issues:
# Refresh profiles
Xcode → Preferences → Accounts → Download Manual ProfilesSimulator issues:
# Reset simulator
Device → Erase All Content and Settings
# Or from terminal
xcrun simctl erase allBuild performance:
- Enable build timing: Product → Build With Timing Summary
- Check for slow compiling files
- Consider splitting large files
Debug vs Release:
- Debug: No optimization, assertions enabled
- Release: Full optimization, stripped symbols
Custom flags:
DEVELOPMENT- Development buildsTESTFLIGHT- TestFlight buildsAPP_STORE- App Store builds
Additional configurations available:
Staging- For testing with staging serversAdHoc- For enterprise distribution
Set in scheme editor:
LOG_LEVEL- Control logging verbosityAPI_ENDPOINT- Override API URLENABLE_MOCKS- Use mock data
Integrated CI/CD:
- Product → Xcode Cloud → Create Workflow
- Configure triggers and actions
- Set up post-actions for deployment