Here I'm using xcodebuild shell command to build a release version in my react native project, it comes a fatal error:
'React/RCTViewManager.h' file not found
#import <React/RCTViewManager.h>
Xcode version: 8.3
react native version: 0.44.0
Any help ?
This solved the problem for me
Clear node_module folder and package-lock.json rm -rf node_modules && rm package-lock.json
Clean Xcode's Build folder menu product>clean build folder
Reinstall dependencies and link npm install && react-native link
replace the #import <React/RCTViewManager.h> by #import "RCTViewManager.h"
Hope it helps you
i solved this issue in easy ways
uninstall react-native-linear gradient
cd ios && pod install
after uninstalling completely go to xcode.workspace =>product=>clean build
run-ios
after successfully running
npm install react-native-linear-gradient
then cd ios && pod install
you must see autolinking for react-native-linear gradient
It will work properly
Note = Don't do manually linking if your react native version > 0.60
Related
I have a React Native project. I recently updated to macOS Big Sur 11.3 and XCode Version 12.5 (12E262).
When I build the project in XCode I get the following error:
../ios/Pods/Headers/Public/Flipper-Folly/folly/functional/Invoke.h:22:10: fatal error: 'boost/preprocessor/control/expr_iif.hpp' file not found
#include <boost/preprocessor/control/expr_iif.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
When I browse to Pods folder, expr_iif.hpp file exists.
I tried removing Pods folder, Podfile.lock, .xcworkspace. Deleted npm cache. Then ran pod install.
But no luck.
This build-time error is thrown by Flipper-RSocket and Flipper-Folly.
I can provide further details if requested.
I just had this issue and it happens when you have incompatible versions of Flipper pods.
This worked for me:
Update your Podfile to install Flipper like this:
use_flipper!({ 'Flipper' => '0.93.0', 'Flipper-Folly' => '2.6.7', 'Flipper-DoubleConversion' => '3.1.7' })
Update deployment target on both Podfile and Xcode project o 12.1 or newer:
platform :ios, '12.1'
Remove Podfile.lock
pod install --repo-update
Close and re-open the Xcode project
You may also try fixing permissions if the above is not enough for you:
chmod -R 755 ios/Pods/boost-for-react-native
The error went away after this.
It completely removes Flipper, but here's a workaround I used
disabled Flipper in PodFile (as explained in an answer here: React Native Project is not running on iOS Simulator)
deleted Pods directory
re-ran npx pod-install
started the application (npx react-native run-ios)
Instead of giving him the precise version I used the next line:
use_flipper!
Put it in Podfile and run: pod install --repo-update.
It worked for me!
When I do archive build, I got the following error. This has been discussed on stackOverflow before. But most of them are the case that the error happens at debug/build level. I don't have problems with build/run. Also, I tried everything I possibly can but none of them helps.
Here is how I get this error:
1) rm -rf node_modules
npm install
cd ios
pod install
2) open MyAppName.xcworkspace with Xcode.
3) Product -> Archive.
some more info about my setup:
in my Podfile, DoubleConversion lib is there.
pod 'DoubleConversion', :podspec => "#{rnPrefix}/third-party-podspecs/DoubleConversion.podspec"
from Xcode, this lib DoubleConversion is also linked
Does anyone can give me some suggestion?
When I build project, I see build error: ProjectName.debug.xcconfig unable to open file. I couldn't understand my problem for a long time, but today I take attention, what directory is wrong: full error: projectName/Pods/Pods...ProjectName.debug.xcconfig unable to open file Where Pods part duplicated, so correct directory must be as projectName/Pods...ProjectName.debug.xcconfig How to fix it?
Xcode 10.1
After trying other suggestions found here #8091 (comment) and at Incorrect path for Pods.debug.xcconfig in Xcode?
I found that Kaspik's suggestion worked:
pod deintegrate
pod install
edit the .xcodeproj/project.pbxproj file and change the PBXGroup "path = Pods" to "name = Pods"
source https://github.com/CocoaPods/CocoaPods/issues/8091
updated from: pod reintegrate to: pod deintegrate
I have encored with this solution...Here is how I solved
Close Xcode,
run on terminal "pod install"
open xcode,
clean build folder and run again
Remove the duplicates from the Pods folder ƒrom xcode project here:
Deleting extra files in target->Linked Frameworks and Libraries solved my problem
Do the following
Delete .xcworkspace file
Go to project build phases - delete Check Pods Manifest.lock and Embed Pods Framework section
Remove Pods folder from the left project navigator
Remove Pods folder from the project directory
Delete everything related to pods except Podfile
Do Pod install
This should resolve the problem.
Run pod repo update first and then you should be able to install pods with yarn install:pods if you're using yarn.
I was able to manage by reopening Xcode, in my case i had already run pod install with the ide open (Xcode 12.0).
Clean build folder. Then use the code following:
pod reintegrate
pod install
I ran into this issue in CI. Simply running xcodebuild clean fixed it for me.
In Xcode that'd be equivalent to cmd + shift + k.
I was getting the same issue, I checked my npm modules was corrupted so I deleted npm modules
And npm install ==> cd iOS ==> pod install.
And the code works smoothly!
Happy coding!
Better solution for further this kind of issues
$ cd ~/.cocoapods/repos
$ git clone https://github.com/CocoaPods/Specs.git master
I am trying to build my react-native project in xcode, I have recently removed the googleSignIn node_module, cleaned my build and ran npm cache verify. I keep getting the above error.
Any ideas?
I am using react-native v0.57.0
1) Check any reference to that module in Xcode libraries and Linked frameworks and libraries
and remove them.
For faster results take a quick look in ios folder and locate the file project.pbxproj search for any reference in that file and remove it.
2) Also check pod file and make sure you have no reference to that module in there.
Note:
To clean the cache you can run something like this:
rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/metro-* && rm -rf $TMPDIR/haste-* && watchman watch-del-all && rm -rf ios/build && rm -rf node_modules && yarn install && npm start -- --reset-cache
(If you don't have yarn you can use npm)
I tried to change the bundle identifier in the Info.plist and the xcode itself. (in full empty project).
But for some reason I can't build it. Entry, ":CFBundleIdentifier", Does Not Exist. And what strange is that I can build it successfully in the xcode but not with the npm run ios. Any idea how to solve this?
Try the react-native-rename npm package.
npm install react-native-rename -g
On the root of your React Native project execute the following command
react-native-rename "ExampleApp" -b com.newname.newid
Check the docs > react-native-rename