I have a string that is actually a phone number. This string is stored as variable PhoneNumber in my database.
I want to convert this to a type phoneNumber() and then format it using the PhoneNumberKit and then put it back into a label as a string How should i do this?
Convert the string to integer and then convert the string to phoneNumber struct present in phone number kit?
or is there anyway of simply passing the string itself to format function in phone Numberkit?
I have not written a full code yet. So this is what i have in my code:
func formatTOPhoneNumber(){
// userNumber is the string that is phone number
var userNumber = User.shared.phoneNumber
var num = (userNumber! as NSString).integerValue
}