This sample demonstrates how to make calls to the Gemini API via Firebase directly from your app, rather than server-side, using the Vertex AI for Firebase SDK.
- Clone this repo.
- Change into the
firebaseaidirectory. - Open
FirebaseAIExample.xcodeprojusing Xcode.git clone https://github.com/firebase/quickstart-ios.git cd quickstart-ios/firebaseai open FirebaseAIExample.xcodeproj - Select the
FirebaseAIExample (iOS)scheme in Xcode to build the app using the Swift Package Manager distribution.
To have a functional application, you will need to connect the Firebase AI sample app to your Firebase project (or create a new project):
- Follow the instructions in Set up a Firebase project and connect your app to Firebase.
- Add an iOS+ app to your project. Make sure the
Bundle Identifieryou set matches the one in the sample.- The default bundle ID is
com.google.firebase.quickstart.FirebaseAIExample
- The default bundle ID is
- Download the
GoogleService-Info.plistfor the app when prompted and save it to thefirebaseaidirectory.
You should now be able to build and run the sample!
The -FIRDebugEnabled option is set as a command line argument in the build
scheme to log server requests to the console. Remove the option to turn off the
logging.
To learn more about the Firebase AI SDK, check out the documentation.
- GitHub Issue
- File an issue in the
firebase-ios-sdkrepo, choosing the Firebase AI product.
- File an issue in the
- Firebase Support