Skip to content

Kotlin Multiplatform Sample Application using firebase-ai-kmp library

Notifications You must be signed in to change notification settings

SeanChinJunKai/firebase-ai-sample

Repository files navigation

This is a Kotlin Multiplatform project targeting Android, iOS. It is a sample app showcasing firebase-ai-kmp

Key Setup

  • :composeApp/build.gradle.kts:
    • Kotlin iOS targets
    • Firebase AI KMP SDK dependency
  • iosApp/iosApp/iOSApp.swift:
    • Configures the FirebaseApp for iOS

Running

  1. Prerequisites:
  1. 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.plist and place it in iosApp/iosApp directory
  • Create an Android app with Android package name as io.github.seanchinjunkai.firebase_ai_sample.
  • Download the config file google-services.json and place it in composeApp directory

Note

You can change the Apple Bundle ID and Android Package Name to your own desired name

  1. Build:
  • Open the project in Android Studio.
  • In the iosApp directory, run pod install.
  • Either open the generated .xcworkspace in 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.

About

Kotlin Multiplatform Sample Application using firebase-ai-kmp library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published