【身份证识别】使用swift报错误码216101
Ta的回复 :在viewdidload注册 AipOcrService.shard().auth(withAK: "x", andSK: "x") 点击调用的时候 let frontVC = AipCaptureCardVC.viewController(with: CardType.idCardFont, andImageHandler:{ (image) in AipOcrService.shard().detectIdCardFront(from: image, withOptions: nil, successHandler:{ (result) in //这个是个json 然后干你的事 print(result as Any) }, failHandler:{ //错误信息 (error) in print(error as Any) }) print("正面识别完成") self.dismiss(animated: true, completion: nil) }) self.present(frontVC!, animated: true, completion: nil)