-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
Description
Issue
I am building a Genkit example using firebase functions and React Native. I keep hitting an error when trying to use App Check though. I was wondering if anyone could help?
Text version
> Copying ios/flipfeedsapp/Supporting/Expo.plist -> ./Expo.plist> Compiling flipfeedsapp » SplashScreen.storyboard (/Users/afa/web/codingcatdev/flipfeeds-app/ios/flipfeedsapp/AppDelegate.swift:3:8)1 | import Expo2 | import FirebaseCore> 3 | import RNFBAppCheck | ^ no such module 'RNFBAppCheck'4 | import React5 | import ReactAppDependencyProvider6 | > Preparing flipfeedsapp » Info.plistRun script build phase '[CP-User] [Hermes] Replace Hermes for the right configuration, if needed' will se it does not specify any outputs. To address this issue, either add output dependencies to the script p
Below is the app.json, in order for the app to run I have to remove RNFBAppCheck as it fails otherwise.
{
"expo": {
"name": "flipfeeds-app",
"slug": "flipfeeds-app",
"scheme": "flipfeeds-app",
"version": "1.0.0",
"web": {
"bundler": "metro",
"favicon": "./assets/favicon.png"
},
"experiments": {
"tsconfigPaths": true
},
"plugins": [
"expo-router",
"@react-native-firebase/app",
"@react-native-firebase/app-distribution",
"@react-native-firebase/auth",
"@react-native-firebase/crashlytics",
"@react-native-firebase/messaging",
"@react-native-firebase/perf",
[
"expo-build-properties",
{
"android": {
"minSdkVersion": 23
},
"ios": {
"useFrameworks": "static",
"deploymentTarget": "15.1",
"forceStaticLinking": [
"RNFBApp",
"RNFBAppCheck",
"RNFBAppDistribution",
"RNFBAuth",
"RNFBCrashlytics",
"RNFBMessaging",
"RNFBPerf"
]
}
}
]
],
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"splash": {
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.flipfeeds.app",
"googleServicesFile": "./GoogleService-Info.plist"
},
"android": {
"package": "com.flipfeeds.app",
"googleServicesFile": "./google-services.json",
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
}
}
}
}
<!-- Please describe your issue here --^ and provide as much detail as you can. -->
<!-- Include code snippets that show your usages of the library in the context of your project. -->
<!-- Snippets that also show how and where the library is imported in JS are useful to debug issues relating to importing or methods not found issues -->
---
## Project Files
<!-- Provide the contents of key project files which will help to debug -->
<!-- For Example: -->
<!-- - iOS: `Podfile` contents. -->
<!-- - Android: `android/build.gradle` contents. -->
<!-- - Android: `android/app/build.gradle` contents. -->
<!-- - Android: `AndroidManifest.xml` contents. -->
<!-- ADD THE CONTENTS OF THE FILES IN THE PROVIDED CODE BLOCKS BELOW -->
### Javascript
<details><summary>Click To Expand</summary>
<p>
#### `package.json`:
```json
{
"name": "flipfeeds-app",
"version": "0.0.1",
"scripts": {
"version:show": "node scripts/generate-version.js",
"android": "expo run:android",
"android:sync-version": "node scripts/sync-android-version.js",
"android:release": "npm run android:sync-version && cd android && ./gradlew assembleRelease && cd ..",
"android:bundle": "npm run android:sync-version && cd android && ./gradlew bundleRelease && cd ..",
"android:distribute": "npm run android:release && node scripts/upload-to-firebase.js android",
"ios": "expo run:ios",
"ios:sync-version": "node scripts/sync-ios-version.js",
"ios:release": "npm run ios:sync-version && expo run:ios --configuration Release",
"ios:archive": "npm run ios:sync-version && cd ios && xcodebuild -workspace flipfeedsapp.xcworkspace -scheme flipfeedsapp -configuration Release archive -archivePath build/flipfeedsapp.xcarchive",
"ios:export": "npm run ios:archive && cd ios && xcodebuild -exportArchive -archivePath build/flipfeedsapp.xcarchive -exportPath build -exportOptionsPlist exportOptions.plist",
"ios:distribute": "npm run ios:export && node scripts/upload-to-firebase.js ios",
"sync-version": "npm run android:sync-version && npm run ios:sync-version",
"start": "expo start",
"prebuild": "expo prebuild",
"prebuild-clean": "expo prebuild -- --clean",
"lint": "eslint \"**/*.{js,jsx,ts,tsx}\" && prettier -c \"**/*.{js,jsx,ts,tsx,json}\"",
"format": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix && prettier \"**/*.{js,jsx,ts,tsx,json}\" --write",
"web": "expo start --web",
"functions:build": "cd functions && npm run build",
"functions:watch": "cd functions && npm run build:watch",
"emulators": "firebase emulators:start",
"emulators:functions": "npm run functions:build && firebase emulators:start --only functions,firestore",
"dev:emulators": "npm run functions:watch & firebase emulators:start"
},
"dependencies": {
"@react-native-async-storage/async-storage": "^2.2.0",
"@react-native-firebase/ai": "^23.5.0",
"@react-native-firebase/analytics": "^23.5.0",
"@react-native-firebase/app": "^23.5.0",
"@react-native-firebase/app-check": "^23.5.0",
"@react-native-firebase/app-distribution": "^23.5.0",
"@react-native-firebase/auth": "^23.5.0",
"@react-native-firebase/crashlytics": "^23.5.0",
"@react-native-firebase/database": "^23.5.0",
"@react-native-firebase/firestore": "^23.5.0",
"@react-native-firebase/functions": "^23.5.0",
"@react-native-firebase/in-app-messaging": "^23.5.0",
"@react-native-firebase/installations": "^23.5.0",
"@react-native-firebase/messaging": "^23.5.0",
"@react-native-firebase/ml": "^23.5.0",
"@react-native-firebase/perf": "^23.5.0",
"@react-native-firebase/remote-config": "^23.5.0",
"@react-native-firebase/storage": "^23.5.0",
"@react-native-google-signin/google-signin": "^16.0.0",
"@tailwindcss/postcss": "^4.1.13",
"expo": "^54.0.22",
"expo-build-properties": "~1.0.9",
"expo-constants": "~18.0.10",
"expo-dev-client": "~6.0.17",
"expo-haptics": "^15.0.7",
"expo-image": "^3.0.10",
"expo-linking": "~8.0.8",
"expo-router": "~6.0.14",
"expo-status-bar": "~3.0.8",
"expo-symbols": "^1.0.7",
"expo-web-browser": "^15.0.9",
"nativewind": "^5.0.0-preview.2",
"postcss": "^8.5.6",
"react": "19.1.0",
"react-dom": "19.1.0",
"react-native": "^0.81.5",
"react-native-css": "^3.0.1",
"react-native-image-picker": "^8.2.1",
"react-native-reanimated": "~4.1.1",
"react-native-safe-area-context": "~5.6.0",
"react-native-screens": "~4.16.0",
"react-native-web": "^0.21.0",
"react-native-worklets": "0.5.1"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@types/react": "~19.1.10",
"babel-preset-expo": "~54.0.0",
"dotenv": "^17.2.3",
"eslint": "^9.25.1",
"eslint-config-expo": "~10.0.0",
"eslint-config-prettier": "^10.1.2",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.7.1",
"tailwindcss": "^4.1.17",
"typescript": "~5.9.2"
},
"main": "expo-router/entry",
"overrides": {
"lightningcss": "1.30.1"
},
"private": true
}
firebase.json for react-native-firebase v6:
{
"functions": [
{
"source": "functions",
"codebase": "default",
"ignore": ["node_modules", ".git", "firebase-debug.log", "firebase-debug.*.log"],
"predeploy": ["npm --prefix \"$RESOURCE_DIR\" run build"]
}
],
"hosting": {
"public": "public",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "/.well-known/oauth-protected-resource",
"function": {
"functionId": "mcpServer",
"region": "us-central1"
}
},
{
"source": "/.well-known/oauth-authorization-server",
"function": {
"functionId": "mcpAuthServer",
"region": "us-central1"
}
},
{
"source": "/.well-known/openid-configuration",
"function": {
"functionId": "mcpAuthServer",
"region": "us-central1"
}
},
{
"source": "/register",
"function": {
"functionId": "mcpAuthServer",
"region": "us-central1"
}
},
{
"source": "/authorize",
"function": {
"functionId": "mcpAuthServer",
"region": "us-central1"
}
},
{
"source": "/login",
"function": {
"functionId": "mcpAuthServer",
"region": "us-central1"
}
},
{
"source": "/auth-callback",
"function": {
"functionId": "mcpAuthServer",
"region": "us-central1"
}
},
{
"source": "/token",
"function": {
"functionId": "mcpAuthServer",
"region": "us-central1"
}
},
{
"source": "/revoke",
"function": {
"functionId": "mcpAuthServer",
"region": "us-central1"
}
},
{
"source": "/mcp",
"function": {
"functionId": "mcpServer",
"region": "us-central1"
}
},
{
"source": "/mcp/**",
"function": {
"functionId": "mcpServer",
"region": "us-central1"
}
}
]
},
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
},
"storage": {
"rules": "storage.rules"
},
"database": {
"rules": "database.rules.json"
},
"emulators": {
"functions": {
"port": 5001
},
"firestore": {
"port": 8080
},
"database": {
"port": 9000
},
"hosting": {
"port": 5002
},
"ui": {
"enabled": true,
"port": 4000
},
"singleProjectMode": true
}
}
iOS
Nothing really around appcheck
ios/Podfile:
- I'm not using Pods
- I'm using Pods and my Podfile looks like:
# N/AAppDelegate.m:
// N/AAndroid
Click To Expand
Have you converted to AndroidX?
- my application is an AndroidX application?
- I am using
android/gradle.settingsjetifier=truefor Android compatibility? - I am using the NPM package
jetifierfor react-native compatibility?
android/build.gradle:
// N/Aandroid/app/build.gradle:
// N/Aandroid/settings.gradle:
// N/AMainApplication.java:
// N/AAndroidManifest.xml:
<!-- N/A -->Environment
Click To Expand
react-native info output:
OUTPUT GOES HERE
- Platform that you're experiencing the issue on:
- [ x ] iOS
- Android
- iOS but have not tested behavior on Android
- Android but have not tested behavior on iOS
- Both
react-native-firebaseversion you're using that has this issue:e.g. 5.4.3
Firebasemodule(s) you're using that has the issue:e.g. Instance ID
- Are you using
TypeScript?Y/N&VERSION
- 👉 Check out
React Native FirebaseandInvertaseon Twitter for updates on the library.