-
Couldn't load subscription status.
- Fork 1.5k
Description
Problem Description
Currently, GenerativeAIUIComponents in firebaseai uses Swift Package mode, which adds configuration complexity.
The goal of this project is to facilitate developers' quick reuse of the code, and focus more on using Firebase Gemini API.
So, it is suggested to convert GenerativeAIUIComponents from Package mode to folder structure mode to simplify dependency management and improve development experience.
Current Structure (Package Mode)
GenerativeAIUIComponents/
├── Package.swift
├── .swiftpm/
└── Sources/GenerativeAIUIComponents/
├── InputField.swift
└── MultimodalInputField.swiftThis structure requires maintaining Package.swift and adding import GenerativeAIUIComponents at usage points.
Proposed Structure (Folder Mode)
firebaseai/
├── GenerativeAIUIComponents/
│ ├── Views/
│ │ ├── InputField.swift
│ │ └── MultimodalInputField.swift
│ └── Models/
│ └── ChatMessage.swift # Migrated from ChatExample
...- Because all files belong to the same compilation target (PBXSourcesBuildPhase), they can be directly referenced within the root target.
- No additional
import statement codingor Package configuration maintenance
Proposed Changes
- Remove GenerativeAIUIComponents Package reference
- Move component source code to project folder structure
- Delete all
import GenerativeAIUIComponentsstatements
For possible future work, new shared files can be added directly into this folder without maintaining SPM dependencies.
If it is feasible, I’d love to submit a PR. Looking forward to your feedback. @peterfriese