Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Result is different from Google and iOS Library #324

Closed
duy-dindinn opened this issue Sep 21, 2020 · 2 comments
Closed

Result is different from Google and iOS Library #324

duy-dindinn opened this issue Sep 21, 2020 · 2 comments

Comments

@duy-dindinn
Copy link

Hello,

I am using version 1.0.2 and one of my phone number does not return the same result as Google demo site.
The phone number is +65 8921 xxxx.

From iOS library:

- (NBEPhoneNumberType)getNumberType:(NBPhoneNumber *)phoneNumber;

returns UNKNOWN

- (BOOL)isValidNumberForRegion:(NBPhoneNumber *)number regionCode:(NSString *)regionCode;

return false

From Google:

Result from isPossibleNumber(): true
Result from isValidNumber(): true
Result from isValidNumberForRegion(): true
Phone Number region: SG
Result from getNumberType(): MOBILE

What should I do to get the correct result?
Thanks in advance!

Regards,
Duy

@duy-dindinn
Copy link
Author

Fixed by using NBPhoneNumberUtil.sharedInstance instead of NBPhoneNumber()

@simonmitchell
Copy link

Ohh my god @duy-dindinn you saved me!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants