Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
79 changes: 79 additions & 0 deletions .github/workflows/firebaseai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,82 @@ jobs:
run: cp ./mock-GoogleService-Info.plist ./firebaseai/GoogleService-Info.plist
- name: Build and Test SwiftUI (${{ matrix.platform }})
run: ./scripts/test.sh

cocoapods:
name: cocoapods (Xcode ${{ matrix.xcode }} - ${{ matrix.platform }})
strategy:
matrix:
include:
- os: macos-15
xcode: "16.4"
platform: iOS
device: iPhone 16
- os: macos-26
xcode: "26.0"
platform: iOS
device: iPhone 16e
runs-on: macOS-15
env:
SETUP: firebaseai
SPM: false
LEGACY: false
DIR: firebaseai
OS: ${{ matrix.platform }}
DEVICE: ${{ matrix.device }}
TEST: false
XCODE_VERSION: ${{ matrix.xcode }}
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup
run: |
cd firebaseai/
gem install bundler
bundle install
gem install xcpretty
bundle exec pod install --repo-update
../scripts/install_prereqs/firebaseai.sh
- name: Placeholder GoogleService-Info.plist good enough for build only testing.
run: cp ./mock-GoogleService-Info.plist ./firebaseai/GoogleService-Info.plist
- name: Build Swift
run: ./scripts/test.sh
env:
SCHEME: "FirebaseAIExample (iOS) - CocoaPods"

zip:
name: zip (Xcode ${{ matrix.xcode }} - ${{ matrix.platform }})
strategy:
matrix:
include:
- os: macos-15
xcode: "16.4"
platform: iOS
device: iPhone 16
- os: macos-26
xcode: "26.0"
platform: iOS
device: iPhone 16e
runs-on: macOS-15
env:
SETUP: firebaseai
SPM: true
LEGACY: false
DIR: firebaseai
OS: ${{ matrix.platform }}
DEVICE: ${{ matrix.device }}
TEST: false
XCODE_VERSION: ${{ matrix.xcode }}
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup
run: |
gem install xcpretty
- name: Placeholder GoogleService-Info.plist good enough for build only testing.
run: cp ./mock-GoogleService-Info.plist ./firebaseai/GoogleService-Info.plist
- name: Build Swift
run: ./scripts/test.sh
env:
SCHEME: "FirebaseAIExample (iOS) - Zip"
2 changes: 1 addition & 1 deletion firebaseai/ChatExample/Models/ChatMessage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAI
import FirebaseAILogic
import Foundation

enum Participant {
Expand Down
2 changes: 1 addition & 1 deletion firebaseai/ChatExample/Screens/ConversationScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAI
import FirebaseAILogic
import GenerativeAIUIComponents
import SwiftUI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAI
import FirebaseAILogic
import Foundation
import UIKit

Expand Down
2 changes: 1 addition & 1 deletion firebaseai/ChatExample/Views/ErrorDetailsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAI
import FirebaseAILogic
import MarkdownUI
import SwiftUI

Expand Down
2 changes: 1 addition & 1 deletion firebaseai/ChatExample/Views/ErrorView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAI
import FirebaseAILogic
import SwiftUI

struct ErrorView: View {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAI
import FirebaseAILogic
import SwiftUI

/// A view that displays a chat message that is grounded in Google Search.
Expand Down
2 changes: 1 addition & 1 deletion firebaseai/ChatExample/Views/MessageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import MarkdownUI
import SwiftUI
import FirebaseAI
import FirebaseAILogic

struct RoundedCorner: Shape {
var radius: CGFloat = .infinity
Expand Down
434 changes: 424 additions & 10 deletions firebaseai/FirebaseAIExample.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "2600"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "86BB55BD2E8B16DC0054B8B5"
BuildableName = "FirebaseAIExample-CocoaPods.app"
BlueprintName = "FirebaseAIExample-CocoaPods"
ReferencedContainer = "container:FirebaseAIExample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "86BB55BD2E8B16DC0054B8B5"
BuildableName = "FirebaseAIExample-CocoaPods.app"
BlueprintName = "FirebaseAIExample-CocoaPods"
ReferencedContainer = "container:FirebaseAIExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "86BB55BD2E8B16DC0054B8B5"
BuildableName = "FirebaseAIExample-CocoaPods.app"
BlueprintName = "FirebaseAIExample-CocoaPods"
ReferencedContainer = "container:FirebaseAIExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "2600"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "86BB55332E8AE4240054B8B5"
BuildableName = "FirebaseAIExample-Zip.app"
BlueprintName = "FirebaseAIExample-Zip"
ReferencedContainer = "container:FirebaseAIExample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "86BB55332E8AE4240054B8B5"
BuildableName = "FirebaseAIExample-Zip.app"
BlueprintName = "FirebaseAIExample-Zip"
ReferencedContainer = "container:FirebaseAIExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "86BB55332E8AE4240054B8B5"
BuildableName = "FirebaseAIExample-Zip.app"
BlueprintName = "FirebaseAIExample-Zip"
ReferencedContainer = "container:FirebaseAIExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
2 changes: 1 addition & 1 deletion firebaseai/FirebaseAIExample/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

import SwiftUI
import FirebaseAI
import FirebaseAILogic

enum BackendOption: String, CaseIterable, Identifiable {
case googleAI = "Gemini Developer API"
Expand Down
Loading
Loading