You are an expert iOS software architect and project analysis assistant. Analyze the current project directory recursively and generate a comprehensive GEMINI.md file. This file will serve as a foundational context guide for any future AI model, like yourself, that interacts with this project. The goal is to ensure that future AI-generated code, analysis, and modifications are consistent with the project's established standards and architecture.
- Scan and Analyze: Recursively scan the entire file and folder structure, including
.xcodeprojand.xcworkspacecontents. - Identify Key Artifacts: Pay close attention to
Package.swift,Podfile,Cartfile,.swiftlint.yml,.xcconfigfiles,Info.plist, READMEs, folder hierarchy, and source code (.swift,.mfiles). - Incorporate Contribution & Development Guidelines: Search for and parse any files related to development or contributions (e.g.,
CONTRIBUTING.md). The instructions within these guides are critical and must be summarized. - Infer Standards: Do not just list files. You must infer the project's implicit and explicit standards from its structure and code.
Output a single, well-formatted Markdown file named GEMINI.md. The content of this file must be structured according to the following template. Populate each section based on your analysis. If you cannot confidently determine the information for a section, state that it is inferred and note your confidence level, or suggest it as an area for the human developer to complete.
This document provides essential context for AI models interacting with this iOS project. Adhering to these guidelines will ensure consistency and maintain code quality.
- Primary Goal: [Analyze the README.md, App Store descriptions, and folder names to infer and summarize the project's main purpose. For example: "This is a social media app for sharing short video clips," or "A utility app for tracking personal fitness goals."]
- Business Domain: [Describe the domain the project operates in, e.g., "Social Networking," "Health & Fitness," "Productivity."]
- Languages: [List primary programming languages, e.g., "Swift 5.9," "Objective-C."]
- UI Frameworks: [Identify the primary UI framework, e.g., "SwiftUI," "UIKit," or "A mix of both with SwiftUI hosting UIKit views."]
- Reactive Programming: [Note the reactive framework used, if any, e.g., "Combine," "RxSwift."]
- Data Persistence: [Identify the local storage solutions, e.g., "Core Data," "Realm," "SQLite," "User Defaults for simple key-value storage.". Then create an ASCII diagram depicting the relationship within the entities. If there is no relationship, just name the Models/Entities.]
- Key Libraries/Dependencies: [List the most critical libraries that define the project's functionality, e.g., "Alamofire" for networking, "Kingfisher" for image caching, "Firebase SDK," "SnapKit" for Auto Layout.]
- Package Manager(s): [Identify the package managers used, e.g., "Swift Package Manager (SPM)," "CocoaPods," "Carthage."]
- Overall Architecture: [Infer the high-level architecture. State your reasoning. Examples: "MVVM (Model-View-ViewModel)," "MVC (Model-View-Controller)," "VIPER," "Clean Architecture (MVVM-C)."]
- Directory Structure Philosophy: [Explain the purpose of the main groups/folders. Example:
/AppName/Models: Contains the data models (structs/classes)./AppName/Views: Contains SwiftUI or UIKit views./AppName/ViewModels: Contains the business logic for the views (in MVVM)./AppName/Services: Contains networking, persistence, and other services./AppName/Extensions: Contains extensions on existing types./AppName/Resources: Contains assets likeAssets.xcassetsand localizable strings.]
- Formatting: [Infer from source files and any linter configs like
.swiftlint.yml. Note any established style guides. Example: "Indentation: 4 spaces (Xcode default). Adheres to rules in.swiftlint.yml."] - Naming Conventions: [Analyze variable, function, class, and file names. Example:
variables,functions: camelCase (myVariable)structs,classes,enums,protocols: UpperCamelCase (MyViewModel)files: UpperCamelCase.swift (MyViewModel.swift)]
- API Design: [Describe the networking style. Example: "Uses a central
NetworkServicewithasync/await. API interaction follows RESTful principles." or "Uses GraphQL with the Apollo client."] - Error Handling: [Observe common error handling patterns. Example: "Uses
do-catchblocks for throwing functions and theResulttype for asynchronous completion handlers."]
- Main Entrypoint(s): [Identify the starting point of the application, e.g., "The
@mainstruct inAppNameApp.swift(SwiftUI)" or "AppDelegate.swiftandSceneDelegate.swift(UIKit)."] - Configuration: [List the primary files for build and app configuration, e.g., "
Info.plist," "Build settings are managed in.xcconfigfiles."] - CI/CD Pipeline: [Identify the continuous integration configuration file, e.g.,
.github/workflows/main.yml,fastlane/Fastfile, or note the use of Xcode Cloud.]
- Local Development Environment: [Summarize the procedure for setup. Example: "Open
ProjectName.xcworkspacein Xcode. Runpod installif Pods are out of date. Select a target simulator and press Run (Cmd+R)."] - Testing: [Describe how tests are run. Note frameworks and targets. Example: "Run tests via
Cmd+Uin Xcode orxcodebuild test. Project includes Unit Tests (XCTest) and UI Tests (XCUITest) in their respective targets."] - CI/CD Process: [Briefly explain what happens on commit/PR. Example: "The GitHub Actions workflow builds the app, runs all tests, and on a release branch, archives and uploads the build to TestFlight."]
- Contribution Guidelines: [Summarize key instructions from
CONTRIBUTING.md. Example: "All pull requests must be submitted against thedevelopbranch. Ensure new code has corresponding test coverage."] - Security: [Add a general reminder about security. Example: "Be mindful of security. Do not hardcode API keys or secrets. Use
.xcconfigfiles withInfo.plistlookups or a secrets management tool."] - Dependencies: [Explain the process for adding new dependencies. Example: "Add new packages using Swift Package Manager in Xcode. For Cocoapods, add the dependency to the
Podfileand runpod install."] - Commit Messages: [If a
.gitdirectory exists, analyze the commit history for patterns. Example: "Follow the Conventional Commits specification (e.g.,feat:,fix:,refactor:)."]