I'm facing a problem while running Pod install. When it is finished installing all pods, it gets stuck on a loop printing React-core and the paths of these two files .release.xcconfig, .debug.xcconfig.
React-Core
/path/project/ios/Pods/Target Support Files/Pods-project/Pods-project.release.xcconfig
/path/project/ios/Pods/Target Support Files/Pods-project/Pods-project.debug.xcconfig
/path/project/ios/Pods/Target Support Files/Pods-project-projectTests/Pods-project-projectTests.release.xcconfig
/path/project/ios/Pods/Target Support Files/Pods-project-projectTests/Pods-project-projectTests.debug.xcconfig
It was working fine before I clean cache and files.
The previous steps I did to get this problem were:
Cleaning cache with yarn cache clean
Remove pods and Podfile.lock
Run pod install
this is my podfile:
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
platform :ios, '12.0'
use_frameworks!
pre_install do |installer|
installer.pod_targets.each do |pod|
if pod.name.start_with?('RNFB') || pod.name.eql?('RNPermissions') || pod.name.start_with?('Permission-')
def pod.build_type;
Pod::BuildType.static_library # >= 1.9
end
end
end
end
target 'project' do
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => false
)
# react-native-permissions permission handlers
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Camera', :path => "#{permissions_path}/Camera/Permission-Camera.podspec"
pod 'Permission-MediaLibrary', :path => "#{permissions_path}/MediaLibrary/Permission-MediaLibrary.podspec"
pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications/Permission-Notifications.podspec"
pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways/Permission-LocationAlways.podspec"
pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse/Permission-LocationWhenInUse.podspec"
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
# pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
# Add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'
# For Analytics without IDFA collection capability, use this pod instead
# pod ‘Firebase/AnalyticsWithoutAdIdSupport’
# Add the pods for any other Firebase products you want to use in your app
# For example, to use Firebase Authentication and Cloud Firestore
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
pod 'RNSVG', :path => '../node_modules/react-native-svg'
#pod 'react-native-network-info', :path => '../node_modules/react-native-network-info'
pod 'react-native-camera', :path => '../node_modules/react-native-camera'
pod 'RNPermissions', :path => '../node_modules/react-native-permissions'
pod 'react-native-image-picker', :path => '../node_modules/react-native-image-picker'
target 'project' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
#use_flipper!()
post_install do |installer|
installer.pods_project.targets.each do |target|
react_native_post_install(installer)
target.build_configurations.each do |config|
# some older pods don't support some architectures, anything over iOS 11 resolves that
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
end
end
end
hard to tell but it looks like your Podfile is for a recent version of RN but you have some pods manually linked which should support auto linking. Maybe double check the install/setup instructions for the 3rd party libraries you're using.
The solution of my problema was removing this line of code from my podfile:
installer.pods_project.targets.each do |target|
Thank u
Related
I'm facing this issue when I try to run the app in Xcode. my Xcode version is 13.2.1 (13C100)
-U and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together
Here's my podfile
$RNFirebaseAsStaticFramework = true
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
platform :ios, '13.0'
install! 'cocoapods', :deterministic_uuids => false
target 'Mcsc' do
use_frameworks!
config = use_native_modules!
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'GoogleMaps'
pod 'RNFBApp', :path => '../node_modules/#react-native-firebase/app'
pod 'GoogleUtilities', :modular_headers => true
pod 'Firebase', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'FirebaseStorage', :modular_headers => true
pod 'FirebaseStorageInternal', :modular_headers => true
pod 'FirebaseAppCheckInterop', :modular_headers => true
pod 'FirebaseAuthInterop', :modular_headers => true
pod 'FirebaseCoreExtension', :modular_headers => true
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse"
# Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
target 'McscTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
# use_flipper!()
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
installer.pod_targets.each do |pod|
if pod.name.eql?('RNPermissions') || pod.name.start_with?('Permission-')
def pod.build_type;
# Uncomment the line corresponding to your CocoaPods version
Pod::BuildType.static_library # >= 1.9
# Pod::Target::BuildType.static_library # < 1.9
end
end
end
end
post_install do |installer|
# config.build_settings['ENABLE_BITCODE'] = 'NO'
# Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
`sed -i -e $'s/__IPHONE_10_0/__IPHONE_12_0/' Pods/RCT-Folly/folly/portability/Time.h`
end
end
Any help would be great! I tried disabling bitcode and it still showed ENABLE_BITCODE=YES in the error message - cleaned my build folder too. Really out of ideas right now.
Bitcode is deprecated in Xcode 14. So, it is perhaps best to simply disable it, then there's no problem. In Podfile in postinstall add these lines
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
In my case I had to remove use_frameworks! and use
pod 'Firebase', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
$RNFirebaseAsStaticFramework = true
instead.
So my Podfile looked like this
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
platform :ios, '12.4'
install! 'cocoapods', :deterministic_uuids => false
target 'opinion' do
config = use_native_modules!
# Flags change depending on the env values.
flags = get_default_flags()
pod 'Firebase', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
$RNFirebaseAsStaticFramework = true
use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
# Upcoming versions of React Native may rely on get_default_flags(), but
# we make it explicit here to aid in the React Native upgrade process.
:hermes_enabled => true,
:fabric_enabled => flags[:fabric_enabled],
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
:flipper_configuration => FlipperConfiguration.enabled,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
target 'opinionTests' do
inherit! :complete
# Pods for testing
end
post_install do |installer|
react_native_post_install(
installer,
# Set `mac_catalyst_enabled` to `true` in order to apply patches
# necessary for Mac Catalyst builds
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
I am working on an app that was written 2 years ago, so now I'm trying to build that code on android and ios. When i do pod install from vscode in ios folder and then i am building that iOS code in xcode, then i face 'React/RCTBridgeModule.h' file not found Lexical or Preprocessor Issue under one of pods project.
My efforts:
Cleared node modules cache or deleting it and then reinstalling.
I tried to remove my Pods directory and then run pod install I open the .xcworkspace like it is written in the logs on the pod install, I clean the project on xcode and then try to build but it won't works...
Set same ios build target for all pod files and project.
here is my pod file:
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
platform :ios, '11.0'
target 'MyAppName' do
use_modular_headers! // here i have also tried use_frameworks!
pod 'RNPermissions', :path => '../node_modules/react-native-permissions'
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways"
pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse"
pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications"
pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary"
pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone"
# React Native Maps dependencies
# pod 'react-native-google-maps', :path => '../node_modules/react-native-maps'
rn_maps_path = '../node_modules/react-native-maps'
pod 'react-native-google-maps', :path => rn_maps_path
# pod 'GoogleMaps'
# pod 'Google-Maps-iOS-Utils'
#firebase
pod 'Firebase/Core'
pod 'Firebase/Messaging'
use_react_native!(
# :path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => false
)
#pod 'RNFirebase', :path => '../node_modules/react-native-firebase'
#pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios'
pod 'ReactNativeExceptionHandler', :path => '../node_modules/react-native-exception-handler'
#pod 'react-native-maps', :path => '../node_modules/react-native-maps'
pod 'react-native-maps', path: '../node_modules/react-native-maps'
pod 'react-native-google-maps', path: '../node_modules/react-native-maps'
pod 'GoogleMaps'
pod 'Google-Maps-iOS-Utils'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'RNSVG', :path => '../node_modules/react-native-svg'
target 'MyAppNameTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
post_install do |installer|
react_native_post_install(installer)
end
end
Xcode version: 12.0(12A7209),
react: "17.0.1",
react-native: "0.63.4",
Please let me know if anything else is required and help me in resolving this error.TIA
UPDATE
Cannot find protocol declaration for 'RCTInitializing'
for this issue, one has to add
Add pod 'React-logger', :path => '../node_modules/react-native/ReactCommon/logger'
ref
These days I'm upgrading the react-native application from version 0.61.5 to 0.68.2.
With a few modified Gradle files and minor configuration adjustments, the Android application is currently functioning without any issues. But the iOS application always provides me with some issues after changing the pod file.
I used react native upgrade helper (React Native Upgrade Helper 0.61.5 to 0.68.2) for this upgrade.
my pod File as follows (react-native version 0.68.2 and react version 17.0.1)
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
platform :ios, '11.0'
install! 'cocoapods', :deterministic_uuids => false
target 'HAnalytics' do
config = use_native_modules!
# Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
pod 'RNCPushNotificationIOS', :path => '../node_modules/#react-native-community/push-notification-ios'
pod 'RNCAsyncStorage', :path => '../node_modules/#react-native-async-storage/async-storage'
pod 'react-native-camera', :path => '../node_modules/react-native-camera'
pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
pod 'react-native-document-picker', :path => '../node_modules/react-native-document-picker'
pod 'RNFileViewer', :path => '../node_modules/react-native-file-viewer'
pod 'RNFS', :path => '../node_modules/react-native-fs'
pod 'RNImageCropPicker', :path => '../node_modules/react-native-image-crop-picker'
pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'
pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
pod 'react-native-view-shot', :path => '../node_modules/react-native-view-shot'
pod 'rn-fetch-blob', :path => '../node_modules/rn-fetch-blob'
pod 'RNImageRotate', :path => '../node_modules/react-native-image-rotate'
pod 'react-native-orientation-locker', :path => '../node_modules/react-native-orientation-locker'
pod 'react-native-netinfo', :path => '../node_modules/#react-native-community/netinfo'
pod 'RNKeychain', :path => '../node_modules/react-native-keychain'
pod 'RNAWSCognito', :path => '../node_modules/amazon-cognito-identity-js'
pod 'tipsi-stripe', :path => '../node_modules/tipsi-stripe'
pod 'react-native-webview', :path => '../node_modules/react-native-webview'
pod 'react-native-biometrics', :path => '../node_modules/react-native-biometrics'
target 'HAnalyticsTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
use_flipper!()
post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
Header Search Paths -:
Error -:
There are two solutions I found for this,
1st solution is replace the "react-native-cookie" URL which is deprecated dependency to "#react-native-cookies/cookies" URL to this.
2nd solution is regenerate the iOS folder using following commands.
npm i react-native-eject
npm i #react-native-community/cli // if required use this.
react-native eject
I don't know what changed but I tried just about any thing and I am always getting this message:
The following build commands failed:
CompileC eveloper/Xcode/DerivedData/xxx-bvxasjfnemrqklbhzatwzolraqjj/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-Folly.build/Objects-normal/x86_64/DistributedMutex.o /WebstormProjects/xxx/ios/Pods/Flipper-Folly/folly/synchronization/DistributedMutex.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
This is my Podfile:
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
permissions_path = '../node_modules/react-native-permissions/ios'
platform :ios, '10.0'
target 'xxx' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
pod 'RNSVG', :path => '../node_modules/react-native-svg'
pod 'react-native-camera', :path => '../node_modules/react-native-camera'
pod 'RNPermissions', :path => '../node_modules/react-native-permissions'
pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
pod 'RNCPicker', :path => '../node_modules/#react-native-picker/picker'
pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
pod 'react-native-fbsdk', :path => '../node_modules/react-native-fbsdk'
pod 'RNCAsyncStorage', :path => '../node_modules/#react-native-async-storage/async-storage'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
target 'xxxTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end
target 'xxx-tvOS' do
# Pods for xxx-tvOS
target 'xxx-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
Some of the things I tried:
rm Pods + Podfile.lock and pod install
Setting flipper version 0.74.0
I am 100% sure I am opening the project with the xcworkspace and not the xcodeproj
Thanks to anyone who can help
I am creating Azure build pipeline for react native app and in that while installing pods using cocoapod task that is:
- task: CocoaPods#0
inputs:
forceRepoUpdate: true
projectDirectory: '$(system.defaultWorkingDirectory)/ios'
displayName: 'pod install using the CocoaPods'
I get this error on running the pipeline:
/usr/local/lib/ruby/gems/2.6.0/bin/pod --version
1.9.1
/usr/local/lib/ruby/gems/2.6.0/bin/pod install --repo-update --project-directory=/Users/runner/runners/2.166.2/work/1/s/ios
Updating local specs repositories
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
Analyzing dependencies
[!] No podspec found for `RNPDF` in `../node_modules/react-native-view-pdf`
[!] Automatically assigning platform `iOS` with version `9.0` on target `abcd` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
##[error]The process '/usr/local/lib/ruby/gems/2.6.0/bin/pod' failed with exit code 1
##[error]The 'pod' command failed with error: The process '/usr/local/lib/ruby/gems/2.6.0/bin/pod' failed with exit code 1
I am unable to find the cause for this error, so need some help with this.
My podfile is like this:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'abcd' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for abcd
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'react-native-webview', :path => '../node_modules/react-native-webview'
pod 'RNPDF', :path => '../node_modules/react-native-view-pdf'
pod 'rn-fetch-blob', :path => '../node_modules/rn-fetch-blob'
pod 'react-native-pdf', :path => '../node_modules/react-native-pdf'
target 'abcdTests' do
inherit! :search_paths
# Pods for testing
end
end
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
end
end
If you need any other detail, please let me know in comments.
I didn't find the answer but i got a workaround,
i simply removed two lines:
pod 'RNPDF', :path => '../node_modules/react-native-view-pdf'
pod 'react-native-webview', :path => '../node_modules/react-native-webview'
from podfile, earlier it was like:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'SiteFuelBuyer' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for SiteFuelBuyer
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'RNPDF', :path => '../node_modules/react-native-view-pdf'
pod 'react-native-webview', :path => '../node_modules/react-native-webview'
pod 'rn-fetch-blob', :path => '../node_modules/rn-fetch-blob'
pod 'react-native-pdf', :path => '../node_modules/react-native-pdf'
target 'SiteFuelBuyerTests' do
inherit! :search_paths
# Pods for testing
end
end
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
end
end
and now,
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'SiteFuelBuyer' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for SiteFuelBuyer
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'rn-fetch-blob', :path => '../node_modules/rn-fetch-blob'
pod 'react-native-pdf', :path => '../node_modules/react-native-pdf'
target 'SiteFuelBuyerTests' do
inherit! :search_paths
# Pods for testing
end
end
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
end
end
another better answers are always welcomed.