Questions tagged [phonenumberkit]

PhoneNumberKit is available at https://github.com/marmelroy/PhoneNumberKit.

Available for iOS, watchOS, tvOS and macOS.

9 questions
2
votes
1 answer

Enable/Disable button with validating phone number entered in a textfield

I'm very new to ReactiveSwift and MVVM as a whole. I'm trying to validate phone numbers entered into a textfield and enable/disable a button depending on the validation result. In the app, there is a textfield and a UIButton button called Submit.…
Isuru
  • 30,617
  • 60
  • 187
  • 303
1
vote
0 answers

Not able to validate Emergency Number like 911 using pod PhoneNumberKit 3.3 in iOS

I am using pod 'PhoneNumberKit', '~> 3.3' PhoneNumber is correctly validating with country code. but when I tried below code, it gives me error. do { let emergencyNumber = "+1 911" let phoneNumberCustomDefaultRegion = try…
Nat's
  • 11
  • 1
1
vote
2 answers

how to override default region code in "PhoneNumberKit"?

i'm using the library "PhoneNumberKit" to format a UITextfield i'm using on my app that i use it to input phone number. i am using PartialFormatter to format the input into a phone number mask style. @IBAction func onPhoneNumberChanged(_ sender:…
Chief Madog
  • 1,738
  • 4
  • 28
  • 55
1
vote
1 answer

How to determine region from the phone number string?

I tried using PhoneNumberKit and couldn't find any proper api which would give me the region name. I need the region from the phone number so that I can display the appropriate flag. For example using this: let phoneNumber = try…
Enrik Qaz
  • 243
  • 4
  • 14
0
votes
0 answers

Validate phone number with country codes in iOS PhoneNumberKit

I'm using PhoneNumberKit to validate phone numbers but it returns invalid results for my test cases. let phoneNumberKit = PhoneNumberKit() do { let parsedNumber = try phoneNumberKit.parse(phoneNumber, ignoreType: true) return "" } catch { …
ajw
  • 2,568
  • 23
  • 27
0
votes
0 answers

uikit PhoneNumberKit I can't enter data from keyboard

I have a phone field using uikit phonenumberkit. When we make phoneTextField.withExamplePlaceholder = false, we cannot enter anything in the field, I press it from the keyboard, but it is not written. How can I fix
0
votes
1 answer

PhoneNumberKit returning AG for toll free numbers

I am a new swift developer. I am using Swift 4.2 and Xcode 10.1. I am parsing numbers using Mamelroy's PhoneNumberKit to return the country code. The parsing works fairly well (though a little slow at first). However, when given a number (888) or…
TM Lynch
  • 403
  • 3
  • 13
0
votes
2 answers

How can I add an inset to the text and placeholder in PhoneNumberTextField

I need to use a textfield to havet he user type in phone numbers so I'm using the PhoneNumberTextField from the project PhoneNumberKit. By default it's just a borderless textfield. I modified it by adding a border with a corner radius and a UIButton…
Isuru
  • 30,617
  • 60
  • 187
  • 303
-1
votes
1 answer

Verify your bundle identifier 'org.cocoapods.PhoneNumberKit' is correct

I installed PhoneNumberKit by adding pod 'PhoneNumberKit', '~> 2.6' to the podFile and running pod install after that my app builds fine but when i archive the app for deployment i get error No suitable application records were found.…
Akoh Victor Gutz
  • 620
  • 7
  • 25