Getting Started
Firebase Setup
Configure Firebase App Check for iOS and Android device verification.
Firebase Setup
Firebase App Check is used to verify contact form submissions from real devices. It prevents automated abuse by requiring device attestation before accepting form data.
Download Config Files
- Go to the Firebase Console
- Select your project (or create one)
- Add an iOS app with bundle ID
com.mrdemonwolf.OfficialApp(or.devfor development) - Download
GoogleService-Info.plistand place it in the project root - Add an Android app with package name
com.mrdemonwolf.OfficialApp - Download
google-services.jsonand place it in the project root
Both files are referenced in app.config.ts via googleServicesFile and are required for prebuild.
Platform Providers
iOS — App Attest + DeviceCheck Fallback
- Production: Uses App Attest as the primary provider with DeviceCheck as fallback
- Development: Uses the debug provider for simulator testing
Android — Play Integrity
- Production: Uses Play Integrity API
- Development: Uses the debug provider for emulator testing
App Check Initialization
App Check is initialized once at app startup in the root layout. The provider configuration is in src/services/app-check.ts:
export async function initializeAppCheck(): Promise<void> {
appCheckInstance = await _initializeAppCheck(undefined, {
provider: {
providerOptions: {
apple: {
provider: __DEV__ ? 'debug' : 'appAttestWithDeviceCheckFallback',
},
android: {
provider: __DEV__ ? 'debug' : 'playIntegrity',
},
},
},
isTokenAutoRefreshEnabled: true,
});
}Token Usage
App Check tokens are attached to contact form submissions. The getAppCheckToken() function retrieves a fresh token:
const token = await getAppCheckToken();
// Token is sent with the form submission to PackRelayEAS Production Setup
For production builds, upload the iOS config to EAS:
eas env:create production \
--name GOOGLE_SERVICES_PLIST \
--type file \
--visibility plaintext \
--value ./GoogleService-Info.plistThen reference the EAS env var in app.config.ts:
googleServicesFile:
process.env.GOOGLE_SERVICES_PLIST || './GoogleService-Info.plist',