Skip to content

Commit 6ffe4b0

Browse files
committed
Add placeholder GoogleService-Info.plist to Vertex AI sample (#12724)
1 parent 73c7ee9 commit 6ffe4b0

File tree

4 files changed

+66
-2
lines changed

4 files changed

+66
-2
lines changed

FirebaseVertexAI/Sample/GenerativeAISample.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@
487487
"@executable_path/Frameworks",
488488
);
489489
MARKETING_VERSION = 1.0;
490-
PRODUCT_BUNDLE_IDENTIFIER = com.example.google.generativeai.GenerativeAISample;
490+
PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.VertexAISample;
491491
PRODUCT_NAME = "$(TARGET_NAME)";
492492
SWIFT_EMIT_LOC_STRINGS = YES;
493493
SWIFT_VERSION = 5.0;
@@ -517,7 +517,7 @@
517517
"@executable_path/Frameworks",
518518
);
519519
MARKETING_VERSION = 1.0;
520-
PRODUCT_BUNDLE_IDENTIFIER = com.example.google.generativeai.GenerativeAISample;
520+
PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.VertexAISample;
521521
PRODUCT_NAME = "$(TARGET_NAME)";
522522
SWIFT_EMIT_LOC_STRINGS = YES;
523523
SWIFT_VERSION = 5.0;

FirebaseVertexAI/Sample/GenerativeAISample/GenerativeAISampleApp.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ import SwiftUI
1919
struct GenerativeAISampleApp: App {
2020
init() {
2121
FirebaseApp.configure()
22+
23+
if let firebaseApp = FirebaseApp.app(), firebaseApp.options.projectID == "mockproject-1234" {
24+
guard let bundleID = Bundle.main.bundleIdentifier else { fatalError() }
25+
fatalError("You must create and/or download a valid `GoogleService-Info.plist` file for"
26+
+ " \(bundleID) from https://console.firebase.google.com to run this sample. Replace the"
27+
+ " existing `GoogleService-Info.plist` file in the `FirebaseVertexAI/Sample` directory"
28+
+ " with this new file.")
29+
}
2230
}
2331

2432
var body: some Scene {
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>AD_UNIT_ID_FOR_BANNER_TEST</key>
6+
<string>ca-app-pub-3940256099942544/2934735716</string>
7+
<key>AD_UNIT_ID_FOR_INTERSTITIAL_TEST</key>
8+
<string>ca-app-pub-3940256099942544/4411468910</string>
9+
<key>API_KEY</key>
10+
<string>AIzaSyAzlj4APqi5S58nFtE52Da0fYBOHA2MhaY</string>
11+
<key>BUNDLE_ID</key>
12+
<string>com.google.firebase.VertexAISample</string>
13+
<key>CLIENT_ID</key>
14+
<string>123456789000-hjugbg6ud799v4c49dim8ce2usclthar.apps.googleusercontent.com</string>
15+
<key>DATABASE_URL</key>
16+
<string>https://mockproject-1234.firebaseio.com</string>
17+
<key>GCM_SENDER_ID</key>
18+
<string>123456789000</string>
19+
<key>GOOGLE_APP_ID</key>
20+
<string>1:123456789000:ios:f1bf012572b04063</string>
21+
<key>IS_ADS_ENABLED</key>
22+
<true/>
23+
<key>IS_ANALYTICS_ENABLED</key>
24+
<true/>
25+
<key>IS_APPINVITE_ENABLED</key>
26+
<true/>
27+
<key>IS_GCM_ENABLED</key>
28+
<true/>
29+
<key>IS_SIGNIN_ENABLED</key>
30+
<true/>
31+
<key>PLIST_VERSION</key>
32+
<string>1</string>
33+
<key>PROJECT_ID</key>
34+
<string>mockproject-1234</string>
35+
<key>REVERSED_CLIENT_ID</key>
36+
<string>com.googleusercontent.apps.123456789000-hjugbg6ud799v4c49dim8ce2usclthar</string>
37+
<key>STORAGE_BUCKET</key>
38+
<string>mockproject-1234.appspot.com</string>
39+
</dict>
40+
</plist>

FirebaseVertexAI/Sample/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Vertex AI for Firebase Sample App
2+
3+
You can try out the SDK quickly, see a complete implementation of various use
4+
cases, or use the sample app if you don't have your own Apple platforms app. To
5+
use the sample app, you'll need to perform the following steps:
6+
1. Download
7+
[vertexai-preview-0.1.0.zip](https://github.com/firebase/firebase-ios-sdk/archive/refs/heads/vertexai-preview-0.1.0.zip)
8+
for the latest release of the SDK
9+
1. Extract the zip and open `GenerativeAISample.xcodeproj` in the
10+
`FirebaseVertexAI/Sample` directory
11+
1. [Register the sample app](https://firebase.google.com/docs/ios/setup#register-app)
12+
in your Firebase project
13+
- The default bundle ID is `com.google.firebase.VertexAISample`
14+
1. [Download the `GoogleService-Info.plist`](https://firebase.google.com/docs/ios/setup#add-config-file)
15+
to the `FirebaseVertexAI/Sample` directory, overwriting the placeholder file
16+
with the same name

0 commit comments

Comments
 (0)