2017-11-02 5 views
0

私の反応するネイティブアプリで指紋認証プロセスを作成しようとしています。私はそれを達成するために博覧会から次のSDKを使用しました。Expo.Fingerprint.isEnrolledAsyncはオブジェクトを返します

https://docs.expo.io/versions/latest/sdk/fingerprint.html#returns-1

Expo.Fingerprint.authenticateAsync()メソッドは、ブール値を返しますことを示唆しています。しかし、それを印刷しようとするとオブジェクトを返すようです。

Expo.Fingerprint.authenticateAsync() 
    .then(success => { 
     if(result == true) { 
     console.log("Touch ID success. " + result); 
     } else { 
     console.log("Touch ID failed. " + result); 
     } 
}); 

誰も私と同じ問題が発生しましたか?

答えて

0

この関数は、ブール値が埋め込まれたオブジェクトを返します。この方法でアクセスできます。

Expo.Fingerprint.authenticateAsync() 
.then(result => { 
    console.log(result.success); 
}); 
関連する問題