Open metasanjaya opened 5 years ago
Have you linked the module properly? And may I ask which platform did you encountered in?
I follow all the steps on README, and I try it on Android
I'm getting the same issue.
Same for me, not working according to Readme. There is no showAlert function only showAlertWithOptions and it says undefined is not an object (evaluating 'Native.showAlertWithOptions')
Let me look into it, I will submit a PR as soon as I can
I get the following error TypeError: TypeError: undefined is not a function (near '..._reactNativeSweetAlert.default.showAlert...')
This error is located at: in AlertScreen (created by SceneView) in SceneView (at StackViewLayout.js:782) in RCTView (at View.js:44) in RCTView (at View.js:44) in RCTView (at View.js:44) in AnimatedComponent (at StackViewCard.js:69) in RCTView (at View.js:44) in AnimatedComponent (at screens.native.js:59) in Screen (at StackViewCard.js:57) in Card (at createPointerEventsContainer.js:27) in Container (at StackViewLayout.js:858) in RCTView (at View.js:44) in ScreenContainer (at StackViewLayout.js:311) in RCTView (at View.js:44) in AnimatedComponent (at StackViewLayout.js:307) in Handler (at StackViewLayout.js:300) in StackViewLayout (at withOrientation.js:30) in withOrientation (at StackView.js:79) in RCTView (at View.js:44) in Transitioner (at StackView.js:22) in StackView (created by Navigator) in Navigator (at createKeyboardAwareNavigator.js:12) in KeyboardAwareNavigator (created by SceneView) in SceneView (at createTabNavigator.js:39) in RCTView (at View.js:44) in RCTView (at View.js:44) in ResourceSavingScene (at createBottomTabNavigator.js:113) in RCTView (at View.js:44) in ScreenContainer (at createBottomTabNavigator.js:103) in RCTView (at View.js:44) in TabNavigationView (at createTabNavigator.js:197) in NavigationView (created by Navigator) in Navigator (created by SceneView) in SceneView (created by SwitchView) in SwitchView (created by Navigator) in Navigator (at createAppContainer.js:388) in NavigationContainer (at App.js:29) in RCTView (at View.js:44) in App (at withExpoRoot.js:22) in RootErrorBoundary (at withExpoRoot.js:21) in ExpoRootComponent (at renderApplication.js:34) in RCTView (at View.js:44) in RCTView (at View.js:44) in AppContainer (at renderApplication.js:33)
This error is located at: in NavigationContainer (at App.js:29) in RCTView (at View.js:44) in App (at withExpoRoot.js:22) in RootErrorBoundary (at withExpoRoot.js:21) in ExpoRootComponent (at renderApplication.js:34) in RCTView (at View.js:44) in RCTView (at View.js:44) in AppContainer (at renderApplication.js:33)
I am using expo and physical phone with android
Hello @metasanjaya Thanks for using the library. There was a mistake in README file, I have updated it.
This library might not work with Expo since it requires native module linking.
@Doko-Demo-Doa The library doesn't work without Expo also. I've created an app with react-native
and after installing and linking it wasn't worked.
@Doko-Demo-Doa The library doesn't work without Expo also. I've created an app with
react-native
and after installing and linking it wasn't worked.
That's right.. I've created with react-native, not expo...
And done react-native link
as well...
Have you tried SweetAlert.showAlertWithOptions
instead of SweetAlert.showAlert
? I have updated the doc as well.
This is my retry on newly created project:
This is the screenshot, you can check the code here
https://github.com/metasanjaya/sweet-alert-react-native-example
Thank you
Oh I see, the code is a bit broken on Android due to the previous PR. I will re-check and update it ASAP.
@Doko-Demo-Doa Can you share the repo of the project you created? It would be very helpful since I need to use the library
It is in the source code in this repo itself. The only problem is wrong method name.
@Doko-Demo-Doa No, it is not the only problem. It doesn't work with showAlertWithOptions. I have the same issue like @metasanjaya .
Hello, any updates?
@metasanjaya I've started to create my own RN.SweetAlert
@metasanjaya I've started to create my own RN.SweetAlert
Can you share the code?
Thank you
@metasanjaya Yes, I'll do. Just too busy these days. ASAP I've put it in npm.
I fixed this issue and created a pull request
I still have the same problem ... I'm not using expo-cli upload the solution? if not to rule out this npm
any update on thhis case ? i have same trouble
For anyone reading this, I just had the same problem. You have to recompile the app (at least on android) in order to make it work. (:
react-native run-android