hieuvp / react-native-fingerprint-scanner

Provide Fingerprint, Touch ID, and Face ID Scanner for React Native (Compatible with both Android and iOS)
https://www.npmjs.com/package/react-native-fingerprint-scanner
872 stars 299 forks source link

iPhone XS crash without erros when try to use FaceID #70

Closed icastillejogomez closed 5 years ago

icastillejogomez commented 5 years ago

Al works out in android and ios. (Real devices) But in iPhone XS simulator with FaceID Enrolled and Info.plist not:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>en</string>
    <key>CFBundleDisplayName</key>
    <string>visionariosBolsaAppTest</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</string>
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>$(PRODUCT_NAME)</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>1</string>
    <key>NSFaceIDUsageDescription</key>
    <string>Enabling Face ID allows you quick and secure access to your account.</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSExceptionDomains</key>
        <dict>
            <key>localhost</key>
            <dict>
                <key>NSExceptionAllowsInsecureHTTPLoads</key>
                <true/>
            </dict>
        </dict>
    </dict>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string/>
    <key>UIAppFonts</key>
    <array>
        <string>Entypo.ttf</string>
        <string>EvilIcons.ttf</string>
        <string>Feather.ttf</string>
        <string>FontAwesome.ttf</string>
        <string>Foundation.ttf</string>
        <string>Ionicons.ttf</string>
        <string>MaterialCommunityIcons.ttf</string>
        <string>MaterialIcons.ttf</string>
        <string>Octicons.ttf</string>
        <string>Roboto_medium.ttf</string>
        <string>Roboto.ttf</string>
        <string>rubicon-icon-font.ttf</string>
        <string>SimpleLineIcons.ttf</string>
        <string>Zocial.ttf</string>
        <string>FontAwesome5_Brands.ttf</string>
        <string>FontAwesome5_Regular.ttf</string>
        <string>FontAwesome5_Solid.ttf</string>
    </array>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIRequiredDeviceCapabilities</key>
    <array>
        <string>armv7</string>
    </array>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>
</dict>
</plist>
phillbaker commented 5 years ago

Just to clarify - the app on the device was built with that Info.plist? Can you try rebuilding to make sure that the correct NSFaceIDUsageDescription key is there?

There should also be a native crash log available in xcode - can you post the relevant bits?

icastillejogomez commented 5 years ago

Okay thank you so much @phillbaker for spend your time with me. I'm using react native, not expo, I one of my biggest questions are: ¿How can I rebuild ios? I think I already doing:

When I want to run my React Native app I do the following steps:

  1. rm -fr package-lock.json node_modules/ && npm i && npm start -- --reset-cache this run metro bundler with empty cache.
  2. react-native run-ios --simulator="iPhone XS"

Where exactly is building my ios/android app?

When I run react-native run-ios --simulator="iPhone XS" is my app rebuilding with the new Info.plist file?

When I open xcode and go to Info.plist I can see the key-value I set before.

What things I have to do to check if all my code is correct?

Can you confirm that FaceID is runnable with your lib in simulator? I think yes...

Really thank @phillbaker

(I'm going to see what happen in xcode terminal when app crash and will post here)

icastillejogomez commented 5 years ago

Now I just tried to launch iPhone XS with the same configuration. Everything works perfect... I also tried to launch with react-native cli in debbug mode and non-debbug log and everything works out. What it could be? I do not know what to think. How can I check if Info.plist is working good? How can I rebuild ios app? I know this kind of questions I have to ask in another site but I you can clarify me I'll really thank you! Close!