LocalAuthentication fails with error -1004
Originator: | gbernady | ||
Number: | rdar://20238050 | Date Originated: | 20-Mar-2015 01:48 PM |
Status: | Open | Resolved: | No |
Product: | iOS SDK | Product Version: | 8.2 |
Classification: | Serious Bug | Reproducible: | Always |
Summary: When I build, run and restart 2 or more apps using LocalAuthentication API, the evaluatePolicy:localizedReason:reply: method on LAContext starts returning the following error: Error Domain=com.apple.LocalAuthentication Code=-1004 "User interaction is required." UserInfo=0x17007e840 {NSLocalizedDescription=User interaction is required.} The only way to fix the issue is to remove other apps using LocalAuthentication. Steps to Reproduce: 1. Open attached sample app. 2. Build and run it on a device. 3. Tap the "Test" button in the app and authenticate using your fingerprint. 4. The app will print "SUCCESS" in console. 5. Stop the app and leave it on the device. 6. Change bundleId of the sample app. 7. Build and run the app with changed id - a second app will be installed. 8. Tap the "Test" button in the second app, authenticate with fingerprint. 9. Start the first app for the 2nd time and tap the "Test" button. 10. TouchId alert will not be shown and error with code -1004 will be printed to console. Expected Results: LocalAuthentication API should present TouchId alert instead of returning error code -1004. Actual Results: LocalAuthentication API (LAContext#evaluatePolicy:localizedReason:reply:) returns error code -1004. Version: iOS 8.2 [12D508] Notes: Configuration: iPhone 5S, iPhone 6 Plus Attachments: 'TouchIdTest.zip' was successfully uploaded.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
i have same trouble i was rename project and it work fine :D.
Finding the same issue
Have you ever figured out how to resolve this?