C++ ile hata ayıklama sağlayıcıyla Uygulama Kontrolü'nü kullanma
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Uygulamanızı Uygulama Kontrolü'ne kaydettikten sonra, bu ortamlar geçerli cihaz olarak kabul edilmediğinden uygulamanız normalde masaüstü platformlarda, emülatörde veya sürekli entegrasyon (CI) ortamında çalışmaz. Geliştirme ve test sırasında uygulamanızı böyle bir ortamda çalıştırmak istiyorsanız gerçek bir onay sağlayıcı yerine Uygulama Kontrolü hata ayıklama sağlayıcısını kullanan bir hata ayıklama derlemesi oluşturabilirsiniz.
Kodla yapılandırma
Uygulamanızı çalıştırırken (ör. geliştirme sırasında) hata ayıklama sağlayıcısını kullanmak için aşağıdakileri yapın:
Firebase konsolunun App Check bölümünde, uygulamanızın taşma menüsünden Hata ayıklama jetonlarını yönet'i seçin. Ardından yeni bir hata ayıklama jetonu oluşturun. Sonraki adımda jetona ihtiyacınız olacak.
Bu jeton, geçerli bir cihaz olmadan Firebase kaynaklarınıza erişime izin verdiğinden gizli tutmanız çok önemlidir. Herkese açık bir depoya işlemeyin ve kayıtlı bir jetonun güvenliği ihlal edilirse Firebase konsolunda hemen iptal edin.
İlk kullanıma hazırlama kodunuzda aşağıdakileri yapın:
#include"firebase/app_check.h"voidInitializeFirebase(){// Configure the Debug Provider factory with your debug token.firebase::app_check::DebugAppCheckProviderFactory::GetInstance()->SetDebugToken("INSERT YOUR DEBUG TOKEN HERE");// Set App Check to use the debug provider factoryfirebase::app_check::AppCheck::SetAppCheckProviderFactory(firebase::app_check::DebugAppCheckProviderFactory::GetInstance());// Proceed to initialize Firebase as normal}
Diğer yapılandırma seçenekleri
Platforma bağlı olarak başka yapılandırma seçenekleri de mevcuttur. Örneğin, platformların ortam değişkenleri kullanılabilir. Daha fazla bilgi için iOS+ veya Android hata ayıklama sağlayıcı belgelerine bakın.
Bu jeton, geçerli bir cihaz olmadan Firebase kaynaklarınıza erişime izin verdiğinden gizli tutmanız çok önemlidir. Herkese açık bir depoya göndermeyin. Kayıtlı bir jetonun güvenliği ihlal edilirse Firebase konsolunda hemen iptal edin.
[null,null,["Son güncelleme tarihi: 2025-08-23 UTC."],[],[],null,["After you have registered your app for App Check, your app normally won't run\non desktop platforms, in an emulator, or from a continuous integration (CI)\nenvironment, since those environments don't qualify as valid devices. If you\nwant to run your app in such an environment during development and testing, you\ncan create a debug build of your app that uses the App Check debug provider\ninstead of a real attestation provider.\n| **Warning:** The debug provider allows access to your Firebase resources from unverified devices. Don't use the debug provider in production builds of your app, and don't share your debug builds with untrusted parties.\n\nConfiguration via code\n\nTo use the debug provider while running your app\n(during development, for example), do the following:\n\n1. In the [**App Check**](//console.firebase.google.com/project/_/appcheck) section\n of the Firebase console, choose **Manage debug tokens** from your app's\n overflow menu. Then, create a new debug token. You'll need the token in the\n next step.\n\n Because this token allows access to your Firebase resources without\n a valid device, it is crucial that you keep it private. Don't commit it to a\n public repository, and if a registered token is ever compromised, revoke it\n immediately in the Firebase console.\n\n2. In your initialization code, do the following:\n\n #include \"firebase/app_check.h\"\n\n void InitializeFirebase() {\n // Configure the Debug Provider factory with your debug token.\n firebase::app_check::DebugAppCheckProviderFactory::GetInstance()\n -\u003eSetDebugToken(\"INSERT YOUR DEBUG TOKEN HERE\");\n\n // Set App Check to use the debug provider factory\n firebase::app_check::AppCheck::SetAppCheckProviderFactory(\n firebase::app_check::DebugAppCheckProviderFactory::GetInstance());\n\n // Proceed to initialize Firebase as normal\n }\n\nOther configuration options\n\nOther configuration options are available based on platform, for example using\nthe platforms environment variables. For more\ninformation, refer to the [iOS+](/docs/app-check/ios/debug-provider) or\n[Android](/docs/app-check/android/debug-provider) debug provider documentation.\n\nBecause this token allows access to your Firebase resources without a\nvalid device, it is crucial that you keep it private. Don't commit it to a\npublic repository, and if a registered token is ever compromised, revoke it\nimmediately in the Firebase console."]]