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

NBPhoneNumberUtil.isNumberMatch fails on version 1.0.1 #323

Open
cassianodialpad opened this issue Sep 17, 2020 · 3 comments
Open

NBPhoneNumberUtil.isNumberMatch fails on version 1.0.1 #323

cassianodialpad opened this issue Sep 17, 2020 · 3 comments

Comments

@cassianodialpad
Copy link
Contributor

The test below works fine on version 1.0.0, but fails on version 1.0.1 and 1.0.2 (it returns NOT_A_NUMBER instead of EXACT_MATCH).

let formatter = NBPhoneNumberUtil()
let number = "+16508636853"
let result = formatter.isNumberMatch(number, second: number, error: nil)
XCTAssertEqual(result, .EXACT_MATCH)

On my digging, I found out that this line of code is returning nil on NormalizeNonBreakingSpace(numberToParse). I wasn't able to figure out why... =/

numberToParse = NormalizeNonBreakingSpace(numberToParse);

@JeroenJK
Copy link

Thanks for this! I was already wondering why it wasn't working anymore after switching from CocoaPods to SPM; it was the version instead.

I ended up using 37f3d36 for now, as that seems to be the last working version (as you mention: 1.0.0).

@simonmitchell
Copy link

Try this out: #324

@cassianodialpad
Copy link
Contributor Author

Great, thanks!

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

3 participants