-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
Description
Issue
[!] CocoaPods could not find compatible versions for pod "GoogleUtilities/Environment"
run to ios directory, pod install,
output this:
[!] CocoaPods could not find compatible versions for pod "GoogleUtilities/Environment":
In Podfile:
RNFBApp (from `../node_modules/@react-native-firebase/app`) was resolved to 21.12.3, which depends on
Firebase/CoreOnly (= 11.10.0) was resolved to 11.10.0, which depends on
FirebaseCore (~> 11.10.0) was resolved to 11.10.0, which depends on
GoogleUtilities/Environment (~> 8.0)
RNFBApp (from `../node_modules/@react-native-firebase/app`) was resolved to 21.12.3, which depends on
Firebase/CoreOnly (= 11.10.0) was resolved to 11.10.0, which depends on
FirebaseCore (~> 11.10.0) was resolved to 11.10.0, which depends on
GoogleUtilities/Logger (~> 8.0) was resolved to 8.0.2, which depends on
GoogleUtilities/Environment (= 8.0.2)
RNMLKitTextRecognition (from `../node_modules/@react-native-ml-kit/text-recognition`) was resolved to 1.5.2, which depends on
GoogleMLKit/TextRecognition (= 6.0.0) was resolved to 6.0.0, which depends on
GoogleMLKit/MLKitCore (= 6.0.0) was resolved to 6.0.0, which depends on
MLKitCommon (~> 11.0.0) was resolved to 11.0.0, which depends on
GoogleDataTransport (< 10.0, >= 9.4.1) was resolved to 9.4.1, which depends on
GoogleUtilities/Environment (~> 7.7)Project Files
** react-native version: 0.78 **
** CocoaPods version: 1.16.2 **
package.json:
{
"name": "project",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "ENVFILE=env/.env.local react-native run-android",
"android:dev": "ENVFILE=src/modules/dolbau-web-common/env/.env.development react-native run-android",
"android:staging": "ENVFILE=src/modules/dolbau-web-common/env/.env.staging react-native run-android",
"android:prod": "ENVFILE=src/modules/dolbau-web-common/env/.env.production react-native run-android",
"android:build": "cd android && ENVFILE=env/.env.local ./gradlew bundleRelease",
"android:build:dev": "cd android && ENVFILE=src/modules/dolbau-web-common/env/.env.development ./gradlew bundleRelease",
"android:build:staging": "cd android && ENVFILE=src/modules/dolbau-web-common/env/.env.staging ./gradlew bundleRelease",
"android:build:production": "cd android && ENVFILE=src/modules/dolbau-web-common/env/.env.production ./gradlew bundleRelease",
"ios": "ENVFILE=env/.env.local react-native run-ios",
"ios:dev": "ENVFILE=env/.env.development react-native run-ios",
"ios:staging": "ENVFILE=env/.env.staging react-native run-ios",
"ios:prod": "ENVFILE=env/.env.production react-native run-ios",
"lint": "eslint ./src",
"start": "react-native start",
"test": "jest",
"prepare": "husky",
"postinstall": "patch-package"
},
"dependencies": {
"@bam.tech/react-native-image-resizer": "^3.0.11",
"@emotion/native": "^11.11.0",
"@emotion/react": "^11.14.0",
"@react-native-async-storage/async-storage": "^2.1.2",
"@react-native-camera-roll/camera-roll": "^7.10.0",
"@react-native-community/blur": "^4.4.1",
"@react-native-community/geolocation": "^3.4.0",
"@react-native-community/hooks": "^100.1.0",
"@react-native-community/netinfo": "^11.4.1",
"@react-native-cookies/cookies": "^6.2.1",
"@react-native-firebase/app": "^21.12.3",
"@react-native-masked-view/masked-view": "^0.3.2",
"@react-native-ml-kit/text-recognition": "^1.5.2",
"@react-navigation/bottom-tabs": "^7.2.1",
"@react-navigation/devtools": "^7.0.16",
"@react-navigation/elements": "^2.2.6",
"@react-navigation/native": "^7.0.15",
"@react-navigation/stack": "^7.1.2",
"@webview-bridge/react-native": "^1.7.5",
"axios": "^1.8.3",
"buffer": "^6.0.3",
"mqtt": "^5.10.4",
"patch-package": "^8.0.0",
"postinstall-postinstall": "^2.1.0",
"react": "19.0.0",
"react-native": "0.78.0",
"react-native-capture-protection": "^1.9.20",
"react-native-device-info": "^14.0.4",
"react-native-gesture-handler": "^2.24.0",
"react-native-image-crop-picker": "^0.42.0",
"react-native-image-viewing": "^0.2.2",
"react-native-keyboard-controller": "^1.16.7",
"react-native-paper": "^5.13.1",
"react-native-permissions": "^5.3.0",
"react-native-reanimated": "^3.17.1",
"react-native-safe-area-context": "^5.3.0",
"react-native-screens": "^4.9.2",
"react-native-svg": "^15.11.2",
"react-native-toast-message": "^2.2.1",
"react-native-webview": "^13.13.4",
"react-native-zoom-toolkit": "^4.0.2",
"url": "^0.11.4",
"zod": "^3.24.2",
"zustand": "^5.0.3"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@commitlint/cli": "^19.7.1",
"@commitlint/config-conventional": "^19.7.1",
"@commitlint/types": "^19.5.0",
"@eslint/js": "^9.20.0",
"@mui/material": "^6.4.7",
"@react-native-community/cli": "15.0.1",
"@react-native-community/cli-platform-android": "15.0.1",
"@react-native-community/cli-platform-ios": "15.0.1",
"@react-native/babel-preset": "0.78.0",
"@react-native/eslint-config": "0.78.0",
"@react-native/metro-config": "0.78.0",
"@react-native/typescript-config": "0.78.0",
"@types/jest": "^29.5.13",
"@types/react": "^19.0.0",
"@types/react-native-vector-icons": "^6.4.18",
"@types/react-test-renderer": "^19.0.0",
"babel-plugin-module-resolver": "^5.0.2",
"commitizen": "^4.3.1",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^9.20.1",
"eslint-config-prettier": "^10.0.1",
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-prettier": "^5.2.3",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-refresh": "^0.4.19",
"eslint-plugin-simple-import-sort": "^12.1.1",
"globals": "^15.14.0",
"husky": "^9.1.7",
"jest": "^29.6.3",
"lint-staged": "^15.4.3",
"prettier": "2.8.8",
"react-native-config": "^1.5.5",
"react-native-svg-transformer": "^1.5.0",
"react-test-renderer": "19.0.0",
"typescript": "5.0.4",
"typescript-eslint": "^8.24.0"
},
"engines": {
"node": ">=18"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"./src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": "prettier --write"
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
}
}
iOS
Click To Expand
ios/Podfile:
- I'm not using Pods
- I'm using Pods and my Podfile looks like:
def node_require(script)
# Resolve script with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
"require.resolve(
'#{script}',
{paths: [process.argv[1]]},
)", __dir__]).strip
end
# Use it to require both react-native's and this package's scripts:
node_require('react-native/scripts/react_native_pods.rb')
node_require('react-native-permissions/scripts/setup.rb')
platform :ios, min_ios_version_supported
prepare_react_native_project!
# ⬇️ uncomment the permissions you need
setup_permissions([
'AppTrackingTransparency',
# 'Bluetooth',
# 'Calendars',
# 'CalendarsWriteOnly',
'Camera',
# 'Contacts',
# 'FaceID',
'LocationAccuracy',
'LocationAlways',
'LocationWhenInUse',
# 'MediaLibrary',
# 'Microphone',
# 'Motion',
'Notifications',
'PhotoLibrary',
# 'PhotoLibraryAddOnly',
# 'Reminders',
# 'Siri',
# 'SpeechRecognition',
# 'StoreKit',
])
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
end
target 'dolbau' do
config = use_native_modules!
# cocoapods version 1.9+ linking of Swift static libraries, add the following command to your Podfile:
use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true
use_react_native!(
:path => config[:reactNativePath],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
post_install do |installer|
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false,
# :ccache_enabled => true
)
end
endAppDelegate.swift:
import UIKit
import React
import React_RCTAppDelegate
import ReactAppDependencyProvider
import Firebase
@main
class AppDelegate: RCTAppDelegate {
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
FirebaseApp.configure()
self.moduleName = "dolbau"
self.dependencyProvider = RCTAppDependencyProvider()
// You can add your custom initial props in the dictionary below.
// They will be passed down to the ViewController used by React Native.
self.initialProps = [:]
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
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
}
}- 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:@react-native-firebase/app: ^21.12.3
Firebasemodule(s) you're using that has the issue:e.g. Instance ID
- Are you using
TypeScript?Y&5.0.4