第一次用 CocoaPods 打包,本地编译都可以通过,没有任何错误提示。使用 CocoaPods lint 的时候,提示
- ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use
--verbose
for more information.
- ERROR | [iOS] xcodebuild: /Users/olddonkey/Documents/Projects/ODTouchID/ODTouchID/ODTouchID.swift:54:38: error: type 'LAPolicy' has no member 'deviceOwnerAuthenticationWithBiometrics'
- NOTE | [iOS] xcodebuild: if context.canEvaluatePolicy(LAPolicy.deviceOwnerAuthenticationWithBiometrics, error: &authError) {
- ERROR | [iOS] xcodebuild: /Users/olddonkey/Documents/Projects/ODTouchID/ODTouchID/ODTouchID.swift:55:36: error: type 'LAPolicy' has no member 'deviceOwnerAuthenticationWithBiometrics'
- ERROR | [iOS] xcodebuild: /Users/olddonkey/Documents/Projects/ODTouchID/ODTouchID/ODTouchID.swift:115:17: error: use of unresolved identifier 'DispatchQueue'
- ERROR | [iOS] xcodebuild: /Users/olddonkey/Documents/Projects/ODTouchID/ODTouchID/ODTouchID.swift:120:17: error: use of unresolved identifier 'DispatchQueue'
比如说 LAPolicy 那里,我的代码是这样的:
if context.canEvaluatePolicy(LAPolicy.deviceOwnerAuthenticationWithBiometrics, error: &authError) {
context.evaluatePolicy(LAPolicy.deviceOwnerAuthenticationWithBiometrics, localizedReason: messageOnAuth, reply: { (success, evalPolicyError) in
if success {
很标准的 TouchID 使用,求助为啥会出现这样的错误
万分感谢