iOS 获取手机短信验证码

if (@available(iOS 12.0, *)) {

    //Xcode 10 适配

    self.codeField.textContentType = UITextContentTypeOneTimeCode; 

    //非Xcode 10 适配

    self.codeField.textContentType = @"one-time-code";

}

你可能感兴趣的:(iOS 获取手机短信验证码)