You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Open the `data-connect-ios-sdk/Examples/FriendlyFlix` directory in VS Code.
44
-
2. Click on the Firebase Data Connect icon on the VS Code sidebar to load the Extension.
46
+
2. Click on the **Firebase Data Connect** icon on the VS Code sidebar to load the Firebase Data Connect Extension.
45
47
a. Sign in with your Google Account if you haven't already.
46
-
3. Click on "Connect a Firebase project" and choose the project where you have set up Data Connect.
47
-
4. Click on "Start Emulators" - this should generate the Swift SDK for you and start the emulators.
48
+
3. Click on **Connect a Firebase project** and choose the project you created in the first step.
49
+
4. Click on **Start emulators**.
48
50
49
51
### 4. Populate the database
50
52
In VS Code, open the `data-connect-ios-sdk/Examples/FriendlyFlix/dataconnect/data_seed.gql` file and click the
51
-
`Run (local)` button at the top of the file.
53
+
**Run (local)** button at the top of the file.
52
54
53
-
If you’d like to confirm that the data was correctly inserted,
55
+
If you'd like to confirm that the data was correctly inserted,
54
56
open `data-connect-ios-sdk/Examples/FriendlyFlix/dataconnect/movie-connector/queries.gql` and run the `ListMovies` query.
55
57
56
58
### 5. Run the app
57
59
58
60
1. Open `data-connect-ios-sdk/Examples/FriendlyFlix/app/FriendlyFlix/FriendlyFlix.xcodeproj` in Xcode
59
-
2. Press the Run button in Xcode to run the sample app on the iOS Simulator.
61
+
2. Wait for all packages to be resolved.
62
+
3. Select one of the iPhone Simulators as the run destination.
63
+
4. Press the **Run** button in Xcode to run the sample app on the iOS Simulator.
64
+
65
+
> [!Note] If you've used Firebase before, you might be wondering why you didn't have to download the
66
+
> `GoogleService-Info.plist` file. This file is only required when connecting your app to a Firebase
67
+
> project in the cloud, which you will do in the section.
60
68
61
69
## Connect to a production instance of CloudSQL
62
70
63
-
Once you've sucessfully run the app locally, you can set up a production instance of CloudSQL and deploy your Firebase Data Connect schema.
71
+
Once you've sucessfully run the app locally, you can set up a production instance of CloudSQL in your Firebase project and deploy your Firebase Data Connect schema.
64
72
65
73
### 1. Connect to your Firebase project
66
74
67
75
1. If you haven’t already, add an iOS app to your Firebase project
68
-
* In the [Firebase console](https://console.firebase.google.com), click on **+ Add app** to add your project, using `com.google.firebase.samples.FriendlyFlix` as the bundle ID.
76
+
* On the [Overview page](https://console.firebase.google.com/project/_/overview) of your Firebase project in the [Firebase console](https://console.firebase.google.com), click the **iOS+** icon to add your project, using `com.google.firebase.samples.FriendlyFlix` as the bundle ID (you can leave the *App nickname* and *App Store ID* blank)
77
+
* Click **Register app**.
69
78
* Click **Download GoogleService-Info.plist** to obtain your Firebase config file.
70
79
71
80
2. Move the `GoogleService-Info.plist` config file (downloaded in the previous step) into the root folder of the sample app in the
72
81
`data-connect-ios-sdk/Examples/FriendlyFlix/app/FriendlyFlix/FriendlyFlix/GoogleService-Info.plist` directory, replacing the existing `GoogleService-Info.plist` (which contains dummy values).
73
82
83
+
3. In the Firebase console, finish the **Add Firebase to your Apple app** flow by skipping over steps 3,4, and 5 - these were already done for you.
84
+
74
85
### 2. Upgrade your Firebase project to Blaze
75
86
76
87
1. Upgrade your project to the Blaze plan. This lets you create a Cloud SQL
@@ -90,10 +101,10 @@ To be able to sign in to the application, you need to enable Firebase Authentica
90
101
91
102
### 4. Provision a PostgreSQL database
92
103
93
-
1. Navigate to the [Data Connect section](https://console.firebase.google.com/u/0/project/_/dataconnect)
104
+
1. Navigate to the [Data Connect section](https://console.firebase.google.com/project/_/dataconnect)
94
105
of the Firebase console, click on the **Get started** button and follow the setup workflow:
95
106
96
-
- Select **Create new Cloud SQL instance**
107
+
- Select **Create new Cloud SQL instance**, and click **Next*.
97
108
- Select a location for your Cloud SQL for PostgreSQL database (this sample uses `us-central1`). If you choose a different location, you'll also need to change the `data-connect-ios-sdk/Examples/FriendlyFlix/dataconnect/dataconnect.yaml` file.
98
109
- Fill in the following fields for the **data source**:
99
110
- Cloud SQL Instance ID: `fdc-sql`
@@ -118,5 +129,5 @@ To be able to sign in to the application, you need to enable Firebase Authentica
118
129
119
130
### 6. Run the app
120
131
121
-
1. In Xcode, select **Product > Schemed > Edit Scheme**, and then disable the check box labeled "useEmulator" to use your production project instead.
132
+
1. In Xcode, select **Product > Scheme > Edit Scheme...**, and then disable the check box labeled "useEmulator" in the **Arguments Passed On Launch** section to use your production project instead.
122
133
2. Press the Run button in Xcode to run the sample app on the iOS Simulator.
0 commit comments