Prerequisites
Before you begin, ensure you have the following installed on your Mac:Xcode 16+
Download from the Mac App Store or Apple Developer portal
macOS
Latest macOS version recommended for Xcode compatibility
Git
For cloning the repository and version control
Command Line Tools
Installed via
xcode-select --installSystem Requirements
- Xcode Version: 16.0 or later
- iOS Deployment Target: iOS 17.0+
- Swift Version: 5.0
- macOS: Latest version recommended
Getting Started
Open the Xcode Project
Open the Xcode project file:
The project uses Swift Package Manager (SPM) for dependency management. Xcode will automatically resolve and download dependencies when you first open the project.
Configure Secrets
The app uses a Add your configuration values:
Secrets.xcconfig file for sensitive configuration values. This file is gitignored for security.Create a Secrets.xcconfig file in the Chapter/ directory:Add Firebase Configuration
The app uses Firebase for push notifications and analytics.
- Download
GoogleService-Info.plistfrom your Firebase console - Add it to the
Chapter/directory in Xcode - Ensure it’s included in the Chapter target
The file
Chapter/GoogleService-Info.plist already exists in the project structure. Replace it with your own Firebase configuration.Wait for SPM Dependencies
Xcode will automatically resolve Swift Package Manager dependencies. This may take a few minutes on first setup.You can monitor progress in Xcode’s status bar or via:
Dependencies
The project uses Swift Package Manager (SPM) for all dependencies. No CocoaPods or Carthage required.Key Dependencies
| Package | Version | Purpose |
|---|---|---|
| Supabase Swift | 2.26.1 | Backend services, auth, database, storage |
| Firebase iOS SDK | 11.11.0 | Push notifications, analytics, messaging |
| Mapbox Maps | 11.13.1 | Interactive maps for accommodation and campus views |
| Kingfisher | 8.1.3 | Async image loading and caching |
| Mixpanel | master | User analytics and event tracking |
| Snap Kit | 2.6.0 | Snapchat integration and authentication |
| Soto (AWS SDK) | 7.5.0 | Cloudflare R2 / S3 storage operations |
View all dependencies
View all dependencies
Additional dependencies include:
- SwiftSoup (2.7.2): HTML parsing
- Swift Collections (1.1.4): Advanced data structures
- Swift Algorithms (1.2.1): Algorithm utilities
- Swift NIO (2.81.0): Async networking foundation
- Swift Crypto (3.4.0): Cryptographic operations
Chapter.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved for the complete dependency tree.Configuration Files
Info.plist
Located atChapter/Info.plist, this file contains:
- Bundle identifier:
Chapter.Chapter - URL schemes:
chapter://for deep linking - Required permissions (location, notifications, camera, photo library)
- Firebase and Google Ads configuration
Entitlements
Chapter/Chapter.entitlements defines app capabilities:
- Push notifications
- Associated domains (for universal links)
- Keychain access groups
- Background modes
Build Configurations
The project includes standard Debug and Release configurations:Environment Setup
Supabase Backend
The app connects to a Supabase backend for:- User authentication and authorization
- PostgreSQL database for all app data
- Realtime subscriptions for chat and presence
- File storage (profile pictures, documents)
- Edge functions for server-side logic
users/group_usersuniversities_v2courses_v2group_chatsmessagescalendar_eventsdevice_tokensshortlists- And many more…
Contact your team lead for access to the Supabase project and credentials.
Firebase Setup
- Create a Firebase project or get added to the existing one
- Download
GoogleService-Info.plist - Enable Firebase Cloud Messaging (FCM)
- Configure APNs authentication (upload APNs key or certificate)
Third-Party Services
You’ll need API keys/tokens for:- Mixpanel: Analytics tracking
- Snapchat Snap Kit: Social integration
- Mapbox: Map rendering (token in code or config)
- Cloudflare R2: Object storage (via AWS S3 SDK)
Running the App
First Launch
On first launch, the app will:- Initialize Firebase and Mixpanel
- Attempt to restore user session from Supabase
- Show onboarding flow if no user is signed in
- Request notification permissions
- Register for remote notifications
Common Build Issues
SPM dependency resolution fails
SPM dependency resolution fails
Solution:
- Clear SPM cache:
rm -rf ~/Library/Caches/org.swift.swiftpm - Clear derived data:
rm -rf ~/Library/Developer/Xcode/DerivedData - In Xcode: File → Packages → Reset Package Caches
- Restart Xcode
Secrets.xcconfig not found
Secrets.xcconfig not found
Solution:
Ensure you’ve created
Chapter/Secrets.xcconfig with all required keys. Check that the file is in the correct location (not in the root directory).Firebase initialization error
Firebase initialization error
Solution:
- Verify
GoogleService-Info.plistis in the project - Check it’s added to the Chapter target (not just the project)
- Ensure bundle identifier matches Firebase configuration
Signing & Capabilities errors
Signing & Capabilities errors
Solution:
- Select your development team in Xcode → Signing & Capabilities
- Change bundle identifier if needed to match your team
- Ensure provisioning profiles are up to date
Simulator vs Device Testing
Simulator Limitations
Testing on Device
For full functionality testing:- Connect your iPhone/iPad via USB
- Trust the computer on your device
- Select your device in Xcode’s scheme selector
- Ensure your device is added to provisioning profiles
- Build and run (
Cmd + R)
Next Steps
Code Structure
Learn about the app’s architecture and file organization
Contributing
Read the contribution guidelines and PR process
Troubleshooting
If you encounter issues:- Check Xcode version: Ensure you’re running Xcode 16.0+
- Clean build folder:
Cmd + Shift + Kor Product → Clean Build Folder - Reset package caches: File → Packages → Reset Package Caches
- Review logs: Check Xcode console for specific error messages
- Ask for help: Reach out to the team on Slack or create an issue