diff --git a/FirebaseVertexAI/Sample/GenerativeAISample.xcodeproj/project.pbxproj b/FirebaseVertexAI/Sample/GenerativeAISample.xcodeproj/project.pbxproj index ac930a76d95..01336b9cf19 100644 --- a/FirebaseVertexAI/Sample/GenerativeAISample.xcodeproj/project.pbxproj +++ b/FirebaseVertexAI/Sample/GenerativeAISample.xcodeproj/project.pbxproj @@ -487,7 +487,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.google.generativeai.GenerativeAISample; + PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.VertexAISample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; @@ -517,7 +517,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.google.generativeai.GenerativeAISample; + PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.VertexAISample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; diff --git a/FirebaseVertexAI/Sample/GenerativeAISample/GenerativeAISampleApp.swift b/FirebaseVertexAI/Sample/GenerativeAISample/GenerativeAISampleApp.swift index 7c709111b7f..509087a5e07 100644 --- a/FirebaseVertexAI/Sample/GenerativeAISample/GenerativeAISampleApp.swift +++ b/FirebaseVertexAI/Sample/GenerativeAISample/GenerativeAISampleApp.swift @@ -19,6 +19,14 @@ import SwiftUI struct GenerativeAISampleApp: App { init() { FirebaseApp.configure() + + if let firebaseApp = FirebaseApp.app(), firebaseApp.options.projectID == "mockproject-1234" { + guard let bundleID = Bundle.main.bundleIdentifier else { fatalError() } + fatalError("You must create and/or download a valid `GoogleService-Info.plist` file for" + + " \(bundleID) from https://console.firebase.google.com to run this sample. Replace the" + + " existing `GoogleService-Info.plist` file in the `FirebaseVertexAI/Sample` directory" + + " with this new file.") + } } var body: some Scene { diff --git a/FirebaseVertexAI/Sample/GoogleService-Info.plist b/FirebaseVertexAI/Sample/GoogleService-Info.plist new file mode 100644 index 00000000000..b026413cc39 --- /dev/null +++ b/FirebaseVertexAI/Sample/GoogleService-Info.plist @@ -0,0 +1,40 @@ + + + + + AD_UNIT_ID_FOR_BANNER_TEST + ca-app-pub-3940256099942544/2934735716 + AD_UNIT_ID_FOR_INTERSTITIAL_TEST + ca-app-pub-3940256099942544/4411468910 + API_KEY + AIzaSyAzlj4APqi5S58nFtE52Da0fYBOHA2MhaY + BUNDLE_ID + com.google.firebase.VertexAISample + CLIENT_ID + 123456789000-hjugbg6ud799v4c49dim8ce2usclthar.apps.googleusercontent.com + DATABASE_URL + https://mockproject-1234.firebaseio.com + GCM_SENDER_ID + 123456789000 + GOOGLE_APP_ID + 1:123456789000:ios:f1bf012572b04063 + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + PLIST_VERSION + 1 + PROJECT_ID + mockproject-1234 + REVERSED_CLIENT_ID + com.googleusercontent.apps.123456789000-hjugbg6ud799v4c49dim8ce2usclthar + STORAGE_BUCKET + mockproject-1234.appspot.com + + diff --git a/FirebaseVertexAI/Sample/README.md b/FirebaseVertexAI/Sample/README.md new file mode 100644 index 00000000000..a4a8b458df3 --- /dev/null +++ b/FirebaseVertexAI/Sample/README.md @@ -0,0 +1,16 @@ +# Vertex AI for Firebase Sample App + +You can try out the SDK quickly, see a complete implementation of various use +cases, or use the sample app if you don't have your own Apple platforms app. To +use the sample app, you'll need to perform the following steps: +1. Download + [vertexai-preview-0.1.0.zip](https://github.com/firebase/firebase-ios-sdk/archive/refs/heads/vertexai-preview-0.1.0.zip) + for the latest release of the SDK +1. Extract the zip and open `GenerativeAISample.xcodeproj` in the + `FirebaseVertexAI/Sample` directory +1. [Register the sample app](https://firebase.google.com/docs/ios/setup#register-app) + in your Firebase project + - The default bundle ID is `com.google.firebase.VertexAISample` +1. [Download the `GoogleService-Info.plist`](https://firebase.google.com/docs/ios/setup#add-config-file) + to the `FirebaseVertexAI/Sample` directory, overwriting the placeholder file + with the same name