Wir verwenden sinch Verifikation von Pods mit swift 3.0 und xcode 8.0. Ich möchte initiate()
und verifyCode()
Methoden nennen, aber Compiler zeigen value of type SINVerification? has no member
Ich habe Import import SinchVerification
und unter Code geschrieben: -sinch Verifikationsmethode nicht in Swift 3.0 und xcode 8.0
let region:String = SINDeviceRegion.currentCountryCode()
let phoneNumber:SINPhoneNumber?
do {
try phoneNumber = SINPhoneNumberUtil().parse("xxxxxxxxxx", defaultRegion: region)
let phoneNumberInE164:String = SINPhoneNumberUtil().formatNumber(phoneNumber!, format: SINPhoneNumberFormat.E164)
let verification = SINVerification.smsVerification(withApplicationKey: "965010f3-bb37-4356-82ba-fea0452377d9", phoneNumber: phoneNumberInE164) as? SINVerification
verification.initiate { (success:Bool, error:Error?) -> Void in
//handle outcome
if (success){
print("successfully requested phone verification")
} else {
print(error?.localizedDescription)
}
}
SMSVerification() -Methode nicht angezeigt –
Was meinst du? – cjensen
Welche Version des sinch-Frameworks verwenden Sie? – cjensen