prscX / react-native-spruce

React Native Bridge for Native Spruce Animation Library
https://github.com/willowtreeapps/spruce-android
Apache License 2.0
531 stars 33 forks source link

invariant Violation: Native component for "RNSpruceView" does not exist #5

Open adirzoari opened 6 years ago

adirzoari commented 6 years ago

Hello, After installing react-native-spruce, I tried to use in the example of the List component and I get this error C:\Users\XXX/\node_modules\react-native\Libraries\Core\Exceptio…:65 Invariant Violation: Native component for "RNSpruceView" does not exist

prscX commented 6 years ago

Thanks @adirzoari for raising the issue.

This library has native dependencies, looks like it is not linked, have you run below command to link this library:

react-native link react-native-spruce

If you have run, can you please verify that your android app contains library reference, please check in below 3 files :

Please let me know in case after linking also it work not works.

Thanks Pranav

adirzoari commented 6 years ago

Hello, Yes i already linked it. I checked all the files and all of them includes spruce. it still not works.

AndrePech commented 6 years ago

Hi, I am facing the same problem on iOS

althurzard commented 6 years ago

Same problem on IOS.

prscX commented 6 years ago

Thanks @AndrePech + @althurzard for raising the issue. My bad, slipped under my radar.

I have added index.ios.js with UnimplementedView, since it is not currently supported on iOS. For now you can put conditional based require statement.

Please install the latest V0.0.4, let me know if you still face any same issue.

Thanks Pranav

prscX commented 6 years ago

Hi @adirzoari, You are facing this issue for iOS or Android? Based on your comments it looks like for Android. Can you please verify this once.

Thanks Pranav

althurzard commented 6 years ago

@prscX No luck :(. 'since it is not currently supported on iOS' - Did you mean that the library doesnt work on iOS ?

prscX commented 6 years ago

Hi @althurzard,

Spruce-iOS is completely written in Swift and does not provide any Objective-C wrapper in order to interact with. Issues/101 I have raised with the Spruce Team.

Currently this library does not work on iOS, once the Objective-C wrapper is enabled it would be a day effort to integrate the same.

Thanks Pranav

rf1804 commented 6 years ago

Hi @prscX i think you can also include swift for bridging with react native https://github.com/peggyrayzis/react-native-create-bridge#iosswift or create a bridging header between swift and objective-C https://moduscreate.com/blog/swift-modules-for-react-native

In the meanwhile i'll try to implement using above solutions.

prscX commented 5 years ago

Thanks @rf1804 for sharing the blog references.

Coming days I am planning to work on the same based on my work load. I will keep you posted.

Thanks </ Pranav >