iziz / libPhoneNumber-iOS

iOS port from libphonenumber (Google's phone number handling library)
Apache License 2.0
2.35k stars 459 forks source link

Xcode 14.3 Analyzer Warnings Related To Assumed Nullability #391

Open LowAmmo opened 1 year ago

LowAmmo commented 1 year ago

When running Xcode analyzer on our project (and directly on the libPhoneNumber-iOS project), seeing some warnings about passing nil to methods that are expecting it, or returning nil from methods that don't support returning nil.

Working under an assumption that the current code is doing what is desired, I believe the majority of the "issues" are just due to assumed Nullability with methods.

I'm working on a PR that adds nullability specifiers primarily in NBPhoneNumberUtil, but also a few other places that gave warnings.

Everything seems to be benign, so not sure there is actually a problem - but, my OCD appreciates when code analysis doesn't produce any warnings at all. 😄

LowAmmo commented 1 year ago

Created Pull Request: https://github.com/iziz/libPhoneNumber-iOS/pull/392

Everything was tested/developed with Xcode 14.3