ashinga48 / React-Native-Firebase-Phone-Authentication

Seems there's not a proper react native plugin with phone authentication alone. So creating it.
9 stars 6 forks source link

Cannot read property 'sendOTP' of undefined #2

Open felansu opened 6 years ago

felansu commented 6 years ago

Getting error Cannot read property 'sendOTP' of undefined

suprraz commented 6 years ago

Has this been resolved? The reference above does not seem to contain relevant information.

EDIT: After digging into the iOS code, it seems the sendOTP() function has not been implemented. Perhaps the author has the intention to complete this portion but has not done so yet. Some more clarification in the README.md would be helpful for others looking for cross-platform support.

ashinga48 commented 6 years ago

Hey @suprraz @felansu thank you for pointing out.. dont know how it rolled back.

I have updated it, can you guys check it once and let me know.

suprraz commented 6 years ago

@ashinga48 It appears the issue is that the latest code has a version of 1.0.2 while the outdated code is versioned 1.0.3 in the npm registry. Even now, doing an npm install (tested yarn add in my case) gave me the old code. Bumping the version in package.json to 1.0.4 should fix the issue.

ashinga48 commented 6 years ago

oops let me push it to npm even.

ashinga48 commented 6 years ago

@suprraz can you plz check it now

suprraz commented 6 years ago

@ashinga48 Latest version (1.0.4) pulled correctly. I'm seeing another issue with the new code, in that the library is unable to find the required Firebase headers:

RNFirebasePhoneAuth.m:3:9: fatal error: 'Firebase/Firebase.h' file not found
#import <Firebase/Firebase.h>
        ^~~~~~~~~~~~~~~~~~~~~
1 error generated.
ashinga48 commented 6 years ago

hey @suprraz let me check with a sample project.. i will upload a video on integration. Thanks. ping you in night