-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
Needs Attentionplatform: iosplugin: crashlyticsFirebase CrashlyticsFirebase Crashlyticstype: bugNew bug reportNew bug report
Description
Issue
Hi team,
I am using RNFB to track app crashes. While it works well for Android, I am stuck with a weird problem where iOS crashes aren't reported in the FB Console. I can see non-fatal issues reported with the custom logs and sometimes I even see the "crash-free" session percentage drop. However, the crash and consequently its cause aren't reported.
I have tried to force crash both on simulators and real devices with xcode connected and as a release build but no dice.
My setup is:
- React Native 0.81.1
- newArchEnabled=1
- using CocoaPods; my Podfile looks
- I use Fastlane and github actions for builds
- rest of the details in sub-sections below.
Looking for guidance on how to resolve the issue.
Project Files
Javascript
Click To Expand
package.json:
{
"name": "xxx-app",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "./scripts/run-android.sh",
"android:release": "./scripts/build-android-release.sh",
"ios": "./scripts/run-ios.sh",
"ios:release": "./scripts/run-ios-release.sh",
"build:android": "NODE_ENV=production cd android && ./gradlew assembleRelease && cd ..",
"build:ios": "NODE_ENV=production react-native run-ios --configuration Release",
"bundle:android": "NODE_ENV=production react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res",
"bundle:ios": "NODE_ENV=production react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios/main.jsbundle --assets-dest ios",
"lint": "eslint . --ext .ts,.tsx,.js,.jsx --max-warnings 0",
"lint:fix": "eslint . --ext .ts,.tsx,.js,.jsx --fix",
"lint:imports": "eslint . --ext .ts,.tsx,.js,.jsx",
"type-check": "tsc --noEmit",
"type-check:watch": "tsc --noEmit --watch",
"format": "prettier --write '**/*.{ts,tsx,js,jsx,json}'",
"format:check": "prettier --check '**/*.{ts,tsx,js,jsx,json}'",
"validate": "npm run lint && npm run type-check && npm run test:ci",
"validate:quick": "npm run lint && npm run type-check",
"start": "STORYBOOK_ENABLED=false react-native start",
"start:reset": "STORYBOOK_ENABLED=false react-native start --reset-cache",
"clear:policies": "./scripts/clear-policies-data.sh",
"install:clean": "rm -rf node_modules package-lock.json && npm install --legacy-peer-deps",
"install:force": "npm install --legacy-peer-deps --force",
"clean:metro": "rm -rf $TMPDIR/metro-* $TMPDIR/haste-*",
"clean:build": "cd android && ./gradlew clean && cd .. && cd ios && xcodebuild clean && cd ..",
"clean:all": "npm run clean:metro && npm run clean:build && rm -rf node_modules",
"storybook": "STORYBOOK_ENABLED=true react-native start",
"storybook:ios": "STORYBOOK_ENABLED=true react-native run-ios",
"storybook:android": "STORYBOOK_ENABLED=true react-native run-android",
"test": "jest",
"test:ci": "jest --ci --coverage --watchAll=false --passWithNoTests",
"test:coverage": "jest --coverage",
"storybook-generate": "sb-rn-get-stories",
"deps:check": "npm list --depth=0",
"prepare": "husky install",
"security:scan": "npx detect-secrets scan --baseline .secrets.baseline",
"security:audit": "npm audit --audit-level=moderate",
"security:fix": "npm audit fix",
"pre-commit": "npm run lint && npm run type-check && npm run security:scan && npm run security:audit",
"release:create": "release-please release-pr --token=$GITHUB_TOKEN",
"release:github": "release-please github-release --token=$GITHUB_TOKEN",
"release:manifest": "release-please manifest",
"release:changelog": "release-please changelog",
"postinstall": "patch-package"
},
"dependencies": {
"...": "...",
"@react-native-firebase/app": "23.8.6",
"@react-native-firebase/crashlytics": "23.8.6",
"@react-native-firebase/perf": "23.8.6",
"@react-native-firebase/remote-config": "23.8.6",
"react": "19.1.0",
"react-native": "0.81.1",
"react-native-nitro-modules": "0.31.10",
},
"engines": {
"node": ">=20"
},
"lint-staged": {
"*.{ts,tsx}": [
"eslint --fix",
"prettier --write"
],
"*.{js,jsx}": [
"eslint --fix",
"prettier --write"
],
"*.{json,md}": [
"prettier --write"
]
}
}
firebase.json for react-native-firebase v6:
{
"react-native": {
"crashlytics_auto_collection_enabled": true,
"crashlytics_debug_enabled": true,
"crashlytics_disable_auto_disabler": true,
"crashlytics_javascript_exception_handler_chaining_enabled": false,
"analytics_auto_collection_enabled": true,
"perf_auto_collection_enabled": true
}
}iOS
Click To Expand
ios/Podfile:
- I'm not using Pods
- I'm using Pods and my Podfile looks like:
require Pod::Executable.execute_command(
'node',
['-p', 'require.resolve("react-native/scripts/react_native_pods.rb", {paths: [process.argv[1]]})', __dir__]
).strip
require Pod::Executable.execute_command(
'node',
['-p', 'require.resolve("react-native-permissions/scripts/setup.rb", {paths: [process.argv[1]]})', __dir__]
).strip
platform :ios, '18.0'
prepare_react_native_project!
target 'xxxApp' do
config = use_native_modules!
use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true
use_react_native!(
:path => config[:reactNativePath],
:app_path => '..',
:hermes_enabled => true
)
setup_permissions([
'Microphone',
])
pod 'FirebaseAnalytics'
pod 'Firebase/Crashlytics'
pod 'Firebase/Performance'
post_install do |installer|
react_native_post_install(
installer,
'../node_modules/react-native',
:mac_catalyst_enabled => false
)
installer.pods_project.targets.each do |t|
t.build_configurations.each do |bc|
bc.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '18.0'
# Force Swift 5 mode to avoid Swift 6 language mode errors on Xcode 16+
bc.build_settings['SWIFT_VERSION'] = '5.10'
# Make concurrency checks less strict to reduce noise; adjust as needed
bc.build_settings['SWIFT_STRICT_CONCURRENCY'] = 'minimal'
# Allow non-modular includes in framework modules to avoid
# "non-modular-include-in-framework-module" build failures
bc.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
# Add NitroModules header search paths for pods that depend on it (e.g., react-native-iap)
# This is needed when using static frameworks to ensure C++ headers are accessible
# Fix for react-native-iap 14.x with Xcode 16.2 (issue #3048)
bc.build_settings['HEADER_SEARCH_PATHS'] ||= ['$(inherited)']
bc.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_ROOT)/Headers/Public/NitroModules"'
bc.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_ROOT)/Headers/Private/NitroModules"'
bc.build_settings['HEADER_SEARCH_PATHS'] << '"${PODS_ROOT}/../../node_modules/react-native-nitro-modules/cpp"'
bc.build_settings['HEADER_SEARCH_PATHS'] << '"${PODS_ROOT}/../../node_modules/react-native-nitro-modules/ios"'
# Additional settings for NitroIap to fix Xcode 16.2 build issues
if t.name == 'NitroIap'
bc.build_settings['HEADER_SEARCH_PATHS'] << '"${PODS_ROOT}/../../node_modules/react-native-nitro-modules/cpp"'
bc.build_settings['HEADER_SEARCH_PATHS'] << '"${PODS_ROOT}/../../node_modules/react-native-nitro-modules/ios"'
bc.build_settings['CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER'] = 'NO'
bc.build_settings['CLANG_WARN_DOCUMENTATION_COMMENTS'] = 'NO'
bc.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'] = 'YES'
end
if t.name == 'hermes-engine'
bc.build_settings['FRAMEWORK_SEARCH_PATHS'] ||= []
bc.build_settings['FRAMEWORK_SEARCH_PATHS'] << '"$(PODS_XCFRAMEWORKS_BUILD_DIR)/hermes-engine"'
end
# Ensure Pods targets do not attempt code signing or use app provisioning profiles
bc.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
bc.build_settings['CODE_SIGNING_REQUIRED'] = 'NO'
bc.build_settings['CODE_SIGNING_STYLE'] = 'Automatic'
bc.build_settings.delete('PROVISIONING_PROFILE_SPECIFIER')
bc.build_settings.delete('PROVISIONING_PROFILE')
end
end
end
endAppDelegate.swift:
import UIKit
import React
import React_RCTAppDelegate
import ReactAppDependencyProvider
import Firebase
import AVFoundation
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var reactNativeDelegate: ReactNativeDelegate?
var reactNativeFactory: RCTReactNativeFactory?
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
FirebaseApp.configure()
let delegate = ReactNativeDelegate()
let factory = RCTReactNativeFactory(delegate: delegate)
delegate.dependencyProvider = RCTAppDependencyProvider()
reactNativeDelegate = delegate
reactNativeFactory = factory
window = UIWindow(frame: UIScreen.main.bounds)
factory.startReactNative(
withModuleName: "xxxApp",
in: window,
launchOptions: launchOptions
)
// Required for react-native-orientation-locker
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
return Orientation.getOrientation()
}
}
class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
override func sourceURL(for bridge: RCTBridge) -> URL? {
self.bundleURL()
}
override func bundleURL() -> URL? {
#if DEBUG
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
#else
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
#endif
}
}
Environment
Click To Expand
react-native info output:
System:
OS: macOS 26.3
CPU: (10) arm64 Apple M1 Max
Memory: 413.34 MB / 64.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.19.0
path: /Users/xxx/.nvm/versions/node/v22.19.0/bin/node
Yarn:
version: 1.22.22
path: /Users/xxx/.nvm/versions/node/v22.19.0/bin/yarn
npm:
version: 11.6.2
path: /Users/xxx/.nvm/versions/node/v22.19.0/bin/npm
Watchman:
version: 2025.09.15.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /Users/xxx/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 25.2
- iOS 26.2
- macOS 26.2
- tvOS 26.2
- visionOS 26.2
- watchOS 26.2
Android SDK:
API Levels:
- "31"
- "36"
Build Tools:
- 35.0.0
- 36.0.0
System Images:
- android-36 | Wear OS 6.0 ARM 64 v8a
- android-36 | Google APIs ARM 64 v8a
- android-36 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2025.1 AI-251.27812.49.2514.14217341
Xcode:
version: 26.2/17C52
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.16
path: /usr/bin/javac
Ruby:
version: 3.4.6
path: /Users/xxx/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
info React Native v0.84.0 is now available (your project is running on v0.81.1).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.84.0
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.81.1&to=0.84.0
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".
- Platform that you're experiencing the issue on:
- 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:23.5.0
Firebasemodule(s) you're using that has the issue:- app, performance, remoteconfig and crashlytics
- Are you using
TypeScript?Y&5.9.2
- 👉 Check out
React Native FirebaseandInvertaseon Twitter for updates on the library.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Needs Attentionplatform: iosplugin: crashlyticsFirebase CrashlyticsFirebase Crashlyticstype: bugNew bug reportNew bug report