libPhoneNumber-iOS
libPhoneNumber-iOS copied to clipboard
NBPhoneNumberUtil.isNumberMatch fails on version 1.0.1
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... =/
https://github.com/iziz/libPhoneNumber-iOS/blob/8efc8d1b75fc8dc97464acd7eb23a9a2719e9141/libPhoneNumber/NBPhoneNumberUtil.m#L3602
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 37f3d36cf4ef3de74d8c44838a0266976b24fcb7 for now, as that seems to be the last working version (as you mention: 1.0.0).
Try this out: https://github.com/iziz/libPhoneNumber-iOS/issues/324
Great, thanks!