react-native-view-shot
react-native-view-shot copied to clipboard
NativeModules.RNViewShot is undefined
so, how to react-native link react-native-view-shot ?
Can you try again with 3.3.0 ? There were possible fixes for this. It should work like any other React Native library
The error is still there.. Should we manually link the library? If so how to do it in 3.3.0?
It all depends on your React Native set up, in latest bootstrap of a React Native project, there is nothing to do but to do a react-native link
(as done in the example project)
see https://reactnative.dev/docs/linking-libraries-ios
using react native 0.68.2 got the same error (NativeModules.RNViewShot is undefined) tried a lot of methods
- wipeout Xcode DerivedData
- manual linking
- pod disintegrate setup and install
- arch --x86_64 pod install
- react native clean project
but in vainπ
π finally found a temporary workaround : changing project format to Xcode 11.4-compatible
everything just worked ! π
so regardless of the compatibility patch for Xcode 12 in version 3.3.0, I guess there should still be some compatibility issues with Xcode 12 in the current release. ( by the way I'm using apple silicon, maybe this only happens on apple silicon ? )
still an amazing package and a big thinks to all of the contributors !
if this isn't single case, maybe there's a need to create an issue regarding the compatibility problem with Xcode 12 ? ( I know v3.3.0 introduced Xcode 12 compatibility patch but there still seems to be some problems going on. )
generally speaking I think it's very hard to maintain software and libraries in multiple XCode versions, Apple tend to be very pushy in the need to get their stack up to date π₯² I'm not sure what could specifically be related to this library.
yeah they are so pushy and every time when a newer version of Apple product come out there's always a disaster for developers π’ especially when it comes to compatibility.
It will be better if they choose to work on older version and make it stable until they release a newer version, or try to increase the interoperability between each versions π€·ββοΈ
Hi, I'm using React Native 0.59.10
I think the problem here is on MainAplication.java
When we do react-native link, somehow it only write import fr.greweb.reactnativeviewshot.RNViewShotPackage;
But one more thing to do is to add this package
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
.... // your other package
new RNViewShotPackage()
);
}
Any update on this issue ?
I recently encountered this issue. Any possible fix yet?
Same question here on android π₯
I was able to fix this by creating a new development build after installing the package.
I was able to fix this by creating a new development build after installing the package.
Resetting the application cache also worked for me. thank you so much!
I am still facing the same issue on Android π₯ Using react-native version 0.72.4 (Works with older versions) @eliasg52 how did you reset the application cache? I tried gradlew clean task and yarn restart cache.
Likewise, I am using a dev client, rebuilding the app resolved it for me also.
I already tried to remove the app and create a new build again, but after some period, the problem came back again..