KjellConnelly / react-native-rate

Send your app users to Apple App Store, Google Play, Amazon, or other using the newest APIs
635 stars 100 forks source link

Cannot read property 'rate' of undefined #59

Closed Ghun2 closed 4 years ago

Ghun2 commented 4 years ago

I applied it to my app as your Example, but it didn't work and the debugger console showed TypeError: Cannot read property 'rate' of undefined. When I looked up the Rate.rate function,

const {RNRate} = NativeModules
RNRate.rate (options, (response) => {....

There seems to be a problem here. How can I solve this problem?

KjellConnelly commented 4 years ago

Im guessing you didn't link properly. This module doesn't work with Expo, if that's what you're using. If you aren't, then I'm guessing your installation didn't work since it's not finding the native module.

Ghun2 commented 4 years ago

It seems to be only my project problem. I did npm install and pod install but it doesn't seem to be included in ios native modules. I haven't solved it, but thank you so much for replying. thank you

kierangillen commented 3 years ago

@Ghun2 Try deleting your Pods folder and doing a clean pod install, that fixed it for me.