I did not have any problems with the Android application, I successfully completed all the steps and published my application.
But I am getting an error while running the App in IOS emulator.
I will be glad if you can help me how to solve this problem. thanks
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, '13.0'
install! 'cocoapods', :deterministic_uuids => false
production = ENV["PRODUCTION"] == "1"
target 'cmsio' 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
:production => production,
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
:flipper_configuration => FlipperConfiguration.enabled,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'RNFBMessaging', :path => '../node_modules/#react-native-firebase/messaging'
pod 'react-native-google-maps', :path => '../node_modules/react-native-maps'
pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary"
pod 'Permission-LocationAccuracy', :path => "#{permissions_path}/LocationAccuracy"
pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways"
pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse"
pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications"
pod 'Firebase', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'Firebase/Messaging', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
pod 'Google-Mobile-Ads-SDK'
$RNFirebaseAsStaticFramework = true
$RNGoogleMobileAdsAsStaticFramework = true
target 'cmsioTests' do
inherit! :complete
# Pods for testing
end
post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
Error Message
The following build commands failed:
CompileC /Users/sirket/Library/Developer/Xcode/DerivedData/cmsio-doadelmxvtbipqeduigsnvnzbamx/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNFBMessaging.build/Objects-normal/x86_64/RNFBMessagingSerializer.o /Users/sirket/Desktop/android/cmsio/node_modules/#react-native-firebase/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'RNFBMessaging' from project 'Pods')
(1 failure)
Being able to run the application
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 am coding a simple react native app and am getting a console error when I run the app. It says that there is no permission handler detected and tells me to go through some steps. But I do not know how to do these steps, and if they don't work, I don't know how to solve the problem.
Here is the error:
Here is the podfile:
platform :ios, '9.0'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
def add_flipper_pods!(versions = {})
versions['Flipper'] ||= '~> 0.33.1'
versions['DoubleConversion'] ||= '1.1.7'
versions['Flipper-Folly'] ||= '~> 2.1'
versions['Flipper-Glog'] ||= '0.3.6'
versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
versions['Flipper-RSocket'] ||= '~> 1.0'
pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug'
# List all transitive dependencies for FlipperKit pods
# to avoid them being linked in Release builds
pod 'Flipper', versions['Flipper'], :configuration => 'Debug'
pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => 'Debug'
pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug'
pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug'
pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug'
pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug'
pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
end
# Post Install processing for Flipper
def flipper_post_install(installer)
installer.pods_project.targets.each do |target|
if target.name == 'YogaKit'
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.1'
end
end
end
end
target 'LocalMainStreet' do
# Pods for LocalMainStreet
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
target 'LocalMainStreetTests' do
inherit! :complete
# Pods for testing
end
use_native_modules!
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
add_flipper_pods!
post_install do |installer|
flipper_post_install(installer)
end
end
target 'LocalMainStreet-tvOS' do
# Pods for LocalMainStreet-tvOS
target 'LocalMainStreet-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
Please help. Thanks.
You just have to install RN Permissions and make changes to the podfile and info.plist. Depending on what you need the permissions for, you get the pods. If you're not sure, do them all. You can find the code at https://www.npmjs.com/package/react-native-permissions. There are also some other things you may have to do-those I didn't talk about but are in the npm documentation in the link.
Thanks to #Raghav Herugu for helping me solve the problem
Added these in podFile
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways/Permission-LocationAlways.podspec"
pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse/Permission-LocationWhenInUse.podspec"
Then run pod install
For me this worked.
At the moment, your Podfile is not configured to handle permissions. In your Podfile under your target, add the relevant lines of code for the permissions you are requesting:
target 'LocalMainStreet' do
# react-native-permissions permission handlers
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-AppTrackingTransparency', :path => "#{permissions_path}/AppTrackingTransparency.podspec"
pod 'Permission-BluetoothPeripheral', :path => "#{permissions_path}/BluetoothPeripheral.podspec"
pod 'Permission-Calendars', :path => "#{permissions_path}/Calendars.podspec"
pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec"
pod 'Permission-Contacts', :path => "#{permissions_path}/Contacts.podspec"
pod 'Permission-FaceID', :path => "#{permissions_path}/FaceID.podspec"
pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways.podspec"
pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse.podspec"
pod 'Permission-MediaLibrary', :path => "#{permissions_path}/MediaLibrary.podspec"
pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone.podspec"
pod 'Permission-Motion', :path => "#{permissions_path}/Motion.podspec"
pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications.podspec"
pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary.podspec"
pod 'Permission-Reminders', :path => "#{permissions_path}/Reminders.podspec"
pod 'Permission-Siri', :path => "#{permissions_path}/Siri.podspec"
pod 'Permission-SpeechRecognition', :path => "#{permissions_path}/SpeechRecognition.podspec"
pod 'Permission-StoreKit', :path => "#{permissions_path}/StoreKit.podspec"
end
You can read more about it in the react-native-permissions repo.
They have mentioned about this issue in the documentation and also suggested a fix for the same and it works. Clearing the Xcode cache worked for me :)
Solution:
If you see a No permission handler detected error: Make sure that you
have at least one permission handler set up. In some cases the Xcode
cache needs to be cleared (Xcode -> Product -> Clean Build Folder)
If you are using use_frameworks! (for example for firebase app)
add the following to convert all permission pods into static libraries, according to the docs.
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;
Pod::BuildType.static_library
end
end
end
end
Add necessary permissions for your app after use_react_native!(...):
use_react_native!(
:path => config[:reactNativePath],
:hermes_enabled => false,
:fabric_enabled => flags[:fabric_enabled],
)
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-LocationAccuracy', :path => "#{permissions_path}/LocationAccuracy"
pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse"
Clean your project in XCode => Product => Clean Project
Clean Derived data:
rm -rf ~/Library/Developer/Xcode/DerivedData
Note: Close the IOS Simulator
Also you can go to ios folder and delete Podfile.lock and Pods folder.
Install the pods:
npx pod-install or cd ios && pod install
Try to run your app.
yarn ios
or
npm run ios
The path changed. Now its ok. See below:
# permissions
pod 'Permission-BluetoothPeripheral', :path => "#{permissions_path}/BluetoothPeripheral/Permission-BluetoothPeripheral.podspec"
pod 'Permission-Calendars', :path => "#{permissions_path}/Calendars/Permission-Calendars.podspec"
pod 'Permission-Camera', :path => "#{permissions_path}/Camera/Permission-Camera.podspec"
pod 'Permission-Contacts', :path => "#{permissions_path}/Contacts/Permission-Contacts.podspec"
pod 'Permission-FaceID', :path => "#{permissions_path}/FaceID/Permission-FaceID.podspec"
pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways/Permission-LocationAlways.podspec"
pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse/Permission-LocationWhenInUse.podspec"
pod 'Permission-MediaLibrary', :path => "#{permissions_path}/MediaLibrary/Permission-MediaLibrary.podspec"
pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone/Permission-Microphone.podspec"
pod 'Permission-Motion', :path => "#{permissions_path}/Motion/Permission-Motion.podspec"
pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications/Permission-Notifications.podspec"
pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary/Permission-PhotoLibrary.podspec"
pod 'Permission-Reminders', :path => "#{permissions_path}/Reminders/Permission-Reminders.podspec"
pod 'Permission-Siri', :path => "#{permissions_path}/Siri/Permission-Siri.podspec"
I had the same issue because I forgot to do:
npx pod-install
//or
cd ios
pod-install
iOS
By default no permission handler is installed. Update your Podfile by choosing the ones you want to check or request, then run pod install.
target 'YourAwesomeProject' do
# …
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-AppTrackingTransparency', :path => "#{permissions_path}/AppTrackingTransparency"
pod 'Permission-BluetoothPeripheral', :path => "#{permissions_path}/BluetoothPeripheral"
pod 'Permission-Calendars', :path => "#{permissions_path}/Calendars"
pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
pod 'Permission-Contacts', :path => "#{permissions_path}/Contacts"
pod 'Permission-FaceID', :path => "#{permissions_path}/FaceID"
pod 'Permission-LocationAccuracy', :path => "#{permissions_path}/LocationAccuracy"
pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways"
pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse"
pod 'Permission-MediaLibrary', :path => "#{permissions_path}/MediaLibrary"
pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone"
pod 'Permission-Motion', :path => "#{permissions_path}/Motion"
pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications"
pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary"
pod 'Permission-PhotoLibraryAddOnly', :path => "#{permissions_path}/PhotoLibraryAddOnly"
pod 'Permission-Reminders', :path => "#{permissions_path}/Reminders"
pod 'Permission-Siri', :path => "#{permissions_path}/Siri"
pod 'Permission-SpeechRecognition', :path => "#{permissions_path}/SpeechRecognition"
pod 'Permission-StoreKit', :path => "#{permissions_path}/StoreKit"
end
In my case, delete the build folder and rebuild then everything is go success.
In addition to #Vaibhav Herugu's answer::
Ensure the react-native-permissions package is installed. For Podfile tweaks? follow the instruction guide here:: https://www.npmjs.com/package/react-native-permissions
Uninstall the app on your device
You can delete the Xcode DerivedData folder directly from the terminal:
rm -rf ~/Library/Developer/Xcode/DerivedData
Rebuild your app and smile :) (Hopefully)
I was having the same issue with React Native 0.63.2.
The Solution was
1 - to update my cocopods version with
sudo gem install cocoapods --pre
2 - remove the following code from my pod file
pre_install do |installer|
installer.pod_targets.each do |pod|
if pod.name.eql?('RNPermissions') || pod.name.start_with?('Permission-')
def pod.build_type;
# Uncomment one line depending on your CocoaPods version
Pod::BuildType.static_library # >= 1.9
#Pod::Target::BuildType.static_library # < 1.9
end
end
end
end
After that, I did a pod install and everything was working again.
In your node_modules
go into this file -> react-native-permission, then find the file RNPermissions.m (could be inside the ios folder)
In this file Search for "No permission handler detected"
and comment this line "RCTLogError(#"%#", message)"
Then you're good to go for now.
I've been trying to upgrade my project and use cocoapods for ios,
Whenever i build from xcode it gives me 100 error related to swift,
- My project does not depends on swift
- Upgraded all packages
Please find screenshot for error
PackageList Screenshot!
Xcode Error Screenshot!
Xcode Error Screenshot1!
Xcode Error Screenshot2!
I've followed below link for package upgradation
react-native-community link!
Same error was found flutter! - didn't try this
# platform :ios, '9.0'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
target 'test' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for test
# Your 'node_modules' directory is probably in the root of your project,
# but if not, adjust the `:path` accordingly
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTPushNotification', :path => '../node_modules/react-native/Libraries/PushNotificationIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'react-native-print', :path => '../node_modules/react-native-print'
pod 'react-native-webview', :path => '../node_modules/react-native-webview'
pod 'RNImageCropPicker', :path => '../node_modules/react-native-image-crop-picker'
pod 'react-native-sqlite-storage', :path => '../node_modules/react-native-sqlite-storage'
pod 'RNCAsyncStorage', :path => '../node_modules/#react-native-community/async-storage'
pod 'react-native-netinfo', :path => '../node_modules/#react-native-community/netinfo'
pod 'react-native-contacts', :path => '../node_modules/react-native-contacts'
pod 'RNFS', :path => '../node_modules/react-native-fs'
pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
pod 'react-native-html-to-pdf', :path => '../node_modules/react-native-html-to-pdf'
pod 'react-native-image-resizer', :path => '../node_modules/react-native-image-resizer'
pod 'RNShare', :path => '../node_modules/react-native-share'
pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
pod 'RNSVG', :path => '../node_modules/react-native-svg'
pod 'ReactNativePermissions', :path => '../node_modules/react-native-permissions'
pod 'lottie-react-native', :path => '../node_modules/lottie-react-native'
pod 'lottie-ios', :path => '../node_modules/lottie-ios'
pod 'Firebase/Core', '~> 6.3.0'
#pod 'OneSignal', '>= 2.9.3', '< 3.0'
# Required by RNFirebase
pod 'Firebase/Core', '~> 6.3.0'
#target 'OneSignalNotificationServiceExtension' do
# pod 'OneSignal', '>= 2.6.2', '< 3.0'
#end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'No'
end
end
end
use_native_modules!
end
target 'test-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
target 'testTests' do
inherit! :search_paths
# Pods for testing
end
target 'test-tvOS' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
end```
Expecting it should have been worked easily
Try this:
Open ios/YourAppName.xcodeproj in Xcode
Right-click on Your App Name in the Project Navigator on the left, and click New File…
Create a single empty Swift file to the project (make sure that Your App Name target is selected when adding)
When Xcode asks, press Create Bridging Header and do not remove Swift file then. re-run your build.
This should fix the problem
Found on github: https://github.com/mxcl/PromiseKit/issues/1059#issuecomment-493925940
Please follow these steps:
check the app developer id is logged in
clean your build for your react native following
steps: How can I clean my react-native project to back it up?
close your Xcode
Open your project from xworkspace
This issue can happen because of Xcode 12. I have created a script to fix the issue. You can find it here: https://gist.github.com/HosseinRashno/4786b289356ad9840b6c087ce8191fe4
Here you can find about the reason of the issue: https://github.com/facebook/react-native/issues/29633#issuecomment-694187116
The issue is that all the podspecs of these libraries that fail to
link depend on the React pod, which is in fact really only an umbrella
dependency for pure JS applications to depend on, whereas the native
APIs that these libraries rely on actually reside in the React-Core
pod.
This means that they technically were always incorrect—conceptually
one should always explicitly depend on the lib that provides the APIs
you rely on, rather than relying on transitive dependencies—but it
seems like in previous Xcode versions the build system worked
differently and having the transitive dependencies around just
happened to work 🤷♂️
The correct fix going forward is for all these libs to update their
dependency from React to React-Core:
Remove: s.dependency 'React'
Add: s.dependency 'React-Core'
add this line in YourAppName > Build Setting > Search paths > Framework Search Paths
$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)
and it will work
As final solution wasnt only the embedding of a brigding header, having "Always Embed Swift Standard Libraris" BUT having also ANY Swift file in the build target and not only in the pods. Looks like XCode optimizer is removing even if "Always" is YES.