Skip to content

Commit 6498909

Browse files
authored
Enable Firebase AppCheck with Sample + isolate AppCheckCore for Google SignIn (#107)
* Add CI workflow, build instructions, and agent guidelines - Introduced CI workflow for build and package validation using GitHub Actions. - Added detailed building instructions for local development in `docs/BUILDING.md`. - Created `AGENTS.md` to outline agent instructions and best practices for contributions. - Updated `Readme.md` to include CI and publishing information. - Enhanced `CONTRIBUTING.md` with guidelines for new contributors and repository orientation. * Add GitHub Actions workflow for publishing NuGet packages and update README files * Add AppCheckCore package and wire SignIn to it * Modernize Firebase.AppCheck to 12.5.0.4 line * Enable AppCheck and AppCheckCore artifacts in Cake * ci: bootstrap publish AppCheckCore before Cake * Add step to un-quarantine built frameworks before packaging * Update build settings to disable code signing for Xcode frameworks * ci: pin dotnet 10.0.100 and stabilize externals build * ci: enforce .NET SDK version 10.0.100 and update build scripts for consistency * ci: update .NET SDK setup to use global.json and improve build scripts * feat: add Firebase App Check icons and update ApiDefinition.cs for ObjCRuntime import * ci: update CI workflow to use macOS 15 and add toolchain version checks * Firebase.AppCheck: fix provider factory binding (protocol type) * samples: add Firebase AppCheck sample (debug provider) * docs: update BUILDING.md to include GitHub Packages feed configuration for fork contributors * Add scene manifest configuration and update SceneDelegate for UIWindow setup * Refactor AppDelegate to improve Firebase configuration and layout constraints * fix: update Firebase AppCheck dependencies to include Installations * feat: add README for Firebase App Check sample with setup instructions and troubleshooting * Firebase.AppCheck: expose provider factory API (fork) * fix: update versioning logic in common.cake to handle pre-release suffixes * fix(appcheck): avoid protocol cast via objc_msgSend * docs: document -local vs -fork workflow * fix: update package version to remove fork suffix * fix(signin): replace AppCheckCore package reference with project reference * fix(appcheck): update SetAppCheckProviderFactory and CreateProviderWithApp to use NSObject instead of interfaces * fix(appcheck): update artifact dependencies and add package references for PromisesObjC and GoogleUtilities to AppCheckCore.csproj * fix(appcheck): refactor AppCheck provider interfaces and remove Extensions.cs * Enable AppCheck mode selection and configuration in sample app
1 parent eb001c7 commit 6498909

43 files changed

Lines changed: 1218 additions & 62 deletions

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,20 @@ permissions:
1717

1818
jobs:
1919
build:
20-
runs-on: macos-14
20+
runs-on: macos-15
2121
env:
2222
CAKE_NAMES: ${{ inputs.names || 'Google.SignIn' }}
2323
steps:
2424
- name: Checkout
2525
uses: actions/checkout@v4
2626

27-
- name: Setup .NET (global.json)
27+
- name: Toolchain versions
28+
run: |
29+
xcodebuild -version
30+
swift --version
31+
xcode-select -p
32+
33+
- name: Setup .NET SDK
2834
uses: actions/setup-dotnet@v4
2935
with:
3036
global-json-file: global.json

.github/workflows/publish-github-packages.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,33 @@ permissions:
1717

1818
jobs:
1919
publish:
20-
runs-on: macos-14
20+
runs-on: macos-15
2121
env:
2222
CAKE_NAMES: ${{ inputs.names || 'Google.SignIn' }}
2323
steps:
2424
- name: Checkout
2525
uses: actions/checkout@v4
2626

27-
- name: Setup .NET (global.json)
27+
- name: Toolchain versions
28+
run: |
29+
xcodebuild -version
30+
swift --version
31+
xcode-select -p
32+
33+
- name: Setup .NET SDK
2834
uses: actions/setup-dotnet@v4
2935
with:
3036
global-json-file: global.json
3137

38+
- name: Configure GitHub Packages NuGet source (this repo owner)
39+
run: |
40+
dotnet nuget remove source "github-owner" >/dev/null 2>&1 || true
41+
dotnet nuget add source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
42+
--name "github-owner" \
43+
--username "${{ github.actor }}" \
44+
--password "${{ secrets.GITHUB_TOKEN }}" \
45+
--store-password-in-clear-text
46+
3247
- name: Restore .NET workloads
3348
run: dotnet workload restore Xamarin.Google.sln
3449

CONTRIBUTING.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,31 @@ Most contributions fall into one of these buckets:
4242
* **Signing vs build-only**: device builds require provisioning; CI should validate “build-only” (no signing) where possible.
4343
* **URL scheme callbacks**: OAuth-style flows often require `Info.plist` URL scheme changes in addition to config files.
4444

45+
## Versioning notes (Cake vs .csproj)
46+
47+
The Cake pipeline updates versions in binding `.csproj` files during the `externals` step:
48+
49+
* `FileVersion` is always set to `artifact.NugetVersion` (from `components.cake`).
50+
* `PackageVersion` is set to `artifact.NugetVersion` **unless** the project already specifies a pre-release suffix (e.g. `12.5.0.4-fork`).
51+
52+
This allows forked builds to publish `-fork` (or similar) packages without changing the shared component version line in `components.cake`, while keeping deterministic, aligned build outputs.
53+
54+
## Fork testing suffix policy (`-local` vs `-fork`)
55+
56+
When validating a binding fix before upstream release:
57+
58+
* Use `-local` for packages built on a developer machine and consumed from a local NuGet source.
59+
* Use `-fork` for packages built by your fork CI and published to GitHub Packages.
60+
61+
Suggested flow:
62+
63+
1. Set a temporary prerelease `PackageVersion` (for example `12.5.0.4-fork` or `12.5.0.4-local`) in the affected project(s).
64+
2. Build/publish from the matching channel (local machine for `-local`, GitHub Actions for `-fork`).
65+
3. Consume that package from downstream repos to validate the fix.
66+
4. Before opening an upstream PR, revert temporary prerelease versions/references back to the canonical version line expected upstream.
67+
68+
Important: do not merge or submit upstream PRs with temporary fork-only or local-only package versions unless explicitly requested by maintainers.
69+
4570
## Validation checklist (before requesting review)
4671

4772
At minimum, validate the component(s) you touched:

build.cake

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ Setup (context =>
6363
{
6464
IS_LOCAL_BUILD = string.IsNullOrWhiteSpace (EnvironmentVariable ("AGENT_ID"));
6565
Information ($"Is a local build? {IS_LOCAL_BUILD}");
66-
BACKSLASH = IS_LOCAL_BUILD ? @"\" : @"\";
66+
// Always use forward slashes for MSBuild targets on all platforms
67+
BACKSLASH = "/";
6768
});
6869

6970
Task("build")
@@ -174,17 +175,18 @@ Task ("libs")
174175
.IsDependentOn("ci-setup")
175176
.Does(() =>
176177
{
177-
var msBuildSettings = new DotNetCoreMSBuildSettings ();
178178
var dotNetCoreBuildSettings = new DotNetCoreBuildSettings {
179179
Configuration = "Release",
180180
Verbosity = DotNetCoreVerbosity.Diagnostic,
181-
MSBuildSettings = msBuildSettings
181+
NoRestore = false
182182
};
183183

184-
foreach (var target in SOURCES_TARGETS)
185-
msBuildSettings.Targets.Add($@"source\{target}");
186-
187-
DotNetCoreBuild(SOLUTION_PATH, dotNetCoreBuildSettings);
184+
// Build each artifact's csproj directly instead of using solution targets
185+
foreach (var artifact in ARTIFACTS_TO_BUILD) {
186+
var csprojPath = $"./source/{artifact.ComponentGroup}/{artifact.CsprojName}/{artifact.CsprojName}.csproj";
187+
Information ($"Building: {csprojPath}");
188+
DotNetCoreBuild(csprojPath, dotNetCoreBuildSettings);
189+
}
188190
});
189191

190192
Task ("samples")
@@ -199,13 +201,22 @@ Task ("samples")
199201
var dotNetCoreBuildSettings = new DotNetCoreBuildSettings {
200202
Configuration = "Release",
201203
Verbosity = DotNetCoreVerbosity.Diagnostic,
204+
NoRestore = false,
202205
MSBuildSettings = msBuildSettings
203206
};
204207

205-
foreach (var target in SAMPLES_TARGETS)
206-
msBuildSettings.Targets.Add($@"samples-using-source\{target}");
207-
208-
DotNetCoreBuild(SOLUTION_PATH, dotNetCoreBuildSettings);
208+
// Build each sample csproj directly
209+
foreach (var artifact in ARTIFACTS_TO_BUILD) {
210+
if (artifact.Samples == null)
211+
continue;
212+
foreach (var sample in artifact.Samples) {
213+
var samplePath = $"./samples/{artifact.ComponentGroup}/{sample}/{sample}.csproj";
214+
if (FileExists(samplePath)) {
215+
Information ($"Building sample: {samplePath}");
216+
DotNetCoreBuild(samplePath, dotNetCoreBuildSettings);
217+
}
218+
}
219+
}
209220
});
210221

211222
Task ("nuget")
@@ -222,8 +233,12 @@ Task ("nuget")
222233
Verbosity = DotNetCoreVerbosity.Diagnostic,
223234
};
224235

225-
foreach (var target in SOURCES_TARGETS)
226-
DotNetCorePack($"./source/{target}", dotNetCorePackSettings);
236+
// Pack each artifact's csproj directly
237+
foreach (var artifact in ARTIFACTS_TO_BUILD) {
238+
var csprojPath = $"./source/{artifact.ComponentGroup}/{artifact.CsprojName}/{artifact.CsprojName}.csproj";
239+
Information ($"Packing: {csprojPath}");
240+
DotNetCorePack(csprojPath, dotNetCorePackSettings);
241+
}
227242
});
228243

229244
Task ("clean")

common.cake

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ void UpdateVersionInCsproj (Artifact artifact)
6161
var componentGroup = artifact.ComponentGroup.ToString ();
6262
var csprojPath = $"./source/{componentGroup}/{artifact.CsprojName}/{artifact.CsprojName}.csproj";
6363
XmlPoke(csprojPath, "/Project/PropertyGroup/FileVersion", artifact.NugetVersion);
64-
XmlPoke(csprojPath, "/Project/PropertyGroup/PackageVersion", artifact.NugetVersion);
64+
var currentPackageVersion = XmlPeek(csprojPath, "/Project/PropertyGroup/PackageVersion");
65+
if (!currentPackageVersion.Contains("-"))
66+
XmlPoke(csprojPath, "/Project/PropertyGroup/PackageVersion", artifact.NugetVersion);
6567
}
6668

6769
void CreateAndInstallPodfile (Artifact artifact)
@@ -345,6 +347,14 @@ void BuildXcodeFatFramework (FilePath xcodeProject, PodSpec [] podSpecs, Platfor
345347

346348
workingDirectory = workingDirectory ?? Directory("./externals/");
347349
buildSettings = buildSettings ?? new Dictionary<string, string> ();
350+
if (!buildSettings.ContainsKey("CODE_SIGNING_ALLOWED"))
351+
buildSettings["CODE_SIGNING_ALLOWED"] = "NO";
352+
if (!buildSettings.ContainsKey("CODE_SIGNING_REQUIRED"))
353+
buildSettings["CODE_SIGNING_REQUIRED"] = "NO";
354+
if (!buildSettings.ContainsKey("CODE_SIGN_IDENTITY"))
355+
buildSettings["CODE_SIGN_IDENTITY"] = "";
356+
if (!buildSettings.ContainsKey("EXPANDED_CODE_SIGN_IDENTITY"))
357+
buildSettings["EXPANDED_CODE_SIGN_IDENTITY"] = "";
348358

349359
foreach (var podSpec in podSpecs) {
350360
var target = podSpec.TargetName;
@@ -423,6 +433,14 @@ void BuildXcodeXcframework (FilePath xcodeProject, PodSpec [] podSpecs, Platform
423433

424434
workingDirectory = workingDirectory ?? Directory ("./externals/");
425435
buildSettings = buildSettings ?? new Dictionary<string, string> ();
436+
if (!buildSettings.ContainsKey("CODE_SIGNING_ALLOWED"))
437+
buildSettings["CODE_SIGNING_ALLOWED"] = "NO";
438+
if (!buildSettings.ContainsKey("CODE_SIGNING_REQUIRED"))
439+
buildSettings["CODE_SIGNING_REQUIRED"] = "NO";
440+
if (!buildSettings.ContainsKey("CODE_SIGN_IDENTITY"))
441+
buildSettings["CODE_SIGN_IDENTITY"] = "";
442+
if (!buildSettings.ContainsKey("EXPANDED_CODE_SIGN_IDENTITY"))
443+
buildSettings["EXPANDED_CODE_SIGN_IDENTITY"] = "";
426444

427445
foreach (var podSpec in podSpecs) {
428446
Information ($"Building the following framework: {podSpec.FrameworkName}...");

components.cake

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Artifact FIREBASE_PERFORMANCE_MONITORING_ARTIFACT = new Artifact ("Firebase.Per
1414
Artifact FIREBASE_REMOTE_CONFIG_ARTIFACT = new Artifact ("Firebase.RemoteConfig", "12.5.0.4", "15.0", ComponentGroup.Firebase, csprojName: "RemoteConfig");
1515
Artifact FIREBASE_STORAGE_ARTIFACT = new Artifact ("Firebase.Storage", "12.5.0.4", "15.0", ComponentGroup.Firebase, csprojName: "Storage");
1616
//Artifact FIREBASE_APP_DISTRIBUTION_ARTIFACT = new Artifact ("Firebase.AppDistribution", "8.10.0.1", "15.0", ComponentGroup.Firebase, csprojName: "AppDistribution");
17-
//Artifact FIREBASE_APP_CHECK_ARTIFACT = new Artifact ("Firebase.AppCheck", "8.10.0.1", "15.0", ComponentGroup.Firebase, csprojName: "AppCheck");
17+
Artifact FIREBASE_APP_CHECK_ARTIFACT = new Artifact ("Firebase.AppCheck", "12.5.0.4", "15.0", ComponentGroup.Firebase, csprojName: "AppCheck");
1818

1919
// Google artifacts available to be built. These artifacts generate NuGets.
2020
Artifact GOOGLE_ANALYTICS_ARTIFACT = new Artifact ("Google.Analytics", "3.20.0.2", "15.0", ComponentGroup.Google, csprojName: "Analytics");
@@ -23,6 +23,7 @@ Artifact GOOGLE_MAPS_ARTIFACT = new Artifact ("Google.Maps"
2323
Artifact GOOGLE_MOBILE_ADS_ARTIFACT = new Artifact ("Google.MobileAds", "8.13.0.3", "15.0", ComponentGroup.Google, csprojName: "MobileAds");
2424
Artifact GOOGLE_UMP_ARTIFACT = new Artifact ("Google.UserMessagingPlatform", "1.1.0.1", "15.0", ComponentGroup.Google, csprojName: "UserMessagingPlatform");
2525
Artifact GOOGLE_PLACES_ARTIFACT = new Artifact ("Google.Places", "7.4.0.2", "15.0", ComponentGroup.Google, csprojName: "Places");
26+
Artifact GOOGLE_APP_CHECK_CORE_ARTIFACT = new Artifact ("Google.AppCheckCore", "11.2.0.0", "15.0", ComponentGroup.Google, csprojName: "AppCheckCore");
2627
Artifact GOOGLE_SIGN_IN_ARTIFACT = new Artifact ("Google.SignIn", "9.0.0.0", "15.0", ComponentGroup.Google, csprojName: "SignIn");
2728
Artifact GOOGLE_TAG_MANAGER_ARTIFACT = new Artifact ("Google.TagManager", "7.4.0.2", "15.0", ComponentGroup.Google, csprojName: "TagManager");
2829

@@ -64,7 +65,7 @@ var ARTIFACTS = new Dictionary<string, Artifact> {
6465
{ "Firebase.RemoteConfig", FIREBASE_REMOTE_CONFIG_ARTIFACT },
6566
{ "Firebase.Storage", FIREBASE_STORAGE_ARTIFACT },
6667
// { "Firebase.AppDistribution", FIREBASE_APP_DISTRIBUTION_ARTIFACT },
67-
// { "Firebase.AppCheck", FIREBASE_APP_CHECK_ARTIFACT },
68+
{ "Firebase.AppCheck", FIREBASE_APP_CHECK_ARTIFACT },
6869

6970
{ "Google.GoogleAppMeasurement", GOOGLE_GOOGLE_APP_MEASUREMENT_ARTIFACT },
7071
{ "Google.Analytics", GOOGLE_ANALYTICS_ARTIFACT },
@@ -74,6 +75,7 @@ var ARTIFACTS = new Dictionary<string, Artifact> {
7475
{ "Google.UserMessagingPlatform", GOOGLE_UMP_ARTIFACT },
7576
{ "Google.Places", GOOGLE_PLACES_ARTIFACT },
7677
{ "Google.SignIn", GOOGLE_SIGN_IN_ARTIFACT },
78+
{ "Google.AppCheckCore", GOOGLE_APP_CHECK_CORE_ARTIFACT },
7779
{ "Google.TagManager", GOOGLE_TAG_MANAGER_ARTIFACT },
7880
{ "Google.GTMSessionFetcher", GOOGLE_GTM_SESSION_FETCHER_ARTIFACT },
7981
{ "Google.PromisesObjC", GOOGLE_PROMISES_OBJC_ARTIFACT },
@@ -113,16 +115,17 @@ void SetArtifactsDependencies ()
113115
FIREBASE_REMOTE_CONFIG_ARTIFACT.Dependencies = new [] { FIREBASE_CORE_ARTIFACT, FIREBASE_INSTALLATIONS_ARTIFACT, FIREBASE_AB_TESTING_ARTIFACT };
114116
FIREBASE_STORAGE_ARTIFACT.Dependencies = new [] { FIREBASE_CORE_ARTIFACT, FIREBASE_DATABASE_ARTIFACT, GOOGLE_GTM_SESSION_FETCHER_ARTIFACT /* Needed for sample FIREBASE_AUTH_ARTIFACT */ };
115117
// FIREBASE_APP_DISTRIBUTION_ARTIFACT.Dependencies = new [] { FIREBASE_CORE_ARTIFACT, FIREBASE_INSTALLATIONS_ARTIFACT };
116-
// FIREBASE_APP_CHECK_ARTIFACT.Dependencies = new [] { FIREBASE_CORE_ARTIFACT };
118+
FIREBASE_APP_CHECK_ARTIFACT.Dependencies = new [] { FIREBASE_CORE_ARTIFACT, FIREBASE_INSTALLATIONS_ARTIFACT, GOOGLE_APP_CHECK_CORE_ARTIFACT };
117119

118120
GOOGLE_ANALYTICS_ARTIFACT.Dependencies = null;
119121
GOOGLE_CAST_ARTIFACT.Dependencies = new [] { FIREBASE_CORE_ARTIFACT };
120122
GOOGLE_MAPS_ARTIFACT.Dependencies = null;
121123
GOOGLE_MOBILE_ADS_ARTIFACT.Dependencies = new [] { FIREBASE_CORE_ARTIFACT };
122124
GOOGLE_UMP_ARTIFACT.Dependencies = null;
123125
GOOGLE_PLACES_ARTIFACT.Dependencies = null;
124-
GOOGLE_SIGN_IN_ARTIFACT.Dependencies = new [] { GOOGLE_GTM_SESSION_FETCHER_ARTIFACT, GOOGLE_PROMISES_OBJC_ARTIFACT, GOOGLE_GOOGLE_UTILITIES_ARTIFACT };
126+
GOOGLE_SIGN_IN_ARTIFACT.Dependencies = new [] { GOOGLE_GTM_SESSION_FETCHER_ARTIFACT, GOOGLE_PROMISES_OBJC_ARTIFACT, GOOGLE_GOOGLE_UTILITIES_ARTIFACT, GOOGLE_APP_CHECK_CORE_ARTIFACT };
125127
GOOGLE_TAG_MANAGER_ARTIFACT.Dependencies = new [] { FIREBASE_CORE_ARTIFACT, FIREBASE_INSTALLATIONS_ARTIFACT, FIREBASE_ANALYTICS_ARTIFACT };
128+
GOOGLE_APP_CHECK_CORE_ARTIFACT.Dependencies = new [] { GOOGLE_PROMISES_OBJC_ARTIFACT, GOOGLE_GOOGLE_UTILITIES_ARTIFACT };
126129
GOOGLE_PROMISES_OBJC_ARTIFACT.Dependencies = null;
127130
GOOGLE_GTM_SESSION_FETCHER_ARTIFACT.Dependencies = null;
128131
GOOGLE_NANOPB_ARTIFACT.Dependencies = null;
@@ -209,9 +212,9 @@ void SetArtifactsPodSpecs ()
209212
// FIREBASE_APP_DISTRIBUTION_ARTIFACT.PodSpecs = new [] {
210213
// PodSpec.Create ("Firebase", "8.10.0", frameworkSource: FrameworkSource.Pods, frameworkName: "FirebaseAppDistribution", targetName: "FirebaseAppDistribution", subSpecs: new [] { "AppDistribution" })
211214
// };
212-
// FIREBASE_APP_CHECK_ARTIFACT.PodSpecs = new [] {
213-
// PodSpec.Create ("Firebase", "8.10.0", frameworkSource: FrameworkSource.Pods, frameworkName: "FirebaseAppCheck", targetName: "FirebaseAppCheck", subSpecs: new [] { "AppCheck" })
214-
// };
215+
FIREBASE_APP_CHECK_ARTIFACT.PodSpecs = new [] {
216+
PodSpec.Create ("FirebaseAppCheck", "12.5.0", frameworkSource: FrameworkSource.Pods)
217+
};
215218

216219
// Google components
217220
GOOGLE_ANALYTICS_ARTIFACT.PodSpecs = new [] {
@@ -235,9 +238,11 @@ void SetArtifactsPodSpecs ()
235238
GOOGLE_SIGN_IN_ARTIFACT.PodSpecs = new [] {
236239
PodSpec.Create ("GoogleSignIn", "9.0.0", frameworkSource: FrameworkSource.Pods),
237240
PodSpec.Create ("AppAuth", "2.0.0", frameworkSource: FrameworkSource.Pods),
238-
PodSpec.Create ("AppCheckCore", "11.2.0", frameworkSource: FrameworkSource.Pods),
239241
PodSpec.Create ("GTMAppAuth", "5.0.0", frameworkSource: FrameworkSource.Pods),
240242
};
243+
GOOGLE_APP_CHECK_CORE_ARTIFACT.PodSpecs = new [] {
244+
PodSpec.Create ("AppCheckCore", "11.2.0", frameworkSource: FrameworkSource.Pods),
245+
};
241246
GOOGLE_TAG_MANAGER_ARTIFACT.PodSpecs = new [] {
242247
PodSpec.Create ("GoogleTagManager", "7.4.0")
243248
};
@@ -421,7 +426,7 @@ void SetArtifactsSamples ()
421426
FIREBASE_REMOTE_CONFIG_ARTIFACT.Samples = new [] { "RemoteConfigSample" };
422427
FIREBASE_STORAGE_ARTIFACT.Samples = new [] { "StorageSample" };
423428
//FIREBASE_APP_DISTRIBUTION_ARTIFACT.Samples = new [] { "AppDistributionSample" };
424-
//FIREBASE_APP_CHECK_ARTIFACT.Samples = new [] { "AppCheckSample" };
429+
FIREBASE_APP_CHECK_ARTIFACT.Samples = new [] { "AppCheckSample" };
425430

426431
// Google components
427432
GOOGLE_ANALYTICS_ARTIFACT.Samples = new [] { "AnalyticsSample" };

docs/BUILDING.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,26 @@ Restore the local Cake tool (any version `< 1.0` should work):
1414
dotnet tool restore
1515
```
1616

17+
## Configure GitHub Packages feed (for fork contributors)
18+
19+
If you are working on a fork of this repository and want to resolve NuGet packages published from your fork, run:
20+
21+
```sh
22+
# Using GitHub CLI (recommended)
23+
./scripts/configure-github-feed.sh --gh
24+
25+
# Or using a personal access token
26+
export GITHUB_PACKAGES_PAT="your_github_pat_here"
27+
./scripts/configure-github-feed.sh
28+
```
29+
30+
This script:
31+
- Auto-detects your fork owner from the git remote URL
32+
- Configures a GitHub Packages feed (`github-<YourUsername>`)
33+
- Allows `dotnet restore` to resolve packages published from your fork
34+
35+
**Note**: Your GitHub Personal Access Token must have the `read:packages` scope. See [GitHub docs](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic) for token creation.
36+
1737
## Build + pack a component
1838

1939
Build and produce `.nupkg` files into `./output`:
@@ -41,3 +61,40 @@ To clean generated folders:
4161
```sh
4262
dotnet tool run dotnet-cake -- --target=clean
4363
```
64+
65+
## Troubleshooting
66+
67+
### MSB4057: The target "source/..." does not exist
68+
69+
This error can occur when using MSBuild solution-level targets with certain .NET SDK versions. The `build.cake` script avoids this by building each `.csproj` directly in dependency order, which is more explicit and reliable.
70+
71+
### NU1101: Unable to find package AdamE.Google.iOS.AppCheckCore
72+
73+
Some packages (like `SignIn`) depend on `AppCheckCore` which is built from this repo. The Cake script handles this automatically by building dependencies first. If you still encounter this:
74+
75+
1. Ensure you're using the latest `build.cake` (it should iterate `ARTIFACTS_TO_BUILD`)
76+
2. Run the full build: `dotnet tool run dotnet-cake -- --target=nuget --names=Google.SignIn`
77+
78+
### Code signing errors during xcframework build
79+
80+
The Cake scripts disable code signing by default (`CODE_SIGNING_ALLOWED=NO`) for CI compatibility. If you need signed frameworks, override the build settings in `common.cake`.
81+
82+
### NuGet feed issues
83+
84+
If you see errors like:
85+
```
86+
NU1101: Unable to find package AdamE.Firebase.iOS.AppCheck [...]
87+
```
88+
89+
This may occur if your GitHub Packages feed is not configured. See "[Configure GitHub Packages feed](#configure-github-packages-feed-for-fork-contributors)" above.
90+
91+
Verify your feed configuration:
92+
```sh
93+
dotnet nuget list source
94+
```
95+
96+
Clear the NuGet cache if needed:
97+
```sh
98+
dotnet nuget locals all --clear
99+
dotnet restore
100+
```
7.22 KB
Loading
58.1 KB
Loading

0 commit comments

Comments
 (0)