amirrajan / rubymotion-applied

RubyMotion documentation provided by the community. Submit a pull request to the docs for a free one year indie subscription.
Apache License 2.0
49 stars 10 forks source link

iOS 11 LocalAuthentication constants (enums) not available: LALABiometryTypeNone, LABiometryTypeFaceID, LABiometryTypeTouchID #45

Closed hboon closed 6 years ago

hboon commented 6 years ago
NSLog "supported: #{LAContext.new.biometryType}"
LABiometryTypeNone
LABiometryTypeFaceID
LABiometryTypeTouchID
NSLog "after"

Rakefile:

app.weak_frameworks << 'LocalAuthentication'

Crash with:

supported: 0
 app/app_delegate.rb:13:in `application:didFinishLaunchingWithOptions:': uninitialized constant AppDelegate::LABiometryTypeNone (NameError)
 *** Terminating app due to uncaught exception 'NameError', reason: 'app/app_delegate.rb:13:in `application:didFinishLaunchingWithOptions: ': uninitialized constant AppDelegate::LABiometryTypeNone (NameError)

RubyMotion 5.3 macOS Sierra 10.12.6 (16G29)

amirrajan commented 6 years ago

Added to short list.

amirrajan commented 6 years ago
typedef NS_ENUM(NSInteger, LABiometryType)
{
    /// The device does not support biometry.
    LABiometryNone,

   /// The device supports Touch ID.
    LABiometryTypeTouchID,

   /// The device supports Face ID.
    LABiometryTypeFaceID,
} NS_ENUM_AVAILABLE(NA, 11_0) __WATCHOS_UNAVAILABLE __TVOS_UNAVAILABLE;

Try: LABiometryNone

amirrajan commented 6 years ago

Reopen if needed.