在真实设备iphone5s上运行的Xcode6-beta5上触摸ID构建错误

eri*_*ric 3 objective-c touch-id xcode6 ios8

我正在使用Xcode6-beta5将触摸ID身份验证集成到我自己的应用程序中.使用以下代码运行在真实设备iphone5s(iOS8-beta5)上.已经#import.

LAContext *myContext = [[LAContext alloc] init];
NSError *authError = nil;
NSString *myLocalizedReasonString = @"use touch id to unlock app";

if ([myContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError]) {
     [myContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics
               localizedReason:myLocalizedReasonString
                         reply:^(BOOL success, NSError *error) {
                            if (success) {
                               UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"success" message:@"pass auth" delegate:self cancelButtonTitle:NSLocalizedString(@"OK", @"OK button") otherButtonTitles:nil];

                               [alert show];
                               [alert release];

                               // User authenticated successfully, take appropriate action
                            } else {
                               UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"fail" message:@"fail auth" delegate:self cancelButtonTitle:NSLocalizedString(@"OK", @"OK button") otherButtonTitles:nil];

                               [alert show];
                               [alert release];
                               // User did not authenticate successfully, look at error and take appropriate action
                            }
                         }];
  } else {
     // Could not evaluate policy; look at authError and present an appropriate message to user
  }
Run Code Online (Sandbox Code Playgroud)

但是当我编译并运行它时显示构建失败:

Ld build/HWC.build/Debug-iphoneos/HWC.build/Objects-normal/armv7/HWC normal armv7 cd/Users/i307466/Downloads/OneBridge/trunk/Apps/iPhone/WorkFlow export IPHONEOS_DEPLOYMENT_TARGET = 8.0 export PATH ="/应用程序/ Xcode6-Beta5.app /内容/开发/平台/ iPhoneOS.platform /开发人员的/ usr/bin中:/Applications/Xcode6-Beta5.app/Contents/Developer/usr/bin:在/ usr/bin中:/ bin中:/ usr/sbin:/ sbin"/Applications/Xcode6-Beta5.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms /iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk -L/Users/i307466/Downloads/OneBridge/trunk/Apps/iPhone/WorkFlow/build/Debug-iphoneos -F/Users/i307466/Downloads/OneBridge/trunk/Apps/iPhone/WorkFlow/build/Debug-iphoneos -filelist /Users/i307466/Downloads/OneBridge/trunk/Apps/iPhone/WorkFlow/build/HWC.build/Debug-iphoneos/HWC.build/Objects-normal/armv7 /HWC.LinkFileList -Xlinker -map -Xlinker/Users/i307466/Downloads/OneBridge/trunk/A pps/iPhone/WorkFlow/build/HWC.build/Debug-iphoneos/HWC.build/HWC-LinkMap-normal-armv7.txt -dead_strip -all_load ../../../Pioneer/MOClients/iPhone/build/ Debug-iphoneos/libMO.a ../../../Pioneer/Robie/Device/iPhone/Datavault/build/Debug-iphoneos/libDatavault.a ../../../TPTools/iOS/afaria/ libs/Debug-iphoneos/libAfariaSLL.a ../../../TPTools/PhoneGap/iOS/CordovaLib/build/Debug-iphoneos/libCordova.a ../../../TPTools/iOS/ClientUtil/ Libraries/Debug-iphoneos/libsupClientUtil.a ../../../TPTools/iOS/ClientUtil/Libraries/Debug-iphoneos/libSUPSupportability.a ../../../TPTools/iOS/ClientUtil/Libraries/ Debug-iphoneos/libPerformanceLib.a ../../../Pioneer/Robie/Device/iPhone/Widgets/HWCLib/build/Debug-iphoneos/libHWC.a ../../../TPTools/OpenSSL/ iOS/Debug-iphoneos/libcrypto.a -fobjc-link-runtime -miphoneos-version-min = 8.0 -lstdc ++.6.0.9 -framework CoreTelephony -lz.1.2.5 -lstdc ++ -framework CoreGraphics -framework CFNetwork -framework Foundation - 框架MobileCoreServices -framework QuartzCore -framewo rk Security -framework UIKit -licucore.A -framework AddressBook -framework CoreMedia -framework AudioToolbox -framework AVFoundation -framework CoreLocation -framework AddressBookUI -framework SystemConfiguration -Xlinker -dependency_info -Xlinker/Users/i307466/Downloads/OneBridge/trunk/Apps/iPhone /WorkFlow/build/HWC.build/Debug-iphoneos/HWC.build/Objects-normal/armv7/HWC_dependency_info.dat -o /Users/i307466/Downloads/OneBridge/trunk/Apps/iPhone/WorkFlow/build/HWC.build /Debug-iphoneos/HWC.build/Objects-normal/armv7/HWC

架构armv7的未定义符号:"_ OBJC_CLASS _ $ _ LAContext",引自:HWCAppDelegate.o中的objc-class-ref ld:未找到架构armv7 clang的符号:错误:链接器命令失败,退出代码为1(使用-v看看调用)

Ld build/HWC.build/Debug-iphoneos/HWC.build/Objects-normal/arm64/HWC normal arm64 cd/Users/i307466/Downloads/OneBridge/trunk/Apps/iPhone/WorkFlow export IPHONEOS_DEPLOYMENT_TARGET = 8.0 export PATH ="/应用程序/ Xcode6-Beta5.app /内容/开发/平台/ iPhoneOS.platform /开发人员的/ usr/bin中:/Applications/Xcode6-Beta5.app/Contents/Developer/usr/bin:在/ usr/bin中:/ bin中:/ usr/sbin:/ sbin"/Applications/Xcode6-Beta5.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms /iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk -L/Users/i307466/Downloads/OneBridge/trunk/Apps/iPhone/WorkFlow/build/Debug-iphoneos -F/Users/i307466/Downloads/OneBridge/trunk/Apps/iPhone/WorkFlow/build/Debug-iphoneos -filelist /Users/i307466/Downloads/OneBridge/trunk/Apps/iPhone/WorkFlow/build/HWC.build/Debug-iphoneos/HWC.build/Objects-normal/arm64 /HWC.LinkFileList -Xlinker -map -Xlinker/Users/i307466/Downloads/OneBridge/trunk/A pps/iPhone/WorkFlow/build/HWC.build/Debug-iphoneos/HWC.build/HWC-LinkMap-normal-arm64.txt -dead_strip -all_load ../../../Pioneer/MOClients/iPhone/build/ Debug-iphoneos/libMO.a ../../../Pioneer/Robie/Device/iPhone/Datavault/build/Debug-iphoneos/libDatavault.a ../../../TPTools/iOS/afaria/ libs/Debug-iphoneos/libAfariaSLL.a ../../../TPTools/PhoneGap/iOS/CordovaLib/build/Debug-iphoneos/libCordova.a ../../../TPTools/iOS/ClientUtil/ Libraries/Debug-iphoneos/libsupClientUtil.a ../../../TPTools/iOS/ClientUtil/Libraries/Debug-iphoneos/libSUPSupportability.a ../../../TPTools/iOS/ClientUtil/Libraries/ Debug-iphoneos/libPerformanceLib.a ../../../Pioneer/Robie/Device/iPhone/Widgets/HWCLib/build/Debug-iphoneos/libHWC.a ../../../TPTools/OpenSSL/ iOS/Debug-iphoneos/libcrypto.a -fobjc-link-runtime -miphoneos-version-min = 8.0 -lstdc ++.6.0.9 -framework CoreTelephony -lz.1.2.5 -lstdc ++ -framework CoreGraphics -framework CFNetwork -framework Foundation - 框架MobileCoreServices -framework QuartzCore -framewo rk Security -framework UIKit -licucore.A -framework AddressBook -framework CoreMedia -framework AudioToolbox -framework AVFoundation -framework CoreLocation -framework AddressBookUI -framework SystemConfiguration -Xlinker -dependency_info -Xlinker/Users/i307466/Downloads/OneBridge/trunk/Apps/iPhone /WorkFlow/build/HWC.build/Debug-iphoneos/HWC.build/Objects-normal/arm64/HWC_dependency_info.dat -o /Users/i307466/Downloads/OneBridge/trunk/Apps/iPhone/WorkFlow/build/HWC.build /Debug-iphoneos/HWC.build/Objects-normal/arm64/HWC

架构arm64的未定义符号:"_ OBJC_CLASS _ $ _ LAContext",引用自:HWCAppDelegate.o中的objc-class-ref ld:未找到架构arm64 clang的符号:错误:链接器命令失败,退出代码为1(使用-v看看调用)

Aeh*_*mlo 11

您似乎没有链接LocalAuthentication.framework.在Xcode中将它添加到应用程序的目标(General-> Linked Frameworks and Libraries - > + - > LocalAuthentication.framework).