Skip to content

[App] Add link.xml to preserve Auth types for reflection#1429

Merged
AustinBenoit merged 4 commits intomainfrom
fixios
Apr 16, 2026
Merged

[App] Add link.xml to preserve Auth types for reflection#1429
AustinBenoit merged 4 commits intomainfrom
fixios

Conversation

@AustinBenoit
Copy link
Copy Markdown
Contributor

Description

Provide details of the change, and generalize the change in the PR title above.
Add a link.xml file to the core App module in app/src/internal/. This file prevents Unity's IL2CPP compiler from aggressively stripping Firebase.Auth types (FirebaseAuth and FirebaseUser) when they are accessed via reflection by other modules like Functions or Firebase AI (via FirebaseInterops.cs).
This resolves runtime INTERNAL errors on iOS/tvOS where the Functions SDK failed to retrieve Auth tokens due to missing symbols, resulting in backend assertion failures.


Testing

Describe how you've tested these changes.

  • Verified that the tokenTest in the Functions integration test app passes on the iOS simulator after adding link.xml.
  • Verified that link.xml is correctly bundled in both .unitypackage and UPM (.tgz) generated artifacts via the build scripts.
  • Full run of tests verifying that they all pass

Type of Change

Place an x the applicable box:

  • Bug fix. Add the issue # below if applicable.
  • New feature. A non-breaking change which adds functionality.
  • Other, such as a build process or documentation change.

@AustinBenoit AustinBenoit added the tests-requested: full Trigger a FULL set of integration tests (uses expanded test matrix). label Apr 16, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a link.xml configuration file to ensure that FirebaseAuth and FirebaseUser types are preserved during the linking process. The reviewer suggested also including the FirebaseAppCheck type to prevent potential runtime stripping issues, as reflection is also performed on that assembly in the codebase.

Comment thread app/src/internal/link.xml
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@AustinBenoit AustinBenoit added tests-requested: full Trigger a FULL set of integration tests (uses expanded test matrix). and removed tests-requested: full Trigger a FULL set of integration tests (uses expanded test matrix). labels Apr 16, 2026
@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. and removed tests-requested: full Trigger a FULL set of integration tests (uses expanded test matrix). labels Apr 16, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 16, 2026

❌  Integration test FAILED

Requested by @firebase-workflow-trigger[bot] on commit dcf7d02
Last updated: Thu Apr 16 12:22 PDT 2026
View integration test log & download artifacts

Failures Configs
D:\a\firebase-unity-sdk\firebase-unity-sdk\testapps\Unity2021.3.43f1-NET4.6\FirebaseAI\testapp [TEST] [ERROR] [2021] [1/2 Build OS(s): windows] [1/6 Platform(s): Playmode] [1/8 Test Device(s): github_runner]
firestore [TEST] [ERROR] [2021] [1/2 Build OS(s): windows] [1/6 Platform(s): Android] [1/8 Test Device(s): android_target]
remote_config [BUILD] [ERROR] [2021] [1/2 Build OS(s): macos] [1/3 Platform(s): 14] [2/4 Test Device(s): iOS tvOS]
storage [BUILD] [ERROR] [2021] [1/2 Build OS(s): macos] [1/3 Platform(s): 14] [2/4 Test Device(s): iOS tvOS]
[TEST] [ERROR] [2021] [1/2 Build OS(s): windows] [1/6 Platform(s): Playmode] [1/8 Test Device(s): github_runner]
[TEST] [FAILURE] [2021] [1/2 Build OS(s): macos] [1/6 Platform(s): 14] [2/8 Test Device(s): Windows macOS]

Comment thread app/src/internal/link.xml.meta Outdated
@AustinBenoit AustinBenoit merged commit dfbbc65 into main Apr 16, 2026
4 checks passed
@github-actions github-actions bot added the tests: failed This PR's integration tests failed. label Apr 16, 2026
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests: failed This PR's integration tests failed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants