This repository contains the source code of Firebase Data Connect Swift SDKs for development on iOS and other Apple platforms.
Firebase Data Connect (https://firebase.google.com/docs/data-connect) lets you build applications with CloudSQL for PostgreSQL.
Firebase is an app development platform with tools to help you build, grow, and monetize your app. More information about Firebase can be found on the official Firebase website.
This process shows you how to setup Firebase Data Connect tools with Xcode.
-
Get the Firebase Data Connect iOS SDK.
git clone https://github.com/firebase/data-connect-ios-sdk.git
-
Add it as a local package dependency in your Xcode project
- From your Xcode project, select
File -> Add Package Dependencies -> Add Local
. - Select the
data-connect-ios-sdk
folder containing the cloned SDK. - Add
FirebaseDataConnect
to your app target.
- From your Xcode project, select
-
Add and Edit Xcode Scheme
- From your list of schemes, select
New Scheme
. - Xcode should show you
Start FDC Tools
as a potential scheme. Select that.
- From your list of schemes, select
-
Adjust working directory
- Edit the
Start FDC Tools
Scheme fromEdit Scheme... -> Start FDC Tools
. - Go to
Run -> Options -> Working Directory
- Select
Custom working directory
and pick your Xcode project folder - This ensures that Firebase Data Connect tools start in the correct folder each time.
- Select
- Edit the
-
Run the
Start FDC Tools
target selectingMy Mac
as the device. -
This should start the tools in a separate browser window (or tab).
-
Now that you have the tools, try out our Codelab
-
Learn more about designing schemas, queries and mutations - Design Schemas
-
Generated SDKs are Swift packages. Add the generated SDKs to your project as a Local Package dependency and start using them in your app.
- Generated APIs support
@Observable
(Observation framework) for easy integration into SwiftUI apps.- UIKit apps can make use of the underlying
Combine
publishers.
- UIKit apps can make use of the underlying
- All Query and Mutation APIs are
async
calls and can participate in Swift concurrency.
- Generated APIs support
-
Since you cloned the
data-connect-ios-sdk
, be sure to reference your local folder to generate SDKs.- In the
connector.yaml
, configure the Swift SDK generation to point to the local path where you cloned the Data Connect iOS SDK using thecoreSdkPackageLocation
parameter. Example -generate: swiftSdk: outputDir: ../../dataconnect-generated/swift package: DefaultConnector #change this to your project specific name coreSdkPackageLocation: /Users/abc/Code/data-connect-ios-sdk
- In the
There are other paths to get setup with Firebase Data Connect tools such as from the Firebase Console. To learn more visit - Quick Start.
-
Comprehensive Sample app - FriendlyFlix
Instructions for Swift Package Manager support can be found in the SwiftPackageManager.md Markdown file.
See Contributing for more information on contributing to the Firebase Data Connect iOS SDK.
The contents of this repository are licensed under the Apache License, version 2.0.
Your use of Firebase is governed by the Terms of Service for Firebase Services.