Skip to content

Conversation

ncooke3
Copy link
Member

@ncooke3 ncooke3 commented Sep 2, 2025

Goal: Generalize this script to replace with branch/revision/tip-of-main. Make able to use on any xcodeproj

Manual testing:

Version

nickcooke@nickcooke-mac2 firebase-ios-sdk (nc/qss) % scripts/quickstart_spm_xcodeproj.sh ~/Developer/quickstart-ios/authentication/AuthenticationExample.xcodeproj --version "10.25.0" 

nickcooke@nickcooke-mac2 quickstart-ios (mc/spm) % git diff
diff --git a/authentication/AuthenticationExample.xcodeproj/project.pbxproj b/authentication/AuthenticationExample.xcodeproj/project.pbxproj
index 06d89c49..a3815905 100644
--- a/authentication/AuthenticationExample.xcodeproj/project.pbxproj
+++ b/authentication/AuthenticationExample.xcodeproj/project.pbxproj
@@ -759,8 +759,8 @@
                        isa = XCRemoteSwiftPackageReference;
                        repositoryURL = "https://github.com/firebase/firebase-ios-sdk";
                        requirement = {
-                               kind = upToNextMajorVersion;
-                               minimumVersion = 11.7.0;
+                               kind = branch;
+                               branch = "10.25.0";
                        };
                };
                8D7951E72D3B037B000FD694 /* XCRemoteSwiftPackageReference "GoogleSignIn-iOS" */ = {

Prerelease (tip of main)

nickcooke@nickcooke-mac2 firebase-ios-sdk (nc/qss) % scripts/quickstart_spm_xcodeproj.sh ~/Developer/quickstart-ios/authentication/AuthenticationExample.xcodeproj --prerelease   

nickcooke@nickcooke-mac2 quickstart-ios (mc/spm) % git diff
diff --git a/authentication/AuthenticationExample.xcodeproj/project.pbxproj b/authentication/AuthenticationExample.xcodeproj/project.pbxproj
index 06d89c49..8a1e370d 100644
--- a/authentication/AuthenticationExample.xcodeproj/project.pbxproj
+++ b/authentication/AuthenticationExample.xcodeproj/project.pbxproj
@@ -759,8 +759,8 @@
                        isa = XCRemoteSwiftPackageReference;
                        repositoryURL = "https://github.com/firebase/firebase-ios-sdk";
                        requirement = {
-                               kind = upToNextMajorVersion;
-                               minimumVersion = 11.7.0;
+                               kind = revision;
+                               revision = "be9d9601cd15a2825e2d5ded170b658047e90671";
                        };
                };
                8D7951E72D3B037B000FD694 /* XCRemoteSwiftPackageReference "GoogleSignIn-iOS" */ = {

Commit

nickcooke@nickcooke-mac2 firebase-ios-sdk (nc/qss) % scripts/quickstart_spm_xcodeproj.sh ~/Developer/quickstart-ios/authentication/AuthenticationExample.xcodeproj --revision 85d91a89bd3fc882ed5458716fd5ff7772a6885a

nickcooke@nickcooke-mac2 quickstart-ios (mc/spm) % git diff
diff --git a/authentication/AuthenticationExample.xcodeproj/project.pbxproj b/authentication/AuthenticationExample.xcodeproj/project.pbxproj
index 06d89c49..2edfaf3d 100644
--- a/authentication/AuthenticationExample.xcodeproj/project.pbxproj
+++ b/authentication/AuthenticationExample.xcodeproj/project.pbxproj
@@ -759,8 +759,8 @@
                        isa = XCRemoteSwiftPackageReference;
                        repositoryURL = "https://github.com/firebase/firebase-ios-sdk";
                        requirement = {
-                               kind = upToNextMajorVersion;
-                               minimumVersion = 11.7.0;
+                               kind = revision;
+                               revision = "85d91a89bd3fc882ed5458716fd5ff7772a6885a";
                        };
                };
                8D7951E72D3B037B000FD694 /* XCRemoteSwiftPackageReference "GoogleSignIn-iOS" */ = {

Branch

nickcooke@nickcooke-mac2 firebase-ios-sdk (nc/qss) % scripts/quickstart_spm_xcodeproj.sh ~/Developer/quickstart-ios/authentication/AuthenticationExample.xcodeproj --branch nc/qss

nickcooke@nickcooke-mac2 quickstart-ios (mc/spm) % git diff
diff --git a/authentication/AuthenticationExample.xcodeproj/project.pbxproj b/authentication/AuthenticationExample.xcodeproj/project.pbxproj
index 06d89c49..7c8caa1b 100644
--- a/authentication/AuthenticationExample.xcodeproj/project.pbxproj
+++ b/authentication/AuthenticationExample.xcodeproj/project.pbxproj
@@ -759,8 +759,8 @@
                        isa = XCRemoteSwiftPackageReference;
                        repositoryURL = "https://github.com/firebase/firebase-ios-sdk";
                        requirement = {
-                               kind = upToNextMajorVersion;
-                               minimumVersion = 11.7.0;
+                               kind = branch;
+                               branch = "nc/qss";
                        };
                };
                8D7951E72D3B037B000FD694 /* XCRemoteSwiftPackageReference "GoogleSignIn-iOS" */ = {

Bad Args (exit 1)

Modify a .xcodeproj to use a specific branch, version, or commit for the
firebase-ios-sdk SPM dependency.

Usage: scripts/quickstart_spm_xcodeproj.sh <path_to.xcodeproj> [--version <version> | --revision <revision> | --prerelease | --branch <branch>]

Pattern to replace not found (exit 1)

Failed to find and replace the firebase-ios-sdk dependency. Check the regex pattern and project file structure.

#no-changelog

Copy link
Contributor

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

@ncooke3 ncooke3 changed the title feat(ci): Add support for testing SPM-based quickstarts feat(infra): Add support for modifying SPM-based xcodeprojs Sep 5, 2025
@ncooke3 ncooke3 changed the title feat(infra): Add support for modifying SPM-based xcodeprojs feat(infra): Add support for modifying SPM Firebase dep in xcodeprojs Sep 5, 2025
@ncooke3 ncooke3 requested a review from andrewheard September 5, 2025 16:27
Copy link
Contributor

@andrewheard andrewheard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks for setting this up!

In addition to your manual testing, the firebaseai / quickstart shows that it's still working correctly on CI too.

@ncooke3 ncooke3 merged commit a18f810 into main Sep 5, 2025
47 checks passed
@ncooke3 ncooke3 deleted the nc/qss branch September 5, 2025 18:45
@firebase firebase locked and limited conversation to collaborators Oct 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants