let alert = UIAlertController.init(title: "알림", message: "디바이스에 저장된 생체인식(지문,FACEID)이 없습니다. 등록하시겠습니까?", preferredStyle: UIAlertController.Style.alert)
                                
let action_ok = UIAlertAction.init(title: "설정", style: UIAlertAction.Style.default) { (action: UIAlertAction) in
    
    guard let url = URL(string: "App-Prefs:root=TOUCHID_PASSCODE") else { return }
    
    UIApplication.shared.open(url, options: [:])
}
let action_cancel = UIAlertAction.init(title: "취소", style: UIAlertAction.Style.default) { (action: UIAlertAction) in
}

alert.addAction(action_ok)
alert.addAction(action_cancel)

DispatchQueue.main.async {
    guard let topVC = UIApplication.currentTopViewController() else {
        return
    }
    topVC.present(alert, animated: true, completion: nil)
}

+ Recent posts