signalapp / Signal-iOS

A private messenger for iOS.
https://signal.org
GNU Affero General Public License v3.0
10.6k stars 2.95k forks source link

Fix stuck on verifiying phone number in case of invalid E.164 format #5759

Closed gmchandarana closed 3 months ago

gmchandarana commented 4 months ago

First time contributor checklist

Contributor checklist

PROBLEM:

Upon attempting registration with a seemingly valid phone number format, such as +44 07XX XXXXXX, the server responds with a status code 422. Subsequently, an alert is presented to the user. However, upon acknowledgement of this alert by the user, the registration process stalls at the stage labelled "Verifying +44 07XX XXXXXX" screen. See #5609 for more details.

FIX:

I fixed the issue by introducing a method on the RegistrationPhoneNumberPresenter protocol. This function is invoked when the user taps the ok button on the Invalid Phone Number alert.

TEST:

The following was tested on iPhone 13 Pro (iOS 17.3), iPhone 15 Pro Simulator (iOS 17.0) and iPhone 12 Simulator ( iOS 15.2):

  1. VerifyingPhoneNumberScreen
  2. VerifyingPhoneNumberScreenAlert
  3. YourPhoneNumberScreenE