Skip to content

Commit 1696c5c

Browse files
committed
Merge remote-tracking branch 'origin/ah/release-10.26-merge-ca'
2 parents 520fb3e + 301399f commit 1696c5c

File tree

117 files changed

+9100
-11
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+9100
-11
lines changed

.github/workflows/vertexai.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: vertexai
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'FirebaseVertexAI**'
7+
- '.github/workflows/vertexai.yml'
8+
- 'Gemfile*'
9+
schedule:
10+
# Run every day at 11pm (PST) - cron uses UTC times
11+
- cron: '0 7 * * *'
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
spm:
19+
strategy:
20+
matrix:
21+
target: [iOS, macOS, catalyst]
22+
os: [macos-13]
23+
include:
24+
- os: macos-13
25+
xcode: Xcode_15.2
26+
runs-on: ${{ matrix.os }}
27+
env:
28+
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
29+
steps:
30+
- uses: actions/checkout@v4
31+
- name: Xcode
32+
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
33+
- name: Initialize xcodebuild
34+
run: scripts/setup_spm_tests.sh
35+
- uses: nick-fields/retry@v3
36+
with:
37+
timeout_minutes: 120
38+
max_attempts: 3
39+
retry_on: error
40+
retry_wait_seconds: 120
41+
command: scripts/build.sh FirebaseVertexAIUnit ${{ matrix.target }} spm
42+
43+
sample:
44+
strategy:
45+
matrix:
46+
# Test build with debug and release configs (whether or not DEBUG is set and optimization level)
47+
build: [build]
48+
include:
49+
- os: macos-13
50+
xcode: Xcode_15.0.1
51+
- os: macos-14
52+
xcode: Xcode_15.2
53+
runs-on: ${{ matrix.os }}
54+
steps:
55+
- uses: actions/checkout@v4
56+
- name: Xcode
57+
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
58+
- name: Initialize xcodebuild
59+
run: xcodebuild -list
60+
- name: Placeholder GoogleService-Info.plist for build testing
61+
run: cp FirebaseCore/Tests/Unit/Resources/GoogleService-Info.plist FirebaseVertexAI/Sample/
62+
- uses: nick-fields/retry@v3
63+
with:
64+
timeout_minutes: 120
65+
max_attempts: 3
66+
retry_on: error
67+
retry_wait_seconds: 120
68+
command: scripts/build.sh VertexSample iOS

Dangerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def labelsForModifiedFiles()
6464
labels.push("api: performance") if @has_performance_changes
6565
labels.push("api: remoteconfig") if @has_remoteconfig_changes
6666
labels.push("api: storage") if @has_storage_changes
67+
labels.push("api: vertexai") if @has_vertexai_changes
6768
labels.push("release-tooling") if @has_releasetooling_changes
6869
labels.push("public-api-change") if @has_api_changes
6970
return labels
@@ -100,7 +101,8 @@ has_license_changes = didModify(["LICENSE"])
100101
"Messaging",
101102
"Performance",
102103
"RemoteConfig",
103-
"Storage"
104+
"Storage",
105+
"VertexAI"
104106
]
105107

106108
## Product directories
@@ -149,6 +151,7 @@ has_license_changes = didModify(["LICENSE"])
149151
@has_remoteconfig_changes = hasChangesIn("FirebaseRemoteConfig")
150152
@has_remoteconfig_api_changes = hasChangesIn("FirebaseRemoteConfig/Sources/Public/")
151153
@has_storage_changes = hasChangesIn("FirebaseStorage")
154+
@has_vertexai_changes = hasChangesIn("FirebaseVertexAI")
152155

153156
@has_releasetooling_changes = hasChangesIn("ReleaseTooling/")
154157
@has_public_additions = hasAdditionsIn("Public/")

FirebaseCore/Sources/FIRApp.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,7 @@ + (void)registerSwiftComponents {
829829
@"FIRSessions" : @"fire-ses",
830830
@"FIRFunctionsComponent" : @"fire-fun",
831831
@"FIRStorageComponent" : @"fire-str",
832+
@"FIRVertexAIComponent" : @"fire-vertex",
832833
};
833834
for (NSString *className in swiftComponents.allKeys) {
834835
Class klass = NSClassFromString(className);

FirebaseCore/Sources/FIROptions.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ - (NSString *)libraryVersionID {
284284
// The unit tests are set up to catch anything that does not properly convert.
285285
NSString *version = FIRFirebaseVersion();
286286
NSArray *components = [version componentsSeparatedByString:@"."];
287-
NSString *major = [components objectAtIndex:0];
287+
NSString *major = [NSString stringWithFormat:@"%02d", [[components objectAtIndex:0] intValue]];
288288
NSString *minor = [NSString stringWithFormat:@"%02d", [[components objectAtIndex:1] intValue]];
289289
NSString *patch = [NSString stringWithFormat:@"%02d", [[components objectAtIndex:2] intValue]];
290290
kFIRLibraryVersionID = [NSString stringWithFormat:@"%@%@%@000", major, minor, patch];

FirebaseCore/Tests/Unit/FIROptionsTest.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ - (void)testVersionConsistency {
624624
int minor = (versionString[2] - '0') * 10 + versionString[3] - '0';
625625
int patch = (versionString[4] - '0') * 10 + versionString[5] - '0';
626626
NSString *str = [NSString stringWithFormat:@"%d.%d.%d", major, minor, patch];
627-
XCTAssertEqualObjects(str, FIRFirebaseVersion());
627+
XCTAssertTrue([FIRFirebaseVersion() hasPrefix:str]);
628628
}
629629

630630
// Repeat test with more Objective-C.
@@ -638,11 +638,11 @@ - (void)testVersionConsistency2 {
638638
NSRange major = NSMakeRange(0, 2);
639639
NSRange minor = NSMakeRange(2, 2);
640640
NSRange patch = NSMakeRange(4, 2);
641-
NSString *str =
642-
[NSString stringWithFormat:@"%@.%d.%d", [kFIRLibraryVersionID substringWithRange:major],
643-
[[kFIRLibraryVersionID substringWithRange:minor] intValue],
644-
[[kFIRLibraryVersionID substringWithRange:patch] intValue]];
645-
XCTAssertEqualObjects(str, FIRFirebaseVersion());
641+
NSString *str = [NSString
642+
stringWithFormat:@"%d.%d.%d", [[kFIRLibraryVersionID substringWithRange:major] intValue],
643+
[[kFIRLibraryVersionID substringWithRange:minor] intValue],
644+
[[kFIRLibraryVersionID substringWithRange:patch] intValue]];
645+
XCTAssertTrue([FIRFirebaseVersion() hasPrefix:str]);
646646
}
647647

648648
#pragma mark - Helpers

FirebaseVertexAI-Docs.podspec

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
Pod::Spec.new do |s|
2+
s.name = 'FirebaseVertexAI'
3+
s.version = '10.26.0'
4+
s.summary = 'Firebase VertexAI'
5+
6+
s.description = <<-DESC
7+
Placeholder podspec for docsgen only. Do not use this pod.
8+
DESC
9+
10+
s.homepage = 'https://firebase.google.com'
11+
s.license = { :type => 'Apache-2.0', :file => 'LICENSE' }
12+
s.authors = 'Google, Inc.'
13+
14+
s.source = {
15+
:git => 'https://github.com/firebase/firebase-ios-sdk.git',
16+
# TODO: this should be `'CocoaPods-' + s.version.to_s` (after May 14 2024)
17+
:tag => 'release-10.26'
18+
}
19+
20+
s.social_media_url = 'https://twitter.com/Firebase'
21+
22+
ios_deployment_target = '15.0'
23+
osx_deployment_target = '10.14'
24+
25+
s.ios.deployment_target = ios_deployment_target
26+
s.osx.deployment_target = osx_deployment_target
27+
28+
s.cocoapods_version = '>= 1.12.0'
29+
s.prefix_header_file = false
30+
31+
s.source_files = [
32+
'FirebaseVertexAI/Sources/**/*.swift',
33+
'FirebaseCore/Extension/*.h',
34+
'FirebaseAuth/Interop/*.h',
35+
]
36+
37+
s.swift_version = '5.3'
38+
39+
s.framework = 'Foundation'
40+
s.ios.framework = 'UIKit'
41+
s.osx.framework = 'AppKit'
42+
s.tvos.framework = 'UIKit'
43+
s.watchos.framework = 'WatchKit'
44+
45+
s.dependency 'FirebaseCore', '~> 10.0'
46+
s.dependency 'FirebaseCoreExtension'
47+
s.dependency 'FirebaseAuthInterop'
48+
s.dependency 'FirebaseAppCheckInterop', '~> 10.17'
49+
50+
s.pod_target_xcconfig = {
51+
'GCC_C_LANGUAGE_STANDARD' => 'c99',
52+
'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}"',
53+
'OTHER_CFLAGS' => '-fno-autolink'
54+
}
55+
end

FirebaseVertexAI/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# 10.26.0
2+
3+
- [feature] Initial release of the Vertex AI for Firebase SDK (public preview).
4+
Learn how to
5+
[get started](https://firebase.google.com/docs/vertex-ai/get-started?platform=ios)
6+
with the SDK in your app.

FirebaseVertexAI/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Vertex AI for Firebase SDK
2+
3+
**Preview**: Vertex AI for Firebase is in Public Preview, which means that the product is
4+
not subject to any SLA or deprecation policy and could change in backwards-incompatible
5+
ways.
6+
7+
- For developer documentation, please visit https://firebase.google.com/docs/vertex-ai.
8+
- Try out the [sample app](Sample/README.md) to get started.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"colors" : [
3+
{
4+
"idiom" : "universal"
5+
}
6+
],
7+
"info" : {
8+
"author" : "xcode",
9+
"version" : 1
10+
}
11+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"platform" : "ios",
6+
"size" : "1024x1024"
7+
}
8+
],
9+
"info" : {
10+
"author" : "xcode",
11+
"version" : 1
12+
}
13+
}

0 commit comments

Comments
 (0)