Symbol not found: _LAErrorDomain

217 views Asked by At

App crashes with Symbol not found: _LAErrorDomain, when using LAErrorDomain (from the Local Authentication framework for Touch ID) on iOS below version 8.3. Works fine on iOS 8.3 though.

Compiled with Xcode 6.3.2 and iOS SDK 8.3. Update: Still the same with Xcode 6.4 and iOS SDK 8.4.

1

There are 1 answers

1
tobihagemann On BEST ANSWER

This is a really weird one. I don't really understand what causes this, because LAErrorDomain should be available as a constant since iOS 8.0. Maybe someone knows the true issue here, but here's my workaround:

Luckily the error domain of Local Authentication is also defined as a macro in <LocalAuthentication/LAPublicDefines.h>, which is already imported, if you are using Local Authentication.

You can either use kLAErrorDomain directly (more precisely @kLAErrorDomain, because the macro is defined as a string literal) or define your own constant:

// Workaround for iOS below 8.3: LAErrorDomain constant can't be found and leads to a crash
NSString *const MyLAErrorDomain = @kLAErrorDomain;