This is a Kotlin Multiplatform project targeting Android, iOS. It is a sample app showcasing firebase-ai-kmp
:composeApp/build.gradle.kts:- Kotlin iOS targets
- Firebase AI KMP SDK dependency
iosApp/iosApp/iOSApp.swift:- Configures the FirebaseApp for iOS
- Prerequisites:
- Firebase Console Setup:
- Create a Firebase Project
- Click on AI Logic in Project Shortcuts on the left navigation sidebar
- Enable both Gemini Developer API and Vertex AI Gemini API
- Create an iOS app with Apple bundle ID as
io.github.seanchinjunkai.firebase-ai-sample - Download the config file
GoogleService-Info.plistand place it iniosApp/iosAppdirectory - Create an Android app with Android package name as
io.github.seanchinjunkai.firebase_ai_sample. - Download the config file
google-services.jsonand place it incomposeAppdirectory
Note
You can change the Apple Bundle ID and Android Package Name to your own desired name
- Build:
- Open the project in Android Studio.
- In the
iosAppdirectory, runpod install. - Either open the generated
.xcworkspacein Xcode and run on a simulator or device, or run the iosApp target in Android Studio with the run configuration set to use the generated.xcworkspace.