Skip to content

Commit

Permalink
Add placeholder GoogleService-Info.plist to Vertex AI sample
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewheard committed Apr 8, 2024
1 parent 468013c commit b372ec5
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
40 changes: 40 additions & 0 deletions FirebaseVertexAI/Sample/GoogleService-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AD_UNIT_ID_FOR_BANNER_TEST</key>
<string>ca-app-pub-3940256099942544/2934735716</string>
<key>AD_UNIT_ID_FOR_INTERSTITIAL_TEST</key>
<string>ca-app-pub-3940256099942544/4411468910</string>
<key>API_KEY</key>
<string>AIzaSyAzlj4APqi5S58nFtE52Da0fYBOHA2MhaY</string>
<key>BUNDLE_ID</key>
<string>com.google.firebase.VertexAISample</string>
<key>CLIENT_ID</key>
<string>123456789000-hjugbg6ud799v4c49dim8ce2usclthar.apps.googleusercontent.com</string>
<key>DATABASE_URL</key>
<string>https://mockproject-1234.firebaseio.com</string>
<key>GCM_SENDER_ID</key>
<string>123456789000</string>
<key>GOOGLE_APP_ID</key>
<string>1:123456789000:ios:f1bf012572b04063</string>
<key>IS_ADS_ENABLED</key>
<true/>
<key>IS_ANALYTICS_ENABLED</key>
<true/>
<key>IS_APPINVITE_ENABLED</key>
<true/>
<key>IS_GCM_ENABLED</key>
<true/>
<key>IS_SIGNIN_ENABLED</key>
<true/>
<key>PLIST_VERSION</key>
<string>1</string>
<key>PROJECT_ID</key>
<string>mockproject-1234</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.123456789000-hjugbg6ud799v4c49dim8ce2usclthar</string>
<key>STORAGE_BUCKET</key>
<string>mockproject-1234.appspot.com</string>
</dict>
</plist>

0 comments on commit b372ec5

Please sign in to comment.