Plugin.Firebase.AppCheck 4.0.0

dotnet add package Plugin.Firebase.AppCheck --version 4.0.0
                    
NuGet\Install-Package Plugin.Firebase.AppCheck -Version 4.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Plugin.Firebase.AppCheck" Version="4.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Plugin.Firebase.AppCheck" Version="4.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Plugin.Firebase.AppCheck" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Plugin.Firebase.AppCheck --version 4.0.0
                    
#r "nuget: Plugin.Firebase.AppCheck, 4.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Plugin.Firebase.AppCheck@4.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Plugin.Firebase.AppCheck&version=4.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Plugin.Firebase.AppCheck&version=4.0.0
                    
Install as a Cake Tool

App Check

Firebase App Check helps protect backend resources from abuse by ensuring requests come from your authentic app.

Installation

Nuget

Install-Package Plugin.Firebase.AppCheck

Setup

  • Follow the instructions for the basic setup.
  • Configure App Check before calling CrossFirebase.Initialize(). The plugin uses initialization hooks internally to install the provider factory at the correct moment on each platform (before Configure() on iOS, after InitializeApp() on Android).
using Plugin.Firebase.AppCheck;

#if IOS
CrossFirebaseAppCheck.Configure(AppCheckOptions.Debug);   // registers a "before configure" hook
CrossFirebase.Initialize();                                // hook fires here
#elif ANDROID
CrossFirebaseAppCheck.Configure(AppCheckOptions.Debug);   // registers an "after initialize" hook
CrossFirebase.Initialize(activity, activityProvider);      // hook fires here
#endif

Note: Calling Configure() after CrossFirebase.Initialize() also works — the hook detects that initialization already happened and fires immediately. But calling it before is the recommended pattern because it is consistent across platforms and avoids a window where Firebase is alive without a provider.

Providers

Provider Platforms Typical usage
Disabled All No provider installed (default)
Debug iOS, Android Development / CI — prints a debug token to the console
DeviceCheck iOS Production fallback on older devices
AppAttest iOS (14+) Production (preferred on iOS)
PlayIntegrity Android Production (required for Google Play)

Configuring a provider that is not supported on the current platform throws a NotSupportedException.

iOS — Cannot instantiate FIRAppCheck log message

When App Check is configured with AppCheckOptions.Disabled, the plugin explicitly clears the native provider factory by calling SetAppCheckProviderFactory(null) before FirebaseApp.Configure(). The native Firebase iOS SDK then logs:

[FirebaseAppCheck][I-FAA002001] Cannot instantiate `FIRAppCheck` for app: __FIRAPP_DEFAULT
without a provider factory. Please register a provider factory using
`AppCheck.setAppCheckProviderFactory(_ ,forAppName:)` method.

This is expected and harmless. It confirms that App Check is properly disabled — no provider factory is installed, so no App Check tokens are generated or attached to requests. Without this explicit clearing, the native SDK may auto-register a default DeviceCheckProviderFactory when the FirebaseAppCheck.framework is linked, which would produce invalid placeholder tokens on simulators and cause FirebaseAuthException: The supplied auth credential is malformed or has expired errors on Auth and Functions requests.

iOS enablement

App Check for iOS uses AdamE.Firebase.iOS.AppCheck. Make sure your NuGet sources include the feed where that package is published (see GoogleApisForiOSComponents).

iOS App Attest: capability + entitlements (and sandbox gotcha)

If you use AppCheckOptions.AppAttest, iOS requires:

  1. Apple Developer capability enabled for your Bundle ID:
    • Enable App Attest for the app identifier, then regenerate the provisioning profile.
    • If you see two checkboxes (App Attest / App Attest Opt-In), pick App Attest for the normal Firebase App Check flow.
  2. Entitlements include the App Attest environment:
    • com.apple.developer.devicecheck.appattest-environment = production (for TestFlight / App Store builds)
    • For DEV testing with a Development provisioning profile you may need development.

Firebase note (important during beta / rollout phases):

  • Some App Check configurations only accept tokens generated in the production App Attest environment, and will reject sandbox tokens with 403 PERMISSION_DENIED / App attestation failed.
    • Firebase doc excerpt: "App Check does not currently accept tokens generated in the App Attest sandbox environment."

Playground note:

  • Ensure GoogleService-Info.plist matches the Playground Bundle ID and the Firebase project where App Check is configured. A mismatch commonly looks like 403 errors (or Firebase configure errors if the plist is missing).

Android — native library packaging

.NET Android apps embed native .so files in the APK/AAB. If these files are compressed during packaging, the monodroid runtime crashes at startup with:

F monodroid: ALL entries in APK named `lib/arm64-v8a/` MUST be STORED.

This is not an App Check bug — it can happen whenever a new NuGet adds native interop libraries (like the Firebase AppCheck SDK). The fix is a single MSBuild property in your .csproj:

<PropertyGroup Condition="'$(TargetFramework)' == 'net10.0-android'">
  
  <AndroidStoreUncompressedFileExtensions>so;dll</AndroidStoreUncompressedFileExtensions>
</PropertyGroup>

This is the standard .NET Android MSBuild property. It works with both APK and AAB formats and is compatible with Google Play requirements.

Do NOT use AndroidPackageFormat=apk or EmbedAssembliesIntoApk=true as a workaround for this issue — those properties serve different purposes (debug speed, distribution format) and are not needed to fix native library compression.

See also the sample Playground project for a working reference.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-android35.0 is compatible.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-ios18.0 is compatible.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Plugin.Firebase.AppCheck:

Package Downloads
Plugin.Firebase

The plugin includes cross-platform APIs for Firebase Analytics, Auth, Cloud Messaging, Crashlytics, Dynamic Links, Firestore, Cloud Functions, Remote Config and Storage.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.0 352 3/1/2026