Hi Im using Sinch sms verification to sign up users in my app but after updating my code to swift 3 (and sinch sdk currently 2.0.3), Im getting the following error
Use of unresolved identifier 'SINPhoneNumberUtil'
Use of unresolved identifier 'SINPhoneNumberFormat'
Use of undeclared type 'SINPhoneNumber'
That the code who was working with previous SDK and Swift 2
if (result.success){
let phoneUtil = SINPhoneNumberUtil()
do {
let defaultRegion = DeviceRegion.currentCountryCode()
let phoneNum: SINPhoneNumber = try phoneUtil.parse(self.phoneNumber.text!, defaultRegion: defaultRegion)
let formattedString: String = try phoneUtil.formatNumber(phoneNum, format: SINPhoneNumberFormat.E164)//format(phoneNumber, numberFormat: .E164)
self.formattedNumToPass = formattedString
print(formattedString)
}
catch let error as NSError {
print(error.localizedDescription)
}
self.performSegue(withIdentifier: "enterPin", sender: sender);
}
I saw there were some changes in the SinchVerification reference docs :
http://download.sinch.com/docs/verification/ios/latest/reference-swift/html/index.html
but so far I didnt succeed to make the right changes..
Thanks for your help!