prscX / react-native-siri-wave-view

React Native: Native Siri Wave View

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

App crash on IOS

Adetiwa opened this issue · comments

I installed and linked, but i keep getting this error for over a week now.
Please is there a way I can fix this?

"Invariant Violation: Native component for "RNSiriWaveView" does not exist

Thanks @Adetiwa for the raising the issue.

Looks like similar to ISSUE: 2. I have updated the README as well. Basically you need to follow below steps in order to fix the same:

  • Please replace import com.alex.siriwaveview.RNSiriWaveViewPackage; with import ui.siriwave.RNSiriWaveViewPackage; in your app Android MainApplication.java class.

Please let me know in case you still face the issue.

Thanks
Pranav

Also we need to verify that RNSiriWaveView is properly linked in your app. Can you please verify the below points:

  • Please add react-native-siri-wave-view & siriwaveview module in your app by adding below snippet in your app settings.gradle. If it already exisit please ignore:
include ':react-native-siri-wave-view'
project(':react-native-siri-wave-view').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-siri-wave-view/android')

include ':siriwaveview'
project(':siriwaveview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-siri-wave-view/android/SIRIWaveView/siriwaveview')
  • Add below :react-native-siri-wave-view & :siriwaveview in your app build.gradle depenencies:
dependencies {
    compile project(':siriwaveview')
    compile project(':react-native-siri-wave-view')
    compile fileTree(dir: "libs", include: ["*.jar"])
}
  • Please make sure your app gradle version is 2.3.3 > and above

  • Please make sure your Android SDK > 25 and above

Thanks
Pranav

I have not tried it on Android. It crashes on IOS. I ran react-native link after installing.
Thanks for the response but it still doesn't work on iOS

@Adetiwa: Can you please verify that the library is linked in your native app. Can you please verify this in your Xcode.

  • One observation is instead of react-native link command please try by running react-native link react-native-siri-wave-view

Thanks
Pranav

Yes, it is linked. I ran react-native link react-native-siri-wave-view.

One more observation, I thought I needed to add 'libRNSIriWaveView.a' to my libraries.
When I did, I got this error,
Showing All Issues
../node_modules/react-native-siri-wave-view/ios/RNSiriWaveView.h:8:9: 'SCSiriWaveformView.h' file not found

And the project will build successfully when I take it out, but the app will crash. Even when I added 'libSCsiriWaveformView.a' to my build libraries, that project builds failed with the above error.

But yes, I verified that the library is linked.

Hello. Any solution to this please?

Hi @Adetiwa: I am really sorry. I forgot to add below installation step for iOS:

Can you please run below command in order to install podfile required by the library:

cd ./node_modules/react-native-siri-wave-view/ios/ && pod install

Note: It requires Cocoapods to be installed on your system. Please follow below steps in order to install the same:

sudo gem install cocoapods

cocoapods

Please let me know in case you face any issues.

Thanks
Pranav

Thank you so much, Pranav.
It works now. Really appreciate

Good to hear that @Adetiwa. I have updated README with the steps, hope it will help other folks as well.

Thanks
Pranav