expo invariant violation rncsafeareaprovider error on ios - ios

I have developed an app with react native using expo. I published the app to expo and it is working fine with android but it is giving error on ios. On some digging I also tried to install react-native-webview but that also did not work. How I can fix this problem.

There is a possibility that when you were installing other dependencies, you have duplicated react-native-safe-area-context. For example, if you have installed #react-native-community/masked-view or some other package containing this you can get this error. You simply have to remove the duplicate.
rm -rf node_modules/expo/node_modules/react-native-safe-area-context is one solution.
But remove the module you absolutely don't want.

Related

'react/bridging/CallbackWrapper.h' file not found in React Native

I am trying to setup my React Native app on iOS, but on build, I am always getting this error:
'react/bridging/CallbackWrapper.h' file not found
I have been investigating on my own and found a few people with the same problem:
https://github.com/mrousavy/react-native-vision-camera/issues/1121
https://github.com/facebook/react-native/issues/34102
I have tried everything in these answers but no luck. Since it seems related to React Native Vision Camera, I also did everything stated in their troubleshooting page.
Unforrunately I still get the error. I built the project both using npx react-native run-ios (which throws an endless error) and using XCode itself, where I could find the real error.
Can you help me? The app works perfectly in Android. Thanks!
If nothing of the links I pasted in the question work, what finally worked for me was:
Updgrade React Native to >= 0.69.3 (my version was 0.69.0). To do that npx react-native upgrade.
Delete Pods folder and Podfile.lock from iOS folder. Run pod install.
And then building the project again.
The way to fix the problem is to comment-out the line :
s.header_dir = "react/bridging"
in
/node_modules/react-native/ReactCommon/React-bridging.podspec

How to build a working existing react native app on iOS?

So I have an app that I have been working on for a far few months now. I developed it on Ubuntu and tested on my android phone and tablet. The app is setup using the basic react native library and I also added in expo later on for some little thing expo had that I needed. Let me know if you need more information about this.
The app is 'feature complete' and just needs to be play tested and released. So naturally I need to get it up and running on iOS. I am currently renting a mac that I can remote into (as I own no apple products).
It has been nearly a week now and I just cannot move past this error (see bottom) (or variations of what seem to be the same/similar errors). I can build a fresh app on this mac so everything is there to build react native apps. I have tried: Deleting pod and and running
pod install
running
pod deintegrate && pod install
deleting node modules and running
npm install
Initially I had an error complaining that some libraries were manually linked and this was bad so I unlinked them and now I get this error. I am opening that app using the workspace file when I run in xcode. I also get the error if running through command line i.e.
npx react-native run-ios
Using different simulators makes no difference...not sure if it is even getting that far in the build process for that to matter. I think this has something to do with the linking of RN libraries and this new auto link thing. Any thoughts? There are loads of posts with this error (or close to) that have all sorts of 'solutions', but none seem to make a difference. Overwhelmingly peoples solve this by pod install after deleting pod folder or running the pod deintegrate command. Looking at the error you can see that it prints out loads of libraries some of which I installed and others probably come with my 3rd party libraries, but some look like the core libraries and even low level looking ones that presumably RN is built on (but I honestly wouldn't know).
I was having issues before 'compiling' stuff and again I think it was to do with the linking.
Also, is there a 'react native' support service or something i.e. I pay some who knows apple and will just fix the damn thing for me
ERROR (scroll to the bottom for what is probably the important bit):
https://pastebin.com/HMdP4x3P
[EDIT]
I think this has something to do with my podfile: https://pastebin.com/5J7BbG2Q other pod files do not look like mine.

React-Native error "RN Sketch not found in the UIManager"

I'm trying to build a react-native sketch project and I believe I've installed all the required libraries for it to work on my machine, but for some reason I keep on getting this error, which I'm not sure how to resolve.
Also, I wasn't sure what it meant by the linking of the react native to react native sketch, when installing the react-native sketch.
react-native link react-native-sketch
Maybe sharing your code will help debug the issue. But if the code is right then see below for installation.
So when installing this package, it is not enough to just install it. You must link to React Native. So do;
npm i -S react-native-sketch
That will install it. Now to make React Native 'aware' of this newly installed package, link it as follows;
react-native link react-native-sketch
This is just putting it in simple terms for understanding.
You should get a success message for both of the above - if an error occurs while running any of the above command lines, then it did not succeed and you'll get the error above.
If developing on IOS, don't forget to pod install and re run the project after installing the package!
CD to IOS directory - type 'pod install' and ENTER. Re Run the project.

React Native project version upgrade error: v0.56 to v0.60, iOS fails

I'm currently upgrading one of my projects built in React Native v0.56 to latest v0.60. Created a new project with version v0.60 and updated all the packages used in previous version of app, but now facing weird errors.
I've already tried all the possible solutions mentioned in Git and Stack overflow. None of them worked for me. I've also tried to remove plugins one by one and then adding them but not able to find cause of the error.
iOS:
In iOS, all the packages by default autolinks as per v0.60, but I got error of linking in very first package, I've tried manual linking too, not working.
After manual linking do cd ios and then pod install. This will not be done by autolinking and you have to do it yourself. On iOS on my project i had to manual link on iOS almost every library and almost all of them needed a pod install
use upgrade helper from react native community Upgrade Helper

React Native - Linked NativeModule works when run from Xcode, but not from packager

I recently added bugsnag-react-native and followed the directions for linking. When I run using the packager without Xcode, I get the following error screen.
When I search on Google for answers, the only relevant issue posted is Runtime Error: No Native client found which suggests that its a linking problem and to follow the directions, but from my perspective everything looks fine and I followed the direction.
What reason would a native module only be available when run from Xcode?
I had a similar issue and below solved it:
If you can successfully run from Xcode, then delete your ios/build folder (rm -rf ios/build) and re-run react-native run-ios.

Resources